| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void OnPing(); | 258 void OnPing(); |
| 259 | 259 |
| 260 // Called to resolve the FetchEvent.preloadResponse promise. | 260 // Called to resolve the FetchEvent.preloadResponse promise. |
| 261 void OnNavigationPreloadResponse( | 261 void OnNavigationPreloadResponse( |
| 262 int fetch_event_id, | 262 int fetch_event_id, |
| 263 std::unique_ptr<blink::WebURLResponse> response, | 263 std::unique_ptr<blink::WebURLResponse> response, |
| 264 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); | 264 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); |
| 265 // Called when the navigation preload request completed. Either | 265 // Called when the navigation preload request completed. Either |
| 266 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called | 266 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called |
| 267 // to release the preload related resources. | 267 // to release the preload related resources. |
| 268 void OnNavigationPreloadComplete(int fetch_event_id, | 268 void OnNavigationPreloadComplete(int fetch_event_id); |
| 269 int64_t encoded_data_length); | |
| 270 // Called when an error occurred while receiving the response of the | 269 // Called when an error occurred while receiving the response of the |
| 271 // navigation preload request. | 270 // navigation preload request. |
| 272 void OnNavigationPreloadError( | 271 void OnNavigationPreloadError( |
| 273 int fetch_event_id, | 272 int fetch_event_id, |
| 274 std::unique_ptr<blink::WebServiceWorkerError> error); | 273 std::unique_ptr<blink::WebServiceWorkerError> error); |
| 275 | 274 |
| 276 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); | 275 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); |
| 277 | 276 |
| 278 const int embedded_worker_id_; | 277 const int embedded_worker_id_; |
| 279 const int64_t service_worker_version_id_; | 278 const int64_t service_worker_version_id_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 297 // Initialized on the worker thread in workerContextStarted and | 296 // Initialized on the worker thread in workerContextStarted and |
| 298 // destructed on the worker thread in willDestroyWorkerContext. | 297 // destructed on the worker thread in willDestroyWorkerContext. |
| 299 std::unique_ptr<WorkerContextData> context_; | 298 std::unique_ptr<WorkerContextData> context_; |
| 300 | 299 |
| 301 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
| 302 }; | 301 }; |
| 303 | 302 |
| 304 } // namespace content | 303 } // namespace content |
| 305 | 304 |
| 306 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 305 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
| OLD | NEW |