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 "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/service_worker/service_worker_version.h" | 10 #include "content/browser/service_worker/service_worker_version.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 line_number(line_number), | 40 line_number(line_number), |
41 source_url(source_url) {} | 41 source_url(source_url) {} |
42 const int source_identifier; | 42 const int source_identifier; |
43 const int message_level; | 43 const int message_level; |
44 const base::string16 message; | 44 const base::string16 message; |
45 const int line_number; | 45 const int line_number; |
46 const GURL source_url; | 46 const GURL source_url; |
47 }; | 47 }; |
48 virtual void OnNewLiveRegistration(int64 registration_id, | 48 virtual void OnNewLiveRegistration(int64 registration_id, |
49 const GURL& pattern) {} | 49 const GURL& pattern) {} |
50 virtual void OnNewLiveVersion(int64 version_id, | 50 virtual void OnNewLiveVersion(std::string version_uuid, |
51 int64 registration_id, | 51 int64 registration_id, |
52 const GURL& script_url) {} | 52 const GURL& script_url) {} |
53 virtual void OnRunningStateChanged( | 53 virtual void OnRunningStateChanged( |
54 int64 version_id, | 54 std::string version_uuid, |
55 ServiceWorkerVersion::RunningStatus running_status) {} | 55 ServiceWorkerVersion::RunningStatus running_status) {} |
56 virtual void OnVersionStateChanged(int64 version_id, | 56 virtual void OnVersionStateChanged(std::string version_uuid, |
57 ServiceWorkerVersion::Status status) {} | 57 ServiceWorkerVersion::Status status) {} |
58 virtual void OnMainScriptHttpResponseInfoSet( | 58 virtual void OnMainScriptHttpResponseInfoSet( |
59 int64 version_id, | 59 std::string version_uuid, |
60 base::Time script_response_time, | 60 base::Time script_response_time, |
61 base::Time script_last_modified) {} | 61 base::Time script_last_modified) {} |
62 virtual void OnErrorReported(int64 version_id, | 62 virtual void OnErrorReported(std::string version_uuid, |
63 int process_id, | 63 int process_id, |
64 int thread_id, | 64 int thread_id, |
65 const ErrorInfo& info) {} | 65 const ErrorInfo& info) {} |
66 virtual void OnReportConsoleMessage(int64 version_id, | 66 virtual void OnReportConsoleMessage(std::string version_uuid, |
67 int process_id, | 67 int process_id, |
68 int thread_id, | 68 int thread_id, |
69 const ConsoleMessage& message) {} | 69 const ConsoleMessage& message) {} |
70 virtual void OnControlleeAdded(int64 version_id, | 70 virtual void OnControlleeAdded(std::string version_uuid, |
71 const std::string& uuid, | 71 const std::string& uuid, |
72 int process_id, | 72 int process_id, |
73 int route_id, | 73 int route_id, |
74 ServiceWorkerProviderType type) {} | 74 ServiceWorkerProviderType type) {} |
75 virtual void OnControlleeRemoved(int64 version_id, const std::string& uuid) {} | 75 virtual void OnControlleeRemoved(std::string version_uuid, |
| 76 const std::string& uuid) {} |
76 virtual void OnRegistrationStored(int64 registration_id, | 77 virtual void OnRegistrationStored(int64 registration_id, |
77 const GURL& pattern) {} | 78 const GURL& pattern) {} |
78 virtual void OnRegistrationDeleted(int64 registration_id, | 79 virtual void OnRegistrationDeleted(int64 registration_id, |
79 const GURL& pattern) {} | 80 const GURL& pattern) {} |
80 | 81 |
81 // Notified when the storage corruption recovery is completed and all stored | 82 // Notified when the storage corruption recovery is completed and all stored |
82 // data is wiped out. | 83 // data is wiped out. |
83 virtual void OnStorageWiped() {} | 84 virtual void OnStorageWiped() {} |
84 | 85 |
85 protected: | 86 protected: |
86 virtual ~ServiceWorkerContextObserver() {} | 87 virtual ~ServiceWorkerContextObserver() {} |
87 }; | 88 }; |
88 | 89 |
89 } // namespace content | 90 } // namespace content |
90 | 91 |
91 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 92 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ |
OLD | NEW |