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

Side by Side Diff: content/browser/service_worker/service_worker_version.h

Issue 945413005: Add browser test for V8 code caching for ServiceWorker scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 5 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int column_number, 102 int column_number,
103 const GURL& source_url) {} 103 const GURL& source_url) {}
104 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, 104 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version,
105 int source_identifier, 105 int source_identifier,
106 int message_level, 106 int message_level,
107 const base::string16& message, 107 const base::string16& message,
108 int line_number, 108 int line_number,
109 const GURL& source_url) {} 109 const GURL& source_url) {}
110 // Fires when a version transitions from having a controllee to not. 110 // Fires when a version transitions from having a controllee to not.
111 virtual void OnNoControllees(ServiceWorkerVersion* version) {} 111 virtual void OnNoControllees(ServiceWorkerVersion* version) {}
112 virtual void OnCachedMetadataUpdated(ServiceWorkerVersion* version) {}
112 113
113 protected: 114 protected:
114 virtual ~Listener() {} 115 virtual ~Listener() {}
115 }; 116 };
116 117
117 ServiceWorkerVersion( 118 ServiceWorkerVersion(
118 ServiceWorkerRegistration* registration, 119 ServiceWorkerRegistration* registration,
119 const GURL& script_url, 120 const GURL& script_url,
120 int64 version_id, 121 int64 version_id,
121 base::WeakPtr<ServiceWorkerContextCore> context); 122 base::WeakPtr<ServiceWorkerContextCore> context);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 bool accept_connection); 373 bool accept_connection);
373 void OnOpenWindow(int request_id, const GURL& url); 374 void OnOpenWindow(int request_id, const GURL& url);
374 void DidOpenWindow(int request_id, 375 void DidOpenWindow(int request_id,
375 int render_process_id, 376 int render_process_id,
376 int render_frame_id); 377 int render_frame_id);
377 void OnOpenWindowFinished(int request_id, 378 void OnOpenWindowFinished(int request_id,
378 int client_id, 379 int client_id,
379 const ServiceWorkerClientInfo& client_info); 380 const ServiceWorkerClientInfo& client_info);
380 381
381 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); 382 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data);
383 void OnSetCachedMetadataFinished(int64 callback_id, int result);
382 void OnClearCachedMetadata(const GURL& url); 384 void OnClearCachedMetadata(const GURL& url);
385 void OnClearCachedMetadataFinished(int64 callback_id, int result);
383 386
384 void OnPostMessageToDocument(int client_id, 387 void OnPostMessageToDocument(int client_id,
385 const base::string16& message, 388 const base::string16& message,
386 const std::vector<int>& sent_message_port_ids); 389 const std::vector<int>& sent_message_port_ids);
387 void OnFocusClient(int request_id, int client_id); 390 void OnFocusClient(int request_id, int client_id);
388 void OnSkipWaiting(int request_id); 391 void OnSkipWaiting(int request_id);
389 void OnClaimClients(int request_id); 392 void OnClaimClients(int request_id);
390 void OnPongFromWorker(); 393 void OnPongFromWorker();
391 394
392 void OnFocusClientFinished(int request_id, 395 void OnFocusClientFinished(int request_id,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; 464 scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
462 465
463 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 466 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
464 467
465 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 468 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
466 }; 469 };
467 470
468 } // namespace content 471 } // namespace content
469 472
470 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 473 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698