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

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

Issue 2837943006: [WIP] Support PerformanceResourceTiming for Service Worker Navigation Preload (Closed)
Patch Set: clean up Created 3 years, 7 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 blink::WebServiceWorkerError::ErrorType error_type, 311 blink::WebServiceWorkerError::ErrorType error_type,
312 const base::string16& message); 312 const base::string16& message);
313 // Called to resolve the FetchEvent.preloadResponse promise. 313 // Called to resolve the FetchEvent.preloadResponse promise.
314 void OnNavigationPreloadResponse( 314 void OnNavigationPreloadResponse(
315 int fetch_event_id, 315 int fetch_event_id,
316 std::unique_ptr<blink::WebURLResponse> response, 316 std::unique_ptr<blink::WebURLResponse> response,
317 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); 317 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle);
318 // Called when the navigation preload request completed. Either 318 // Called when the navigation preload request completed. Either
319 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called 319 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called
320 // to release the preload related resources. 320 // to release the preload related resources.
321 void OnNavigationPreloadComplete(int fetch_event_id); 321 void OnNavigationPreloadComplete(int fetch_event_id,
322 base::TimeTicks completion_time,
323 int64_t encoded_data_length,
324 int64_t encoded_body_length,
325 int64_t decoded_body_length);
322 // Called when an error occurred while receiving the response of the 326 // Called when an error occurred while receiving the response of the
323 // navigation preload request. 327 // navigation preload request.
324 void OnNavigationPreloadError( 328 void OnNavigationPreloadError(
325 int fetch_event_id, 329 int fetch_event_id,
326 std::unique_ptr<blink::WebServiceWorkerError> error); 330 std::unique_ptr<blink::WebServiceWorkerError> error);
327 331
328 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); 332 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr();
329 333
330 const int embedded_worker_id_; 334 const int embedded_worker_id_;
331 const int64_t service_worker_version_id_; 335 const int64_t service_worker_version_id_;
(...skipping 23 matching lines...) Expand all
355 // Initialized on the worker thread in workerContextStarted and 359 // Initialized on the worker thread in workerContextStarted and
356 // destructed on the worker thread in willDestroyWorkerContext. 360 // destructed on the worker thread in willDestroyWorkerContext.
357 std::unique_ptr<WorkerContextData> context_; 361 std::unique_ptr<WorkerContextData> context_;
358 362
359 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 363 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
360 }; 364 };
361 365
362 } // namespace content 366 } // namespace content
363 367
364 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 368 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/network_handler.cc ('k') | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698