OLD | NEW |
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 |
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 /** | 18 /** |
19 * @fileOverview Stores Adblock Plus data to be attached to a window. | 19 * @fileOverview Stores Adblock Plus data to be attached to a window. |
20 */ | 20 */ |
21 | 21 |
22 let windowSelection = new WeakMap(); | 22 let windowSelection = new WeakMap(); |
23 let requestNotifierMaxId = 0; | 23 let requestNotifierMaxId = 0; |
24 | 24 |
25 /** | 25 /** |
26 * Active RequestNotifier instances by their ID | 26 * Active RequestNotifier instances by their ID |
27 * @type Map | 27 * @type Map.<number,RequestNotifier> |
28 */ | 28 */ |
29 let notifiers = new Map(); | 29 let notifiers = new Map(); |
30 | 30 |
31 let messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"] | 31 let messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"] |
32 .getService(Ci.nsIMessageListenerManager) | 32 .getService(Ci.nsIMessageListenerManager) |
33 .QueryInterface(Ci.nsIMessageBroadcaster); | 33 .QueryInterface(Ci.nsIMessageBroadcaster); |
34 messageManager.addMessageListener("AdblockPlus:FoundNodeData", onNodeData); | 34 messageManager.addMessageListener("AdblockPlus:FoundNodeData", onNodeData); |
35 messageManager.addMessageListener("AdblockPlus:ScanComplete", onScanComplete); | 35 messageManager.addMessageListener("AdblockPlus:ScanComplete", onScanComplete); |
36 | 36 |
37 onShutdown.add(() => { | 37 onShutdown.add(() => { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 node = node.parentNode; | 190 node = node.parentNode; |
191 } | 191 } |
192 else | 192 else |
193 { | 193 { |
194 node = null; | 194 node = null; |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 return null; | 198 return null; |
199 }; | 199 }; |
OLD | NEW |