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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by | 148 // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by |
149 // default (crbug.com/543198). | 149 // default (crbug.com/543198). |
150 void OnDeprecatedPostMessageToWorker( | 150 void OnDeprecatedPostMessageToWorker( |
151 int handle_id, | 151 int handle_id, |
152 const base::string16& message, | 152 const base::string16& message, |
153 const std::vector<TransferredMessagePort>& sent_message_ports); | 153 const std::vector<TransferredMessagePort>& sent_message_ports); |
154 | 154 |
155 void OnTerminateWorker(int handle_id); | 155 void OnTerminateWorker(int handle_id); |
156 | 156 |
| 157 template <typename SourceInfo> |
| 158 void DispatchExtendableMessageEvent( |
| 159 scoped_refptr<ServiceWorkerVersion> worker, |
| 160 const base::string16& message, |
| 161 const url::Origin& source_origin, |
| 162 const std::vector<TransferredMessagePort>& sent_message_ports, |
| 163 const SourceInfo& source_info); |
| 164 void DispatchExtendableMessageEventAfterStartWorker( |
| 165 scoped_refptr<ServiceWorkerVersion> worker, |
| 166 const base::string16& message, |
| 167 const url::Origin& source_origin, |
| 168 const std::vector<TransferredMessagePort>& sent_message_ports, |
| 169 const ExtendableMessageEventSource& source); |
| 170 void DidFailToDispatchExtendableMessageEvent( |
| 171 const std::vector<TransferredMessagePort>& sent_message_ports, |
| 172 ServiceWorkerStatusCode status); |
| 173 |
157 ServiceWorkerRegistrationHandle* FindRegistrationHandle( | 174 ServiceWorkerRegistrationHandle* FindRegistrationHandle( |
158 int provider_id, | 175 int provider_id, |
159 int64_t registration_handle_id); | 176 int64_t registration_handle_id); |
160 | 177 |
161 void GetRegistrationObjectInfoAndVersionAttributes( | 178 void GetRegistrationObjectInfoAndVersionAttributes( |
162 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 179 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
163 ServiceWorkerRegistration* registration, | 180 ServiceWorkerRegistration* registration, |
164 ServiceWorkerRegistrationObjectInfo* info, | 181 ServiceWorkerRegistrationObjectInfo* info, |
165 ServiceWorkerVersionAttributes* attrs); | 182 ServiceWorkerVersionAttributes* attrs); |
166 | 183 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 231 |
215 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. | 232 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. |
216 std::vector<scoped_ptr<IPC::Message>> pending_messages_; | 233 std::vector<scoped_ptr<IPC::Message>> pending_messages_; |
217 | 234 |
218 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 235 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
219 }; | 236 }; |
220 | 237 |
221 } // namespace content | 238 } // namespace content |
222 | 239 |
223 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 240 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |