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

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: 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 9ac8315eabe0b1994c57253cc5c6f874c228dd01..c90a263fe8ce124612c4b31afe509be1ab56bc79 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 install event to the associated embedded worker and asynchronously
// calls |callback| when it errors out or it gets a response from the worker
// to notify install completion.
@@ -538,6 +549,10 @@ class CONTENT_EXPORT ServiceWorkerVersion
void DispatchInstallEventAfterStartWorker(const StatusCallback& callback);
void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
+ void DispatchExtendableMessageEventAfterStartWorker(
+ const base::string16& message,
+ const std::vector<TransferredMessagePort>& sent_message_ports,
+ const StatusCallback& callback);
void DispatchMessageEventInternal(
const base::string16& message,

Powered by Google App Engine
This is Rietveld 408576698