OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 using StatusCallback = base::Callback<void(ServiceWorkerStatusCode status)>; | 96 using StatusCallback = base::Callback<void(ServiceWorkerStatusCode status)>; |
97 enum class ProviderStatus { OK, NO_CONTEXT, DEAD_HOST, NO_HOST, NO_URL }; | 97 enum class ProviderStatus { OK, NO_CONTEXT, DEAD_HOST, NO_HOST, NO_URL }; |
98 | 98 |
99 // Called when mojom::ServiceWorkerDispatcherHostPtr is created on the | 99 // Called when mojom::ServiceWorkerDispatcherHostPtr is created on the |
100 // renderer-side. | 100 // renderer-side. |
101 void AddMojoBinding(mojo::ScopedInterfaceEndpointHandle handle); | 101 void AddMojoBinding(mojo::ScopedInterfaceEndpointHandle handle); |
102 | 102 |
103 // mojom::ServiceWorkerDispatcherHost implementation | 103 // mojom::ServiceWorkerDispatcherHost implementation |
104 void OnProviderCreated(ServiceWorkerProviderHostInfo info) override; | 104 void OnProviderCreated(ServiceWorkerProviderHostInfo info) override; |
105 void OnProviderDestroyed(int provider_id) override; | |
106 void OnSetHostedVersionId(int provider_id, | 105 void OnSetHostedVersionId(int provider_id, |
107 int64_t version_id, | 106 int64_t version_id, |
108 int embedded_worker_id) override; | 107 int embedded_worker_id) override; |
109 | 108 |
110 // IPC Message handlers | 109 // IPC Message handlers |
111 void OnRegisterServiceWorker(int thread_id, | 110 void OnRegisterServiceWorker(int thread_id, |
112 int request_id, | 111 int request_id, |
113 int provider_id, | 112 int provider_id, |
114 const GURL& pattern, | 113 const GURL& pattern, |
115 const GURL& script_url); | 114 const GURL& script_url); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; | 286 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; |
288 | 287 |
289 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; | 288 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; |
290 | 289 |
291 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 290 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
292 }; | 291 }; |
293 | 292 |
294 } // namespace content | 293 } // namespace content |
295 | 294 |
296 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 295 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |