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

Side by Side Diff: safari/ext/common.js

Issue 29338621: Issue 3788 - Keep track of Safari tabs without canLoad (Closed)
Patch Set: Strip useless "0." prefix from documentIds Created March 18, 2016, 7:52 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 | « safari/ext/background.js ('k') | safari/ext/content.js » ('j') | 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 11 matching lines...) Expand all
22 var MessageProxy = ext._MessageProxy = function(messageDispatcher) 22 var MessageProxy = ext._MessageProxy = function(messageDispatcher)
23 { 23 {
24 this._messageDispatcher = messageDispatcher; 24 this._messageDispatcher = messageDispatcher;
25 this._responseCallbacks = Object.create(null); 25 this._responseCallbacks = Object.create(null);
26 this._responseCallbackCounter = 0; 26 this._responseCallbackCounter = 0;
27 }; 27 };
28 MessageProxy.prototype = { 28 MessageProxy.prototype = {
29 _sendResponse: function(request, message) 29 _sendResponse: function(request, message)
30 { 30 {
31 var response = {}; 31 var response = {};
32
33 if ("documentId" in request)
34 response["targetDocuments"] = [request["documentId"]];
35
32 for (var prop in request) 36 for (var prop in request)
33 response[prop] = request[prop]; 37 response[prop] = request[prop];
34 response.payload = message; 38 response.payload = message;
35 39
36 this._messageDispatcher.dispatchMessage("response", response); 40 this._messageDispatcher.dispatchMessage("response", response);
37 }, 41 },
38 handleRequest: function(request, sender) 42 handleRequest: function(request, sender)
39 { 43 {
40 if ("callbackId" in request) 44 if ("callbackId" in request)
41 { 45 {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 }; 218 };
215 219
216 220
217 /* Utils */ 221 /* Utils */
218 222
219 ext.getURL = function(path) 223 ext.getURL = function(path)
220 { 224 {
221 return safari.extension.baseURI + path; 225 return safari.extension.baseURI + path;
222 }; 226 };
223 })(); 227 })();
OLDNEW
« no previous file with comments | « safari/ext/background.js ('k') | safari/ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld