OLD | NEW |
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 Loading... |
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 bool accept_connection); | 366 bool accept_connection); |
366 void OnOpenWindow(int request_id, const GURL& url); | 367 void OnOpenWindow(int request_id, const GURL& url); |
367 void DidOpenWindow(int request_id, | 368 void DidOpenWindow(int request_id, |
368 int render_process_id, | 369 int render_process_id, |
369 int render_frame_id); | 370 int render_frame_id); |
370 void OnOpenWindowFinished(int request_id, | 371 void OnOpenWindowFinished(int request_id, |
371 int client_id, | 372 int client_id, |
372 const ServiceWorkerClientInfo& client_info); | 373 const ServiceWorkerClientInfo& client_info); |
373 | 374 |
374 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); | 375 void OnSetCachedMetadata(const GURL& url, const std::vector<char>& data); |
| 376 void OnSetCachedMetadataFinished(int64 callback_id, int result); |
375 void OnClearCachedMetadata(const GURL& url); | 377 void OnClearCachedMetadata(const GURL& url); |
| 378 void OnClearCachedMetadataFinished(int64 callback_id, int result); |
376 | 379 |
377 void OnPostMessageToDocument(int client_id, | 380 void OnPostMessageToDocument(int client_id, |
378 const base::string16& message, | 381 const base::string16& message, |
379 const std::vector<int>& sent_message_port_ids); | 382 const std::vector<int>& sent_message_port_ids); |
380 void OnFocusClient(int request_id, int client_id); | 383 void OnFocusClient(int request_id, int client_id); |
381 void OnSkipWaiting(int request_id); | 384 void OnSkipWaiting(int request_id); |
382 void OnClaimClients(int request_id); | 385 void OnClaimClients(int request_id); |
383 | 386 |
384 void OnFocusClientFinished(int request_id, | 387 void OnFocusClientFinished(int request_id, |
385 int client_id, | 388 int client_id, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 442 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
440 | 443 |
441 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 444 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
442 | 445 |
443 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 446 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
444 }; | 447 }; |
445 | 448 |
446 } // namespace content | 449 } // namespace content |
447 | 450 |
448 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 451 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
OLD | NEW |