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: Descriptive comment Created Feb. 13, 2014, 2:41 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
190 //url parameter is missing in sender object (Chrome v28 and below)
191 //It's a temporary fix ( http://codereview.adblockplus.org/453845842080563 2/ )
Felix Dahlke 2014/02/27 20:45:25 I'd get rid of this line, doesn't add much. The fi
saroyanm 2014/02/28 12:47:15 Done.
192 if (sender.url == null);
Felix Dahlke 2014/02/27 20:46:39 Actually, why check for null here? Isn't the url p
saroyanm 2014/02/28 12:47:15 Thanks for pointing.
193 sender.url = tab.url;
189 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})}; 194 return {tab: tab, frame: new Frame({url: sender.url, tab: tab})};
190 } 195 }
191 }; 196 };
192 197
193 198
194 /* Tabs */ 199 /* Tabs */
195 200
196 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest; 201 var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest;
197 202
198 var BrowserAction = function(tabId) 203 var BrowserAction = function(tabId)
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (isContextMenuHidden) 578 if (isContextMenuHidden)
574 return; 579 return;
575 580
576 chrome.contextMenus.removeAll(); 581 chrome.contextMenus.removeAll();
577 isContextMenuHidden = true; 582 isContextMenuHidden = true;
578 } 583 }
579 }; 584 };
580 585
581 ext.onMessage = new BackgroundMessageEventTarget(); 586 ext.onMessage = new BackgroundMessageEventTarget();
582 })(); 587 })();
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