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

Side by Side Diff: messageResponder.js

Issue 29544706: Noissue - Adapt check for devtools panel support for Firefox (Closed)
Patch Set: Rebase Created Sept. 23, 2017, 12:36 a.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 | « background.js ('k') | 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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 /* globals require */ 18 /* globals require */
19 19
20 "use strict"; 20 "use strict";
21 21
22 (function(global) 22 (function(global)
23 { 23 {
24 let ext = global.ext || require("ext_background"); 24 let ext = global.ext || require("ext_background");
25 25
26 const {port} = require("messaging"); 26 const {port} = require("messaging");
27 const {Prefs} = require("prefs"); 27 const {Prefs} = require("prefs");
28 const {compareVersion} = require("coreUtils");
28 const {Utils} = require("utils"); 29 const {Utils} = require("utils");
29 const {FilterStorage} = require("filterStorage"); 30 const {FilterStorage} = require("filterStorage");
30 const {FilterNotifier} = require("filterNotifier"); 31 const {FilterNotifier} = require("filterNotifier");
31 const {defaultMatcher} = require("matcher"); 32 const {defaultMatcher} = require("matcher");
32 const {ElemHideEmulation} = require("elemHideEmulation"); 33 const {ElemHideEmulation} = require("elemHideEmulation");
33 const {Notification: NotificationStorage} = require("notification"); 34 const {Notification: NotificationStorage} = require("notification");
34 35
35 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses"); 36 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses");
36 const {Synchronizer} = require("synchronizer"); 37 const {Synchronizer} = require("synchronizer");
37 38
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 169 }
169 else 170 else
170 bidiDir = Utils.readingDirection; 171 bidiDir = Utils.readingDirection;
171 172
172 return {locale: Utils.appLocale, bidiDir}; 173 return {locale: Utils.appLocale, bidiDir};
173 } 174 }
174 175
175 if (message.what == "features") 176 if (message.what == "features")
176 { 177 {
177 return { 178 return {
178 devToolsPanel: info.platform == "chromium" 179 devToolsPanel: info.platform == "chromium" ||
180 info.application == "firefox" &&
181 compareVersion(info.applicationVersion, "54") >= 0
179 }; 182 };
180 } 183 }
181 184
182 return info[message.what]; 185 return info[message.what];
183 }); 186 });
184 187
185 port.on("app.listen", (message, sender) => 188 port.on("app.listen", (message, sender) =>
186 { 189 {
187 getListenerFilters(sender.page).app = message.filter; 190 getListenerFilters(sender.page).app = message.filter;
188 }); 191 });
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 if (message.url) 428 if (message.url)
426 subscriptions = [Subscription.fromURL(message.url)]; 429 subscriptions = [Subscription.fromURL(message.url)];
427 430
428 for (let subscription of subscriptions) 431 for (let subscription of subscriptions)
429 { 432 {
430 if (subscription instanceof DownloadableSubscription) 433 if (subscription instanceof DownloadableSubscription)
431 Synchronizer.execute(subscription, true); 434 Synchronizer.execute(subscription, true);
432 } 435 }
433 }); 436 });
434 })(this); 437 })(this);
OLDNEW
« no previous file with comments | « background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld