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_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "content/child/worker_task_runner.h" | 14 #include "content/child/worker_task_runner.h" |
| 15 #include "content/common/service_worker/service_worker_status_code.h" |
15 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" | 16 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
16 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h" | 17 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h" |
17 #include "third_party/WebKit/public/platform/WebServiceWorkerState.h" | 18 #include "third_party/WebKit/public/platform/WebServiceWorkerState.h" |
18 | 19 |
19 class GURL; | 20 class GURL; |
20 | 21 |
21 namespace blink { | 22 namespace blink { |
22 class WebURL; | 23 class WebURL; |
23 } | 24 } |
24 | 25 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 friend class WebServiceWorkerRegistrationImpl; | 131 friend class WebServiceWorkerRegistrationImpl; |
131 | 132 |
132 // WorkerTaskRunner::Observer implementation. | 133 // WorkerTaskRunner::Observer implementation. |
133 virtual void OnWorkerRunLoopStopped() OVERRIDE; | 134 virtual void OnWorkerRunLoopStopped() OVERRIDE; |
134 | 135 |
135 void OnRegistered(int thread_id, | 136 void OnRegistered(int thread_id, |
136 int request_id, | 137 int request_id, |
137 const ServiceWorkerRegistrationObjectInfo& info, | 138 const ServiceWorkerRegistrationObjectInfo& info, |
138 const ServiceWorkerVersionAttributes& attrs); | 139 const ServiceWorkerVersionAttributes& attrs); |
139 void OnUnregistered(int thread_id, | 140 void OnUnregistered(int thread_id, |
140 int request_id); | 141 int request_id, |
| 142 ServiceWorkerStatusCode status); |
141 void OnRegistrationError(int thread_id, | 143 void OnRegistrationError(int thread_id, |
142 int request_id, | 144 int request_id, |
143 blink::WebServiceWorkerError::ErrorType error_type, | 145 blink::WebServiceWorkerError::ErrorType error_type, |
144 const base::string16& message); | 146 const base::string16& message); |
145 void OnUnregistrationError(int thread_id, | 147 void OnUnregistrationError(int thread_id, |
146 int request_id, | 148 int request_id, |
147 blink::WebServiceWorkerError::ErrorType error_type, | 149 blink::WebServiceWorkerError::ErrorType error_type, |
148 const base::string16& message); | 150 const base::string16& message); |
149 void OnServiceWorkerStateChanged(int thread_id, | 151 void OnServiceWorkerStateChanged(int thread_id, |
150 int handle_id, | 152 int handle_id, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 WorkerToProviderMap worker_to_provider_; | 203 WorkerToProviderMap worker_to_provider_; |
202 | 204 |
203 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 205 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
204 | 206 |
205 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); | 207 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); |
206 }; | 208 }; |
207 | 209 |
208 } // namespace content | 210 } // namespace content |
209 | 211 |
210 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 212 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
OLD | NEW |