| 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> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 base::SingleThreadTaskRunner* main_thread_task_runner); | 79 base::SingleThreadTaskRunner* main_thread_task_runner); |
| 80 ~ServiceWorkerDispatcher() override; | 80 ~ServiceWorkerDispatcher() override; |
| 81 | 81 |
| 82 void OnMessageReceived(const IPC::Message& msg); | 82 void OnMessageReceived(const IPC::Message& msg); |
| 83 | 83 |
| 84 // Corresponds to navigator.serviceWorker.register(). | 84 // Corresponds to navigator.serviceWorker.register(). |
| 85 void RegisterServiceWorker( | 85 void RegisterServiceWorker( |
| 86 int provider_id, | 86 int provider_id, |
| 87 const GURL& pattern, | 87 const GURL& pattern, |
| 88 const GURL& script_url, | 88 const GURL& script_url, |
| 89 WebServiceWorkerRegistrationCallbacks* callbacks); | 89 std::unique_ptr<WebServiceWorkerRegistrationCallbacks> callbacks); |
| 90 // Corresponds to ServiceWorkerRegistration.update(). | 90 // Corresponds to ServiceWorkerRegistration.update(). |
| 91 void UpdateServiceWorker(int provider_id, | 91 void UpdateServiceWorker( |
| 92 int64_t registration_id, | 92 int provider_id, |
| 93 WebServiceWorkerUpdateCallbacks* callbacks); | 93 int64_t registration_id, |
| 94 std::unique_ptr<WebServiceWorkerUpdateCallbacks> callbacks); |
| 94 // Corresponds to ServiceWorkerRegistration.unregister(). | 95 // Corresponds to ServiceWorkerRegistration.unregister(). |
| 95 void UnregisterServiceWorker( | 96 void UnregisterServiceWorker( |
| 96 int provider_id, | 97 int provider_id, |
| 97 int64_t registration_id, | 98 int64_t registration_id, |
| 98 WebServiceWorkerUnregistrationCallbacks* callbacks); | 99 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks> callbacks); |
| 99 // Corresponds to navigator.serviceWorker.getRegistration(). | 100 // Corresponds to navigator.serviceWorker.getRegistration(). |
| 100 void GetRegistration(int provider_id, | 101 void GetRegistration( |
| 101 const GURL& document_url, | 102 int provider_id, |
| 102 WebServiceWorkerGetRegistrationCallbacks* callbacks); | 103 const GURL& document_url, |
| 104 std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks> callbacks); |
| 103 // Corresponds to navigator.serviceWorker.getRegistrations(). | 105 // Corresponds to navigator.serviceWorker.getRegistrations(). |
| 104 void GetRegistrations( | 106 void GetRegistrations( |
| 105 int provider_id, | 107 int provider_id, |
| 106 WebServiceWorkerGetRegistrationsCallbacks* callbacks); | 108 std::unique_ptr<WebServiceWorkerGetRegistrationsCallbacks> callbacks); |
| 107 | 109 |
| 108 void GetRegistrationForReady( | 110 void GetRegistrationForReady( |
| 109 int provider_id, | 111 int provider_id, |
| 110 WebServiceWorkerGetRegistrationForReadyCallbacks* callbacks); | 112 std::unique_ptr<WebServiceWorkerGetRegistrationForReadyCallbacks> |
| 113 callbacks); |
| 111 | 114 |
| 112 // Corresponds to NavigationPreloadManager.enable/disable. | 115 // Corresponds to NavigationPreloadManager.enable/disable. |
| 113 void EnableNavigationPreload( | 116 void EnableNavigationPreload( |
| 114 int provider_id, | 117 int provider_id, |
| 115 int64_t registration_id, | 118 int64_t registration_id, |
| 116 bool enable, | 119 bool enable, |
| 117 std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks); | 120 std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks); |
| 118 // Corresponds to NavigationPreloadManager.getState. | 121 // Corresponds to NavigationPreloadManager.getState. |
| 119 void GetNavigationPreloadState( | 122 void GetNavigationPreloadState( |
| 120 int provider_id, | 123 int provider_id, |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 331 |
| 329 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 332 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 330 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 333 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 331 | 334 |
| 332 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); | 335 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); |
| 333 }; | 336 }; |
| 334 | 337 |
| 335 } // namespace content | 338 } // namespace content |
| 336 | 339 |
| 337 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 340 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
| OLD | NEW |