LEFT | RIGHT |
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 Cu.import("resource://gre/modules/Services.jsm"); | |
23 | |
24 let {Utils} = require("utils"); | 22 let {Utils} = require("utils"); |
25 let {BlockingFilter, WhitelistFilter, ElemHideBase, ElemHideFilter, ElemHideExce
ption} = require("filterClasses"); | 23 let {BlockingFilter, WhitelistFilter, ElemHideBase, ElemHideFilter, ElemHideExce
ption} = require("filterClasses"); |
26 | 24 |
27 let nodeData = new WeakMap(); | 25 let nodeData = new WeakMap(); |
28 let windowStats = new WeakMap(); | 26 let windowStats = new WeakMap(); |
29 let windowSelection = new WeakMap(); | 27 let windowSelection = new WeakMap(); |
30 let requestEntryMaxId = 0; | 28 let requestEntryMaxId = 0; |
31 | 29 |
32 /** | 30 /** |
33 * List of notifiers in use - these notifiers need to receive notifications on | 31 * List of notifiers in use - these notifiers need to receive notifications on |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 if (typeof existingData == "undefined") | 329 if (typeof existingData == "undefined") |
332 { | 330 { |
333 existingData = {}; | 331 existingData = {}; |
334 nodeData.set(node, existingData); | 332 nodeData.set(node, existingData); |
335 } | 333 } |
336 | 334 |
337 // Add this request to the node data | 335 // Add this request to the node data |
338 existingData[this.type + " " + this.location] = this; | 336 existingData[this.type + " " + this.location] = this; |
339 } | 337 } |
340 }; | 338 }; |
LEFT | RIGHT |