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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // IPC Message handlers | 66 // IPC Message handlers |
67 void OnRegisterServiceWorker(int thread_id, | 67 void OnRegisterServiceWorker(int thread_id, |
68 int request_id, | 68 int request_id, |
69 int provider_id, | 69 int provider_id, |
70 const GURL& pattern, | 70 const GURL& pattern, |
71 const GURL& script_url); | 71 const GURL& script_url); |
72 void OnUnregisterServiceWorker(int thread_id, | 72 void OnUnregisterServiceWorker(int thread_id, |
73 int request_id, | 73 int request_id, |
74 int provider_id, | 74 int provider_id, |
75 const GURL& pattern); | 75 const GURL& pattern); |
| 76 void OnGetRegistration(int thread_id, |
| 77 int request_id, |
| 78 int provider_id, |
| 79 const GURL& document_url); |
76 void OnProviderCreated(int provider_id); | 80 void OnProviderCreated(int provider_id); |
77 void OnProviderDestroyed(int provider_id); | 81 void OnProviderDestroyed(int provider_id); |
78 void OnSetHostedVersionId(int provider_id, int64 version_id); | 82 void OnSetHostedVersionId(int provider_id, int64 version_id); |
79 void OnWorkerReadyForInspection(int embedded_worker_id); | 83 void OnWorkerReadyForInspection(int embedded_worker_id); |
80 void OnWorkerScriptLoaded(int embedded_worker_id, int thread_id); | 84 void OnWorkerScriptLoaded(int embedded_worker_id, int thread_id); |
81 void OnWorkerScriptLoadFailed(int embedded_worker_id); | 85 void OnWorkerScriptLoadFailed(int embedded_worker_id); |
82 void OnWorkerStarted(int embedded_worker_id); | 86 void OnWorkerStarted(int embedded_worker_id); |
83 void OnWorkerStopped(int embedded_worker_id); | 87 void OnWorkerStopped(int embedded_worker_id); |
84 void OnPausedAfterDownload(int embedded_worker_id); | 88 void OnPausedAfterDownload(int embedded_worker_id); |
85 void OnReportException(int embedded_worker_id, | 89 void OnReportException(int embedded_worker_id, |
(...skipping 25 matching lines...) Expand all Loading... |
111 int provider_id, | 115 int provider_id, |
112 int request_id, | 116 int request_id, |
113 ServiceWorkerStatusCode status, | 117 ServiceWorkerStatusCode status, |
114 int64 registration_id, | 118 int64 registration_id, |
115 int64 version_id); | 119 int64 version_id); |
116 | 120 |
117 void UnregistrationComplete(int thread_id, | 121 void UnregistrationComplete(int thread_id, |
118 int request_id, | 122 int request_id, |
119 ServiceWorkerStatusCode status); | 123 ServiceWorkerStatusCode status); |
120 | 124 |
| 125 void GetRegistrationComplete(int thread_id, |
| 126 int provider_id, |
| 127 int request_id, |
| 128 ServiceWorkerStatusCode status, |
| 129 int64 registration_id); |
| 130 |
121 void SendRegistrationError(int thread_id, | 131 void SendRegistrationError(int thread_id, |
122 int request_id, | 132 int request_id, |
123 ServiceWorkerStatusCode status); | 133 ServiceWorkerStatusCode status); |
124 | 134 |
125 ServiceWorkerContextCore* GetContext(); | 135 ServiceWorkerContextCore* GetContext(); |
126 | 136 |
127 int render_process_id_; | 137 int render_process_id_; |
128 MessagePortMessageFilter* const message_port_message_filter_; | 138 MessagePortMessageFilter* const message_port_message_filter_; |
129 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; | 139 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; |
130 | 140 |
131 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; | 141 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; |
132 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_; | 142 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_; |
133 | 143 |
134 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. | 144 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. |
135 ScopedVector<IPC::Message> pending_messages_; | 145 ScopedVector<IPC::Message> pending_messages_; |
136 | 146 |
137 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 147 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
138 }; | 148 }; |
139 | 149 |
140 } // namespace content | 150 } // namespace content |
141 | 151 |
142 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 152 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |