OLD | NEW |
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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include "base/callback.h" |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "base/time/time.h" | 12 #include "base/time/time.h" |
12 #include "content/browser/service_worker/service_worker_info.h" | 13 #include "content/browser/service_worker/service_worker_info.h" |
13 #include "content/browser/service_worker/service_worker_version.h" | 14 #include "content/browser/service_worker/service_worker_version.h" |
14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 enum class EmbeddedWorkerStatus; | 19 enum class EmbeddedWorkerStatus; |
19 | 20 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 base::Time script_response_time, | 66 base::Time script_response_time, |
66 base::Time script_last_modified) {} | 67 base::Time script_last_modified) {} |
67 virtual void OnErrorReported(int64_t version_id, | 68 virtual void OnErrorReported(int64_t version_id, |
68 int process_id, | 69 int process_id, |
69 int thread_id, | 70 int thread_id, |
70 const ErrorInfo& info) {} | 71 const ErrorInfo& info) {} |
71 virtual void OnReportConsoleMessage(int64_t version_id, | 72 virtual void OnReportConsoleMessage(int64_t version_id, |
72 int process_id, | 73 int process_id, |
73 int thread_id, | 74 int thread_id, |
74 const ConsoleMessage& message) {} | 75 const ConsoleMessage& message) {} |
75 virtual void OnControlleeAdded(int64_t version_id, | 76 // |web_contents_getter| is only set in PlzNavigate. |
76 const std::string& uuid, | 77 virtual void OnControlleeAdded( |
77 int process_id, | 78 int64_t version_id, |
78 int route_id, | 79 const std::string& uuid, |
79 ServiceWorkerProviderType type) {} | 80 int process_id, |
| 81 int route_id, |
| 82 const base::Callback<WebContents*(void)>& web_contents_getter, |
| 83 ServiceWorkerProviderType type) {} |
80 virtual void OnControlleeRemoved(int64_t version_id, | 84 virtual void OnControlleeRemoved(int64_t version_id, |
81 const std::string& uuid) {} | 85 const std::string& uuid) {} |
82 virtual void OnRegistrationStored(int64_t registration_id, | 86 virtual void OnRegistrationStored(int64_t registration_id, |
83 const GURL& pattern) {} | 87 const GURL& pattern) {} |
84 virtual void OnRegistrationDeleted(int64_t registration_id, | 88 virtual void OnRegistrationDeleted(int64_t registration_id, |
85 const GURL& pattern) {} | 89 const GURL& pattern) {} |
86 | 90 |
87 // Notified when the storage corruption recovery is completed and all stored | 91 // Notified when the storage corruption recovery is completed and all stored |
88 // data is wiped out. | 92 // data is wiped out. |
89 virtual void OnStorageWiped() {} | 93 virtual void OnStorageWiped() {} |
90 | 94 |
91 protected: | 95 protected: |
92 virtual ~ServiceWorkerContextObserver() {} | 96 virtual ~ServiceWorkerContextObserver() {} |
93 }; | 97 }; |
94 | 98 |
95 } // namespace content | 99 } // namespace content |
96 | 100 |
97 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 101 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ |
OLD | NEW |