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

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

Issue 1235803003: ServiceWorker: Introduce ExtendableMessageEvent to replace MessageEvent Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 c11b4efa1204b263f951eabde1fbf42c5c33298d..0660340f4327493cd4a950a1018975cd6176b26b 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -175,6 +175,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
// Sends a message event to the associated embedded worker.
void DispatchMessageEvent(
+ ServiceWorkerProviderHost* provider_host,
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports,
const StatusCallback& callback);
@@ -370,7 +371,8 @@ class CONTENT_EXPORT ServiceWorkerVersion
REQUEST_NOTIFICATION_CLICK,
REQUEST_PUSH,
REQUEST_GEOFENCING,
- REQUEST_CROSS_ORIGIN_CONNECT
+ REQUEST_CROSS_ORIGIN_CONNECT,
+ REQUEST_MESSAGE,
};
struct RequestInfo {
@@ -411,9 +413,16 @@ class CONTENT_EXPORT ServiceWorkerVersion
void DispatchInstallEventAfterStartWorker(const StatusCallback& callback);
void DispatchActivateEventAfterStartWorker(const StatusCallback& callback);
- void DispatchMessageEventInternal(
+ void DispatchClientMessageEventInternal(
const base::string16& message,
const std::vector<TransferredMessagePort>& sent_message_ports,
+ const std::string& client_uuid,
+ const StatusCallback& callback,
+ const ServiceWorkerClientInfo& client_info);
+ void DispatchWorkerMessageEventInternal(
+ const base::string16& message,
+ const std::vector<TransferredMessagePort>& sent_message_ports,
+ const ServiceWorkerObjectInfo& worker_info,
const StatusCallback& callback);
// Message handlers.
@@ -437,6 +446,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnGeofencingEventFinished(int request_id);
void OnCrossOriginConnectEventFinished(int request_id,
bool accept_connection);
+ void OnMessageEventFinished(int request_id);
void OnOpenWindow(int request_id, GURL url);
void DidOpenWindow(int request_id,
int render_process_id,
@@ -552,6 +562,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_;
IDMap<CrossOriginConnectCallback, IDMapOwnPointer>
cross_origin_connect_callbacks_;
+ IDMap<StatusCallback, IDMapOwnPointer> message_callbacks_;
std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_;

Powered by Google App Engine
This is Rietveld 408576698