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 4adbca66eaf621e138c02347a4a617e915d72545..d2f6ce89ec56973f32f77903fcde0069726bab28 100644 |
--- a/content/browser/service_worker/service_worker_version.h |
+++ b/content/browser/service_worker/service_worker_version.h |
@@ -55,6 +55,8 @@ class CONTENT_EXPORT ServiceWorkerVersion |
typedef base::Callback<void(ServiceWorkerStatusCode, |
ServiceWorkerFetchEventResult, |
const ServiceWorkerResponse&)> FetchCallback; |
+ typedef base::Callback<void(ServiceWorkerStatusCode, bool)> |
+ CrossOriginConnectCallback; |
enum RunningStatus { |
STOPPED = EmbeddedWorkerInstance::STOPPED, |
@@ -160,6 +162,11 @@ class CONTENT_EXPORT ServiceWorkerVersion |
const std::vector<int>& sent_message_port_ids, |
const StatusCallback& callback); |
+ void SendCrossOriginMessage(const CrossOriginServiceWorkerClient& client, |
+ const base::string16& message, |
+ const std::vector<int>& sent_message_port_ids, |
+ 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. |
@@ -215,6 +222,11 @@ class CONTENT_EXPORT ServiceWorkerVersion |
void DispatchPushEvent(const StatusCallback& callback, |
const std::string& data); |
+ void DispatchCrossOriginConnectEvent( |
+ const CrossOriginConnectCallback& callback, |
+ const GURL& target_url, |
+ int message_port_id); |
+ |
// Sends geofencing event to the associated embedded worker and asynchronously |
// calls |callback| when it errors out or it gets a response from the worker |
// to notify completion. |
@@ -299,6 +311,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
void OnPushEventFinished(int request_id, |
blink::WebServiceWorkerEventResult result); |
void OnGeofencingEventFinished(int request_id); |
+ void OnCrossOriginConnectEventFinished(int request_id, bool allow_connect); |
void OnPostMessageToDocument(int client_id, |
const base::string16& message, |
const std::vector<int>& sent_message_port_ids); |
@@ -325,6 +338,8 @@ class CONTENT_EXPORT ServiceWorkerVersion |
IDMap<StatusCallback, IDMapOwnPointer> notification_click_callbacks_; |
IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_; |
IDMap<StatusCallback, IDMapOwnPointer> geofencing_callbacks_; |
+ IDMap<CrossOriginConnectCallback, IDMapOwnPointer> |
+ cross_origin_connect_callbacks_; |
ControlleeMap controllee_map_; |
ControlleeByIDMap controllee_by_id_; |