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

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

Issue 668303004: WIP DO NOT COMMIT chromium side of navigator.connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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_dispatcher_host.h
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index d66593ed43638a1eee85d0a3fe93a693b08396ad..6004c6c89137b349338719b043daca2f97b1337f 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -118,6 +118,10 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
const std::vector<int>& sent_message_port_ids);
void OnServiceWorkerObjectDestroyed(int handle_id);
void OnTerminateWorker(int handle_id);
+ void OnNavigatorConnect(int thread_id,
+ int request_id,
+ const GURL& target_url,
+ int message_port_id);
ServiceWorkerRegistrationHandle* FindRegistrationHandle(
int provider_id,
@@ -161,6 +165,27 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
ServiceWorkerContextCore* GetContext();
+ struct NavigatorConnectParams {
+ NavigatorConnectParams(int thread_id, int request_id, int message_port_id)
+ : thread_id(thread_id),
+ request_id(request_id),
+ message_port_id(message_port_id) {}
+ int thread_id;
+ int request_id;
+ int message_port_id;
+ };
+
+ void NavigatorConnectGotRegistration(
+ const NavigatorConnectParams& params,
+ const GURL& target_url,
+ ServiceWorkerStatusCode status,
+ const scoped_refptr<ServiceWorkerRegistration>& registration);
+ void NavigatorConnectResult(
+ const NavigatorConnectParams& params,
+ const scoped_refptr<ServiceWorkerRegistration>& registration,
+ ServiceWorkerStatusCode status,
+ bool allow_connect);
+
int render_process_id_;
MessagePortMessageFilter* const message_port_message_filter_;
ResourceContext* resource_context_;

Powered by Google App Engine
This is Rietveld 408576698