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_CORE_OBSERVER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_OBSERVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "content/browser/service_worker/service_worker_info.h" | 13 #include "content/browser/service_worker/service_worker_info.h" |
14 #include "content/browser/service_worker/service_worker_version.h" | 14 #include "content/browser/service_worker/service_worker_version.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 enum class EmbeddedWorkerStatus; | 19 enum class EmbeddedWorkerStatus; |
20 | 20 |
21 class ServiceWorkerContextObserver { | 21 class ServiceWorkerContextCoreObserver { |
22 public: | 22 public: |
23 struct ErrorInfo { | 23 struct ErrorInfo { |
24 ErrorInfo(const base::string16& message, | 24 ErrorInfo(const base::string16& message, |
25 int line, | 25 int line, |
26 int column, | 26 int column, |
27 const GURL& url) | 27 const GURL& url) |
28 : error_message(message), | 28 : error_message(message), |
29 line_number(line), | 29 line_number(line), |
30 column_number(column), | 30 column_number(column), |
31 source_url(url) {} | 31 source_url(url) {} |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual void OnRegistrationStored(int64_t registration_id, | 86 virtual void OnRegistrationStored(int64_t registration_id, |
87 const GURL& pattern) {} | 87 const GURL& pattern) {} |
88 virtual void OnRegistrationDeleted(int64_t registration_id, | 88 virtual void OnRegistrationDeleted(int64_t registration_id, |
89 const GURL& pattern) {} | 89 const GURL& pattern) {} |
90 | 90 |
91 // Notified when the storage corruption recovery is completed and all stored | 91 // Notified when the storage corruption recovery is completed and all stored |
92 // data is wiped out. | 92 // data is wiped out. |
93 virtual void OnStorageWiped() {} | 93 virtual void OnStorageWiped() {} |
94 | 94 |
95 protected: | 95 protected: |
96 virtual ~ServiceWorkerContextObserver() {} | 96 virtual ~ServiceWorkerContextCoreObserver() {} |
97 }; | 97 }; |
98 | 98 |
99 } // namespace content | 99 } // namespace content |
100 | 100 |
101 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 101 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CORE_OBSERVER_H
_ |
OLD | NEW |