| 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 <stdint.h> |
| 9 |
| 8 #include <map> | 10 #include <map> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/id_map.h" | 13 #include "base/id_map.h" |
| 14 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 13 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 14 #include "content/public/child/worker_thread.h" | 17 #include "content/public/child/worker_thread.h" |
| 15 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerError.h" | 18 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerError.h" |
| 16 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerProvider.h" | 19 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerProvider.h" |
| 17 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" | 20 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" |
| 18 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerState.h" | 21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerState.h" |
| 19 | 22 |
| 20 class GURL; | 23 class GURL; |
| 21 | 24 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void OnMessageReceived(const IPC::Message& msg); | 75 void OnMessageReceived(const IPC::Message& msg); |
| 73 | 76 |
| 74 // Corresponds to navigator.serviceWorker.register(). | 77 // Corresponds to navigator.serviceWorker.register(). |
| 75 void RegisterServiceWorker( | 78 void RegisterServiceWorker( |
| 76 int provider_id, | 79 int provider_id, |
| 77 const GURL& pattern, | 80 const GURL& pattern, |
| 78 const GURL& script_url, | 81 const GURL& script_url, |
| 79 WebServiceWorkerRegistrationCallbacks* callbacks); | 82 WebServiceWorkerRegistrationCallbacks* callbacks); |
| 80 // Corresponds to ServiceWorkerRegistration.update(). | 83 // Corresponds to ServiceWorkerRegistration.update(). |
| 81 void UpdateServiceWorker(int provider_id, | 84 void UpdateServiceWorker(int provider_id, |
| 82 int64 registration_id, | 85 int64_t registration_id, |
| 83 WebServiceWorkerUpdateCallbacks* callbacks); | 86 WebServiceWorkerUpdateCallbacks* callbacks); |
| 84 // Corresponds to ServiceWorkerRegistration.unregister(). | 87 // Corresponds to ServiceWorkerRegistration.unregister(). |
| 85 void UnregisterServiceWorker( | 88 void UnregisterServiceWorker( |
| 86 int provider_id, | 89 int provider_id, |
| 87 int64 registration_id, | 90 int64_t registration_id, |
| 88 WebServiceWorkerUnregistrationCallbacks* callbacks); | 91 WebServiceWorkerUnregistrationCallbacks* callbacks); |
| 89 // Corresponds to navigator.serviceWorker.getRegistration(). | 92 // Corresponds to navigator.serviceWorker.getRegistration(). |
| 90 void GetRegistration(int provider_id, | 93 void GetRegistration(int provider_id, |
| 91 const GURL& document_url, | 94 const GURL& document_url, |
| 92 WebServiceWorkerGetRegistrationCallbacks* callbacks); | 95 WebServiceWorkerGetRegistrationCallbacks* callbacks); |
| 93 // Corresponds to navigator.serviceWorker.getRegistrations(). | 96 // Corresponds to navigator.serviceWorker.getRegistrations(). |
| 94 void GetRegistrations( | 97 void GetRegistrations( |
| 95 int provider_id, | 98 int provider_id, |
| 96 WebServiceWorkerGetRegistrationsCallbacks* callbacks); | 99 WebServiceWorkerGetRegistrationsCallbacks* callbacks); |
| 97 | 100 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 273 |
| 271 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 274 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 272 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 275 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 273 | 276 |
| 274 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); | 277 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); |
| 275 }; | 278 }; |
| 276 | 279 |
| 277 } // namespace content | 280 } // namespace content |
| 278 | 281 |
| 279 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 282 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
| OLD | NEW |