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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/optional.h" | 16 #include "base/optional.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "content/browser/service_worker/service_worker_registration_status.h" | 18 #include "content/browser/service_worker/service_worker_registration_status.h" |
19 #include "content/common/service_worker/service_worker.mojom.h" | 19 #include "content/common/service_worker/service_worker.mojom.h" |
20 #include "content/common/service_worker/service_worker_types.h" | 20 #include "content/common/service_worker/service_worker_types.h" |
21 #include "content/public/browser/browser_message_filter.h" | 21 #include "content/public/browser/browser_message_filter.h" |
22 #include "mojo/public/cpp/bindings/associated_binding_set.h" | 22 #include "mojo/public/cpp/bindings/associated_binding_set.h" |
23 | 23 |
24 class GURL; | 24 class GURL; |
25 struct EmbeddedWorkerHostMsg_ReportConsoleMessage_Params; | |
26 | 25 |
27 namespace url { | 26 namespace url { |
28 class Origin; | 27 class Origin; |
29 } // namespace url | 28 } // namespace url |
30 | 29 |
31 namespace content { | 30 namespace content { |
32 | 31 |
33 class MessagePort; | 32 class MessagePort; |
34 class ResourceContext; | 33 class ResourceContext; |
35 class ServiceWorkerContextCore; | 34 class ServiceWorkerContextCore; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool enable); | 135 bool enable); |
137 void OnGetNavigationPreloadState(int thread_id, | 136 void OnGetNavigationPreloadState(int thread_id, |
138 int request_id, | 137 int request_id, |
139 int provider_id, | 138 int provider_id, |
140 int64_t registration_id); | 139 int64_t registration_id); |
141 void OnSetNavigationPreloadHeader(int thread_id, | 140 void OnSetNavigationPreloadHeader(int thread_id, |
142 int request_id, | 141 int request_id, |
143 int provider_id, | 142 int provider_id, |
144 int64_t registration_id, | 143 int64_t registration_id, |
145 const std::string& value); | 144 const std::string& value); |
146 void OnWorkerReadyForInspection(int embedded_worker_id); | |
147 void OnWorkerScriptLoaded(int embedded_worker_id); | |
148 void OnWorkerThreadStarted(int embedded_worker_id, | |
149 int thread_id, | |
150 int provider_id); | |
151 void OnWorkerScriptLoadFailed(int embedded_worker_id); | |
152 void OnWorkerScriptEvaluated(int embedded_worker_id, bool success); | |
153 void OnWorkerStarted(int embedded_worker_id); | |
154 void OnWorkerStopped(int embedded_worker_id); | |
155 void OnCountFeature(int64_t version_id, uint32_t feature); | 145 void OnCountFeature(int64_t version_id, uint32_t feature); |
156 void OnReportException(int embedded_worker_id, | |
157 const base::string16& error_message, | |
158 int line_number, | |
159 int column_number, | |
160 const GURL& source_url); | |
161 void OnReportConsoleMessage( | |
162 int embedded_worker_id, | |
163 const EmbeddedWorkerHostMsg_ReportConsoleMessage_Params& params); | |
164 void OnIncrementServiceWorkerRefCount(int handle_id); | 146 void OnIncrementServiceWorkerRefCount(int handle_id); |
165 void OnDecrementServiceWorkerRefCount(int handle_id); | 147 void OnDecrementServiceWorkerRefCount(int handle_id); |
166 void OnIncrementRegistrationRefCount(int registration_handle_id); | 148 void OnIncrementRegistrationRefCount(int registration_handle_id); |
167 void OnDecrementRegistrationRefCount(int registration_handle_id); | 149 void OnDecrementRegistrationRefCount(int registration_handle_id); |
168 void OnPostMessageToWorker( | 150 void OnPostMessageToWorker( |
169 int handle_id, | 151 int handle_id, |
170 int provider_id, | 152 int provider_id, |
171 const base::string16& message, | 153 const base::string16& message, |
172 const url::Origin& source_origin, | 154 const url::Origin& source_origin, |
173 const std::vector<MessagePort>& sent_message_ports); | 155 const std::vector<MessagePort>& sent_message_ports); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; | 269 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; |
288 | 270 |
289 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; | 271 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; |
290 | 272 |
291 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 273 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
292 }; | 274 }; |
293 | 275 |
294 } // namespace content | 276 } // namespace content |
295 | 277 |
296 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 278 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |