OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Called on the main thread. | 84 // Called on the main thread. |
85 ServiceWorkerContextClient( | 85 ServiceWorkerContextClient( |
86 int embedded_worker_id, | 86 int embedded_worker_id, |
87 int64_t service_worker_version_id, | 87 int64_t service_worker_version_id, |
88 const GURL& service_worker_scope, | 88 const GURL& service_worker_scope, |
89 const GURL& script_url, | 89 const GURL& script_url, |
90 int worker_devtools_agent_route_id, | 90 int worker_devtools_agent_route_id, |
91 mojom::ServiceWorkerEventDispatcherRequest dispatcher_request, | 91 mojom::ServiceWorkerEventDispatcherRequest dispatcher_request, |
92 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client); | 92 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client); |
93 ServiceWorkerContextClient(int embedded_worker_id, | |
94 int64_t service_worker_version_id, | |
95 const GURL& service_worker_scope, | |
96 const GURL& script_url, | |
97 int worker_devtools_agent_route_id); | |
98 ~ServiceWorkerContextClient() override; | 93 ~ServiceWorkerContextClient() override; |
99 | 94 |
100 void OnMessageReceived(int thread_id, | 95 void OnMessageReceived(int thread_id, |
101 int embedded_worker_id, | 96 int embedded_worker_id, |
102 const IPC::Message& message); | 97 const IPC::Message& message); |
103 | 98 |
104 // Called after the worker has started. | |
105 void BindEventDispatcher(mojom::ServiceWorkerEventDispatcherRequest request); | |
106 | |
107 // WebServiceWorkerContextClient overrides. | 99 // WebServiceWorkerContextClient overrides. |
108 blink::WebURL scope() const override; | 100 blink::WebURL scope() const override; |
109 void getClient( | 101 void getClient( |
110 const blink::WebString&, | 102 const blink::WebString&, |
111 std::unique_ptr<blink::WebServiceWorkerClientCallbacks>) override; | 103 std::unique_ptr<blink::WebServiceWorkerClientCallbacks>) override; |
112 void getClients( | 104 void getClients( |
113 const blink::WebServiceWorkerClientQueryOptions&, | 105 const blink::WebServiceWorkerClientQueryOptions&, |
114 std::unique_ptr<blink::WebServiceWorkerClientsCallbacks>) override; | 106 std::unique_ptr<blink::WebServiceWorkerClientsCallbacks>) override; |
115 void openWindow( | 107 void openWindow( |
116 const blink::WebURL&, | 108 const blink::WebURL&, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // Initialized on the worker thread in workerContextStarted and | 291 // Initialized on the worker thread in workerContextStarted and |
300 // destructed on the worker thread in willDestroyWorkerContext. | 292 // destructed on the worker thread in willDestroyWorkerContext. |
301 std::unique_ptr<WorkerContextData> context_; | 293 std::unique_ptr<WorkerContextData> context_; |
302 | 294 |
303 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 295 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
304 }; | 296 }; |
305 | 297 |
306 } // namespace content | 298 } // namespace content |
307 | 299 |
308 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 300 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |