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

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

Issue 2620463002: Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: fix crash 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
269 // Called when an error occurred while receiving the response of the 270 // Called when an error occurred while receiving the response of the
270 // navigation preload request. 271 // navigation preload request.
271 void OnNavigationPreloadError( 272 void OnNavigationPreloadError(
272 int fetch_event_id, 273 int fetch_event_id,
273 std::unique_ptr<blink::WebServiceWorkerError> error); 274 std::unique_ptr<blink::WebServiceWorkerError> error);
274 275
275 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); 276 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr();
276 277
277 const int embedded_worker_id_; 278 const int embedded_worker_id_;
278 const int64_t service_worker_version_id_; 279 const int64_t service_worker_version_id_;
(...skipping 17 matching lines...) Expand all
296 // Initialized on the worker thread in workerContextStarted and 297 // Initialized on the worker thread in workerContextStarted and
297 // destructed on the worker thread in willDestroyWorkerContext. 298 // destructed on the worker thread in willDestroyWorkerContext.
298 std::unique_ptr<WorkerContextData> context_; 299 std::unique_ptr<WorkerContextData> context_;
299 300
300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 301 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
301 }; 302 };
302 303
303 } // namespace content 304 } // namespace content
304 305
305 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 306 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698