OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 void OnNavigateClientResponse(int request_id, | 257 void OnNavigateClientResponse(int request_id, |
258 const ServiceWorkerClientInfo& client); | 258 const ServiceWorkerClientInfo& client); |
259 void OnNavigateClientError(int request_id, const GURL& url); | 259 void OnNavigateClientError(int request_id, const GURL& url); |
260 void OnDidSkipWaiting(int request_id); | 260 void OnDidSkipWaiting(int request_id); |
261 void OnDidClaimClients(int request_id); | 261 void OnDidClaimClients(int request_id); |
262 void OnClaimClientsError(int request_id, | 262 void OnClaimClientsError(int request_id, |
263 blink::WebServiceWorkerError::ErrorType error_type, | 263 blink::WebServiceWorkerError::ErrorType error_type, |
264 const base::string16& message); | 264 const base::string16& message); |
265 void OnPing(); | 265 void OnPing(); |
266 | 266 |
267 // Called to resolve the FetchEvent.preloadResponse promise. | |
267 void OnNavigationPreloadResponse( | 268 void OnNavigationPreloadResponse( |
268 int fetch_event_id, | 269 int fetch_event_id, |
269 std::unique_ptr<blink::WebURLResponse> response, | 270 std::unique_ptr<blink::WebURLResponse> response, |
270 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); | 271 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); |
272 // Called when the navigation preload request completed. Either | |
273 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called | |
274 // to release the preload related resources. | |
275 void OnNavigationPreloadComplete(int fetch_event_id); | |
276 // Called when an error occured while recieving the response of the navigation | |
falken
2017/01/18 16:32:58
nit: occurred, receiving
horo
2017/01/18 16:52:06
Done.
| |
277 // preload request. | |
271 void OnNavigationPreloadError( | 278 void OnNavigationPreloadError( |
272 int fetch_event_id, | 279 int fetch_event_id, |
273 std::unique_ptr<blink::WebServiceWorkerError> error); | 280 std::unique_ptr<blink::WebServiceWorkerError> error); |
274 | 281 |
275 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); | 282 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); |
276 | 283 |
277 const int embedded_worker_id_; | 284 const int embedded_worker_id_; |
278 const int64_t service_worker_version_id_; | 285 const int64_t service_worker_version_id_; |
279 const GURL service_worker_scope_; | 286 const GURL service_worker_scope_; |
280 const GURL script_url_; | 287 const GURL script_url_; |
(...skipping 15 matching lines...) Expand all Loading... | |
296 // Initialized on the worker thread in workerContextStarted and | 303 // Initialized on the worker thread in workerContextStarted and |
297 // destructed on the worker thread in willDestroyWorkerContext. | 304 // destructed on the worker thread in willDestroyWorkerContext. |
298 std::unique_ptr<WorkerContextData> context_; | 305 std::unique_ptr<WorkerContextData> context_; |
299 | 306 |
300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 307 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
301 }; | 308 }; |
302 | 309 |
303 } // namespace content | 310 } // namespace content |
304 | 311 |
305 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 312 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |