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

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

Issue 5703008528629760: Issue 2071 - Fixed issues when sending messages from the popup to the background page (Closed)
Patch Set: Addressed comment Created March 2, 2015, 7:42 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 | « chrome/ext/popup.js ('k') | safari/ext/popup.js » ('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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 293
294 /* Web requests */ 294 /* Web requests */
295 295
296 ext.webRequest = { 296 ext.webRequest = {
297 onBeforeRequest: new ext._EventTarget(), 297 onBeforeRequest: new ext._EventTarget(),
298 handlerBehaviorChanged: function() {} 298 handlerBehaviorChanged: function() {}
299 }; 299 };
300 300
301 301
302 /* Background page */
303
304 ext.backgroundPage = {
305 getWindow: function()
306 {
307 return window;
308 }
309 };
310
311
312 /* Background page proxy (for access from content scripts) */ 302 /* Background page proxy (for access from content scripts) */
313 303
314 var backgroundPageProxy = { 304 var backgroundPageProxy = {
315 cache: new ext.PageMap(), 305 cache: new ext.PageMap(),
316 306
317 registerObject: function(obj, objects) 307 registerObject: function(obj, objects)
318 { 308 {
319 var objectId = objects.indexOf(obj); 309 var objectId = objects.indexOf(obj);
320 310
321 if (objectId == -1) 311 if (objectId == -1)
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 tab.activate(); 665 tab.activate();
676 if (callback) 666 if (callback)
677 callback(page); 667 callback(page);
678 return; 668 return;
679 } 669 }
680 } 670 }
681 671
682 ext.pages.open(optionsUrl, callback); 672 ext.pages.open(optionsUrl, callback);
683 }; 673 };
684 })(); 674 })();
OLDNEW
« no previous file with comments | « chrome/ext/popup.js ('k') | safari/ext/popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld