Left: | ||
Right: |
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-2017 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 * |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 /* Pages */ | 179 /* Pages */ |
180 | 180 |
181 var pages = Object.create(null); | 181 var pages = Object.create(null); |
182 var pageCounter = 0; | 182 var pageCounter = 0; |
183 | 183 |
184 var Page = function(id, tab, url) | 184 var Page = function(id, tab, url) |
185 { | 185 { |
186 this.id = id; | 186 this.id = id; |
187 this._tab = tab; | 187 this._tab = tab; |
188 this._frames = [{url: new URL(url), parent: null}]; | 188 this._frames = [{url: new URL(url), parent: null}]; |
189 this._messageProxy = null; | |
189 | 190 |
190 this.browserAction = new BrowserAction(this); | 191 this.browserAction = new BrowserAction(this); |
191 this.contextMenus = new ContextMenus(this); | 192 this.contextMenus = new ContextMenus(this); |
kzar
2017/05/19 12:33:05
I guess we should assign this._messageProxy to und
Manish Jethani
2017/05/19 23:58:48
Yeah, it'll always return undefined or a non-null
| |
192 }; | 193 }; |
193 Page.prototype = { | 194 Page.prototype = { |
194 get url() | 195 get url() |
195 { | 196 { |
196 return this._frames[0].url; | 197 return this._frames[0].url; |
197 }, | 198 }, |
198 sendMessage: function(message, responseCallback) | 199 sendMessage: function(message, responseCallback) |
199 { | 200 { |
200 var documentIds = []; | 201 var documentIds = []; |
201 for (var documentId in this._tab._documentLookup) | 202 for (var documentId in this._tab._documentLookup) |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 /* Windows */ | 613 /* Windows */ |
613 ext.windows = { | 614 ext.windows = { |
614 // Safari doesn't provide as rich a windows API as Chrome does, so instead | 615 // Safari doesn't provide as rich a windows API as Chrome does, so instead |
615 // of chrome.windows.create we have to fall back to just opening a new tab. | 616 // of chrome.windows.create we have to fall back to just opening a new tab. |
616 create: function(createData, callback) | 617 create: function(createData, callback) |
617 { | 618 { |
618 ext.pages.open(createData.url, callback); | 619 ext.pages.open(createData.url, callback); |
619 } | 620 } |
620 }; | 621 }; |
621 })(); | 622 })(); |
LEFT | RIGHT |