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

Unified Diff: desktop-options.js

Issue 29573726: Issue 4580 - Replace ext.backgroundPage.sendMessage with runtime.sendMessage (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Rebase Created Oct. 13, 2017, 5:07 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « composer.postload.js ('k') | ext/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: desktop-options.js
===================================================================
--- a/desktop-options.js
+++ b/desktop-options.js
@@ -45,17 +45,17 @@
let lastArg = paramValues[paramValues.length - 1];
if (typeof lastArg == "function")
callback = lastArg;
for (let i = 0; i < paramValues.length - (callback ? 1 : 0); i++)
message[paramKeys[i]] = paramValues[i];
}
- ext.backgroundPage.sendMessage(message, callback);
+ chrome.runtime.sendMessage(message, callback);
};
}
const getDocLink = wrapper({type: "app.get", what: "doclink"}, "link");
const getInfo = wrapper({type: "app.get"}, "what");
const getPref = wrapper({type: "prefs.get"}, "key");
const togglePref = wrapper({type: "prefs.toggle"}, "key");
const getSubscriptions = wrapper({type: "subscriptions.get"},
@@ -156,30 +156,30 @@
});
getPref("notifications_showui", showNotificationsUI =>
{
if (!showNotificationsUI)
document.getElementById("shouldShowNotificationsContainer").hidden = true;
});
// Register listeners in the background message responder
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "app.listen",
filter: ["addSubscription", "focusSection"]
});
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "filters.listen",
filter: ["added", "loaded", "removed"]
});
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "prefs.listen",
filter: ["notifications_ignoredcategories", "notifications_showui",
"show_devtools_panel", "shouldShowBlockElementMenu"]
});
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "subscriptions.listen",
filter: ["added", "disabled", "homepage", "lastDownload", "removed",
"title", "downloadStatus", "downloading"]
});
// Load recommended subscriptions
loadRecommendations();
« no previous file with comments | « composer.postload.js ('k') | ext/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld