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

Delta Between Two Patch Sets: messageResponder.js

Issue 29339099: Noissue - Rename message type when propagating events to the content script (Closed)
Left Patch Set: Created March 29, 2016, 10:59 a.m.
Right Patch Set: Rename *.event to *.respond Created March 29, 2016, 11:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « firstRun.js ('k') | options.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 var convertSubscription = convertObject.bind(null, ["disabled", 67 var convertSubscription = convertObject.bind(null, ["disabled",
68 "downloadStatus", "homepage", "lastDownload", "title", "url"]); 68 "downloadStatus", "homepage", "lastDownload", "title", "url"]);
69 var convertFilter = convertObject.bind(null, ["text"]); 69 var convertFilter = convertObject.bind(null, ["text"]);
70 70
71 var changeListeners = new global.ext.PageMap(); 71 var changeListeners = new global.ext.PageMap();
72 var listenedPreferences = Object.create(null); 72 var listenedPreferences = Object.create(null);
73 var listenedFilterChanges = Object.create(null); 73 var listenedFilterChanges = Object.create(null);
74 var messageTypes = { 74 var messageTypes = {
75 "app": "app.event", 75 "app": "app.respond",
76 "filter": "filters.event", 76 "filter": "filters.respond",
77 "pref": "prefs.event", 77 "pref": "prefs.respond",
78 "subscription": "subscriptions.event" 78 "subscription": "subscriptions.respond"
79 }; 79 };
80 80
81 function sendMessage(type, action) 81 function sendMessage(type, action)
82 { 82 {
83 var pages = changeListeners.keys(); 83 var pages = changeListeners.keys();
84 if (pages.length == 0) 84 if (pages.length == 0)
85 return; 85 return;
86 86
87 var args = []; 87 var args = [];
88 for (var i = 2; i < arguments.length; i++) 88 for (var i = 2; i < arguments.length; i++)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 if (subscription instanceof DownloadableSubscription) 395 if (subscription instanceof DownloadableSubscription)
396 Synchronizer.execute(subscription, true); 396 Synchronizer.execute(subscription, true);
397 } 397 }
398 break; 398 break;
399 case "subscriptions.isDownloading": 399 case "subscriptions.isDownloading":
400 callback(Synchronizer.isExecuting(message.url)); 400 callback(Synchronizer.isExecuting(message.url));
401 break; 401 break;
402 } 402 }
403 }); 403 });
404 })(this); 404 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld