Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/ext/background.js

Issue 6528746257383424: Issue 1708 - Integrate first-run page changes in Chrome/Opera/Safari (Closed)
Patch Set: Created Dec. 17, 2014, 10:40 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .hgsubstate ('k') | metadata.common » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 28 matching lines...) Expand all
39 // In that case we get the url from top frame of the tab, recorded by 39 // In that case we get the url from top frame of the tab, recorded by
40 // the onBeforeRequest handler. 40 // the onBeforeRequest handler.
41 var frames = framesOfTabs[this._id]; 41 var frames = framesOfTabs[this._id];
42 if (frames) 42 if (frames)
43 { 43 {
44 var frame = frames[0]; 44 var frame = frames[0];
45 if (frame) 45 if (frame)
46 return frame.url; 46 return frame.url;
47 } 47 }
48 }, 48 },
49 equals: function(page)
50 {
51 return this._id == page._id;
52 },
49 activate: function() 53 activate: function()
50 { 54 {
51 chrome.tabs.update(this._id, {selected: true}); 55 chrome.tabs.update(this._id, {selected: true});
52 }, 56 },
53 sendMessage: function(message, responseCallback) 57 sendMessage: function(message, responseCallback)
54 { 58 {
55 chrome.tabs.sendMessage(this._id, message, responseCallback); 59 chrome.tabs.sendMessage(this._id, message, responseCallback);
56 } 60 }
57 }; 61 };
58 62
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 callback(new Page(tab)); 410 callback(new Page(tab));
407 } 411 }
408 else 412 else
409 { 413 {
410 ext.pages.open(optionsUrl, callback); 414 ext.pages.open(optionsUrl, callback);
411 } 415 }
412 }); 416 });
413 }); 417 });
414 }; 418 };
415 })(); 419 })();
OLDNEW
« no previous file with comments | « .hgsubstate ('k') | metadata.common » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld