| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 int provider_id, | 136 int provider_id, |
| 137 ServiceWorkerRegistration* registration, | 137 ServiceWorkerRegistration* registration, |
| 138 ServiceWorkerRegistrationObjectInfo* info, | 138 ServiceWorkerRegistrationObjectInfo* info, |
| 139 ServiceWorkerVersionAttributes* attrs); | 139 ServiceWorkerVersionAttributes* attrs); |
| 140 | 140 |
| 141 // Callbacks from ServiceWorkerContextCore | 141 // Callbacks from ServiceWorkerContextCore |
| 142 void RegistrationComplete(int thread_id, | 142 void RegistrationComplete(int thread_id, |
| 143 int provider_id, | 143 int provider_id, |
| 144 int request_id, | 144 int request_id, |
| 145 ServiceWorkerStatusCode status, | 145 ServiceWorkerStatusCode status, |
| 146 const std::string& status_message, |
| 146 int64 registration_id); | 147 int64 registration_id); |
| 147 | 148 |
| 148 void UnregistrationComplete(int thread_id, | 149 void UnregistrationComplete(int thread_id, |
| 149 int request_id, | 150 int request_id, |
| 150 ServiceWorkerStatusCode status); | 151 ServiceWorkerStatusCode status); |
| 151 | 152 |
| 152 void GetRegistrationComplete( | 153 void GetRegistrationComplete( |
| 153 int thread_id, | 154 int thread_id, |
| 154 int provider_id, | 155 int provider_id, |
| 155 int request_id, | 156 int request_id, |
| 156 ServiceWorkerStatusCode status, | 157 ServiceWorkerStatusCode status, |
| 157 const scoped_refptr<ServiceWorkerRegistration>& registration); | 158 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 158 | 159 |
| 159 void SendRegistrationError(int thread_id, | 160 void SendRegistrationError(int thread_id, |
| 160 int request_id, | 161 int request_id, |
| 161 ServiceWorkerStatusCode status); | 162 ServiceWorkerStatusCode status, |
| 163 const std::string& status_message); |
| 162 | 164 |
| 163 void SendUnregistrationError(int thread_id, | 165 void SendUnregistrationError(int thread_id, |
| 164 int request_id, | 166 int request_id, |
| 165 ServiceWorkerStatusCode status); | 167 ServiceWorkerStatusCode status); |
| 166 | 168 |
| 167 void SendGetRegistrationError(int thread_id, | 169 void SendGetRegistrationError(int thread_id, |
| 168 int request_id, | 170 int request_id, |
| 169 ServiceWorkerStatusCode status); | 171 ServiceWorkerStatusCode status); |
| 170 | 172 |
| 171 ServiceWorkerContextCore* GetContext(); | 173 ServiceWorkerContextCore* GetContext(); |
| 172 | 174 |
| 173 int render_process_id_; | 175 int render_process_id_; |
| 174 MessagePortMessageFilter* const message_port_message_filter_; | 176 MessagePortMessageFilter* const message_port_message_filter_; |
| 175 ResourceContext* resource_context_; | 177 ResourceContext* resource_context_; |
| 176 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; | 178 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; |
| 177 | 179 |
| 178 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; | 180 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; |
| 179 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_; | 181 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_; |
| 180 | 182 |
| 181 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. | 183 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. |
| 182 ScopedVector<IPC::Message> pending_messages_; | 184 ScopedVector<IPC::Message> pending_messages_; |
| 183 | 185 |
| 184 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 186 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 } // namespace content | 189 } // namespace content |
| 188 | 190 |
| 189 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 191 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| OLD | NEW |