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

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: 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
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..367a0e947d7d43cd9e8058b4ca57b8de149e6a9c 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
+ */
+ dispatchPushEvent: function(registrationId, data)
+ {
+ var registration = this._registrations.get(registrationId);
+ if (!registration)
+ return;
+ var origin = WebInspector.ParsedURL.splitURLIntoPathComponents(registration.scopeURL)[0];
+ this._agent.dispatchPushEvent(origin, registrationId, data);
+ },
+
/**
* @param {string} scope
*/

Powered by Google App Engine
This is Rietveld 408576698