Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2645493002: Increase the lifetime of Navigation Preload related objects. (Closed)
Patch Set: fix broken-chunked-encoding-worker.js Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void OnNavigateClientResponse(int request_id, 250 void OnNavigateClientResponse(int request_id,
251 const ServiceWorkerClientInfo& client); 251 const ServiceWorkerClientInfo& client);
252 void OnNavigateClientError(int request_id, const GURL& url); 252 void OnNavigateClientError(int request_id, const GURL& url);
253 void OnDidSkipWaiting(int request_id); 253 void OnDidSkipWaiting(int request_id);
254 void OnDidClaimClients(int request_id); 254 void OnDidClaimClients(int request_id);
255 void OnClaimClientsError(int request_id, 255 void OnClaimClientsError(int request_id,
256 blink::WebServiceWorkerError::ErrorType error_type, 256 blink::WebServiceWorkerError::ErrorType error_type,
257 const base::string16& message); 257 const base::string16& message);
258 void OnPing(); 258 void OnPing();
259 259
260 // Called to resolve the FetchEvent.preloadResponse promise.
260 void OnNavigationPreloadResponse( 261 void OnNavigationPreloadResponse(
261 int fetch_event_id, 262 int fetch_event_id,
262 std::unique_ptr<blink::WebURLResponse> response, 263 std::unique_ptr<blink::WebURLResponse> response,
263 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
266 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called
267 // to release the preload related resources.
268 void OnNavigationPreloadComplete(int fetch_event_id);
269 // Called when an error occurred while receiving the response of the
270 // navigation preload request.
264 void OnNavigationPreloadError( 271 void OnNavigationPreloadError(
265 int fetch_event_id, 272 int fetch_event_id,
266 std::unique_ptr<blink::WebServiceWorkerError> error); 273 std::unique_ptr<blink::WebServiceWorkerError> error);
267 274
268 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); 275 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr();
269 276
270 const int embedded_worker_id_; 277 const int embedded_worker_id_;
271 const int64_t service_worker_version_id_; 278 const int64_t service_worker_version_id_;
272 const GURL service_worker_scope_; 279 const GURL service_worker_scope_;
273 const GURL script_url_; 280 const GURL script_url_;
(...skipping 15 matching lines...) Expand all
289 // Initialized on the worker thread in workerContextStarted and 296 // Initialized on the worker thread in workerContextStarted and
290 // destructed on the worker thread in willDestroyWorkerContext. 297 // destructed on the worker thread in willDestroyWorkerContext.
291 std::unique_ptr<WorkerContextData> context_; 298 std::unique_ptr<WorkerContextData> context_;
292 299
293 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
294 }; 301 };
295 302
296 } // namespace content 303 } // namespace content
297 304
298 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 305 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698