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

Unified Diff: desktop-options.js

Issue 29536764: Issue 5587, 5748 - Use mobile options page on Firefox for Android (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Use ping messages to sync up Created Sept. 26, 2017, 8:22 p.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 | « desktop-options.html ('k') | ext/background.js » ('j') | lib/options.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: desktop-options.js
===================================================================
copy from options.js
copy to desktop-options.js
--- a/options.js
+++ b/desktop-options.js
@@ -740,8 +740,19 @@
case "prefs.respond":
onPrefMessage(message.action, message.args[0]);
break;
case "subscriptions.respond":
onSubscriptionMessage(message.action, message.args[0]);
break;
}
});
+
+$(() =>
Manish Jethani 2017/09/26 20:37:16 As the last thing in this script, we add a listene
Sebastian Noack 2017/09/27 01:38:34 Perhaps we don't even need this. All, the old opt
Manish Jethani 2017/09/27 11:20:54 We could use "app.listen" in lieu of "ping" here.
+{
+ ext.onMessage.addListener((message, sender, sendResponse) =>
+ {
+ if (message.type == "ping")
+ sendResponse(true);
Manish Jethani 2017/09/26 20:37:15 We also have to respond to any ping we receive.
+ });
+
+ ext.backgroundPage.sendMessage({type: "ping"});
+});
« no previous file with comments | « desktop-options.html ('k') | ext/background.js » ('j') | lib/options.js » ('J')

Powered by Google App Engine
This is Rietveld