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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 1632113004: ServiceWorker: Add initial implementation of ExtendableMessageEvent behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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: content/browser/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 3b52fe8ff9f2e853b694e4205add81c3ac566471..4a9c2917b269644d51bbcc8b8a5dd904b5bf40fa 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -236,11 +236,22 @@ class CONTENT_EXPORT ServiceWorkerVersion
void DispatchSimpleEvent(int request_id, const IPC::Message& message);
// Sends a message event to the associated embedded worker.
+ // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by
+ // default (crbug.com/543198).
void DispatchMessageEvent(
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports,
const StatusCallback& callback);
+ // Sends an extendable message event to the associated embedded worker.
+ // TODO(nhiroki): This should be moved to ServiceWorkerDispatcherHost in favor
+ // of crbug.com/570820 after ExtendableMessageEvent is implemented
+ // (crbug.com/543198).
+ void DispatchExtendableMessageEvent(
+ const base::string16& message,
+ const std::vector<TransferredMessagePort>& sent_message_ports,
+ const StatusCallback& callback);
+
// Sends fetch event to the associated embedded worker and calls
// |callback| with the response from the worker.
//
@@ -514,6 +525,11 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnStartSentAndScriptEvaluated(ServiceWorkerStatusCode status);
+ void DispatchExtendableMessageEventAfterStartWorker(
+ const base::string16& message,
+ const std::vector<TransferredMessagePort>& sent_message_ports,
+ const StatusCallback& callback);
+
void DispatchMessageEventInternal(
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports,
« no previous file with comments | « content/browser/service_worker/service_worker_metrics.cc ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698