Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1242)

Unified Diff: Source/devtools/front_end/sdk/ServiceWorkerManager.js

Issue 1079013002: Add "emulate push event" button to ServiceWorkersView in DevTools [2/2 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: s/dispatchPushEvent/deliverPushMessage/ Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/resources/serviceWorkersView.css ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/ServiceWorkerManager.js
diff --git a/Source/devtools/front_end/sdk/ServiceWorkerManager.js b/Source/devtools/front_end/sdk/ServiceWorkerManager.js
index bb8c6c4f61aabfc76c5fb210683e3c3676f49e43..dffa436b84c5f0c29c90b8c6f28b520f7a4c7772 100644
--- a/Source/devtools/front_end/sdk/ServiceWorkerManager.js
+++ b/Source/devtools/front_end/sdk/ServiceWorkerManager.js
@@ -137,6 +137,19 @@ WebInspector.ServiceWorkerManager.prototype = {
this._unregister(registration.scopeURL);
},
+ /**
+ * @param {string} registrationId
+ * @param {string} data
+ */
+ deliverPushMessage: function(registrationId, data)
+ {
+ var registration = this._registrations.get(registrationId);
+ if (!registration)
+ return;
+ var origin = WebInspector.ParsedURL.splitURLIntoPathComponents(registration.scopeURL)[0];
+ this._agent.deliverPushMessage(origin, registrationId, data);
+ },
+
/**
* @param {string} scope
*/
« no previous file with comments | « Source/devtools/front_end/resources/serviceWorkersView.css ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698