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

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

Issue 4538458420805632: Fix: issue with chrome v28 and below (Closed)
Patch Set: Created Feb. 6, 2014, 1:35 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 | « no previous file | no next file » | 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-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 var BackgroundMessageEventTarget = function() 180 var BackgroundMessageEventTarget = function()
181 { 181 {
182 MessageEventTarget.call(this); 182 MessageEventTarget.call(this);
183 } 183 }
184 BackgroundMessageEventTarget.prototype = { 184 BackgroundMessageEventTarget.prototype = {
185 __proto__: MessageEventTarget.prototype, 185 __proto__: MessageEventTarget.prototype,
186 _wrapSender: function(sender) 186 _wrapSender: function(sender)
187 { 187 {
188 var tab = new Tab(sender.tab); 188 var tab = new Tab(sender.tab);
189 if (sender.url == null);
Thomas Greiner 2014/02/10 11:05:34 Add a comment above why this is necessary and inve
190 sender.url = tab.url;
189 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; 191 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})};
190 } 192 }
191 }; 193 };
192 194
193 195
194 /* Tabs */ 196 /* Tabs */
195 197
196 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; 198 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest;
197 199
198 var BrowserAction = function(tabId) 200 var BrowserAction = function(tabId)
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (isContextMenuHidden) 575 if (isContextMenuHidden)
574 return; 576 return;
575 577
576 chrome.contextMenus.removeAll(); 578 chrome.contextMenus.removeAll();
577 isContextMenuHidden = true; 579 isContextMenuHidden = true;
578 } 580 }
579 }; 581 };
580 582
581 ext.onMessage = new BackgroundMessageEventTarget(); 583 ext.onMessage = new BackgroundMessageEventTarget();
582 })(); 584 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld