Chromium Code Reviews| 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/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "content/browser/service_worker/service_worker_info.h" | |
| 12 #include "content/browser/service_worker/service_worker_version.h" | 13 #include "content/browser/service_worker/service_worker_version.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 | 17 |
| 17 enum class EmbeddedWorkerStatus; | 18 enum class EmbeddedWorkerStatus; |
| 18 | 19 |
| 19 class ServiceWorkerContextObserver { | 20 class ServiceWorkerContextObserver { |
| 20 public: | 21 public: |
| 21 struct ErrorInfo { | 22 struct ErrorInfo { |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 44 line_number(line_number), | 45 line_number(line_number), |
| 45 source_url(source_url) {} | 46 source_url(source_url) {} |
| 46 const int source_identifier; | 47 const int source_identifier; |
| 47 const int message_level; | 48 const int message_level; |
| 48 const base::string16 message; | 49 const base::string16 message; |
| 49 const int line_number; | 50 const int line_number; |
| 50 const GURL source_url; | 51 const GURL source_url; |
| 51 }; | 52 }; |
| 52 virtual void OnNewLiveRegistration(int64_t registration_id, | 53 virtual void OnNewLiveRegistration(int64_t registration_id, |
| 53 const GURL& pattern) {} | 54 const GURL& pattern) {} |
| 54 virtual void OnNewLiveVersion(int64_t version_id, | 55 virtual void OnNewLiveVersion(const ServiceWorkerVersionInfo& version_info) {} |
| 55 int64_t registration_id, | |
| 56 const GURL& script_url) {} | |
| 57 virtual void OnRunningStateChanged(int64_t version_id, | 56 virtual void OnRunningStateChanged(int64_t version_id, |
| 58 EmbeddedWorkerStatus running_status) {} | 57 EmbeddedWorkerStatus running_status) {} |
| 59 virtual void OnVersionStateChanged(int64_t version_id, | 58 virtual void OnVersionStateChanged(int64_t version_id, |
| 60 ServiceWorkerVersion::Status status) {} | 59 ServiceWorkerVersion::Status status) {} |
| 60 virtual void OnVersionRoutingIdsChanged(int64_t version_id, | |
|
horo
2016/09/26 01:30:05
OnVersionDevToolsRoutingIdChanged
dgozman
2016/09/26 15:49:12
Done.
| |
| 61 int process_id, | |
| 62 int devtools_agent_route_id) {} | |
| 61 virtual void OnMainScriptHttpResponseInfoSet( | 63 virtual void OnMainScriptHttpResponseInfoSet( |
| 62 int64_t version_id, | 64 int64_t version_id, |
| 63 base::Time script_response_time, | 65 base::Time script_response_time, |
| 64 base::Time script_last_modified) {} | 66 base::Time script_last_modified) {} |
| 65 virtual void OnErrorReported(int64_t version_id, | 67 virtual void OnErrorReported(int64_t version_id, |
| 66 int process_id, | 68 int process_id, |
| 67 int thread_id, | 69 int thread_id, |
| 68 const ErrorInfo& info) {} | 70 const ErrorInfo& info) {} |
| 69 virtual void OnReportConsoleMessage(int64_t version_id, | 71 virtual void OnReportConsoleMessage(int64_t version_id, |
| 70 int process_id, | 72 int process_id, |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 86 // data is wiped out. | 88 // data is wiped out. |
| 87 virtual void OnStorageWiped() {} | 89 virtual void OnStorageWiped() {} |
| 88 | 90 |
| 89 protected: | 91 protected: |
| 90 virtual ~ServiceWorkerContextObserver() {} | 92 virtual ~ServiceWorkerContextObserver() {} |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 } // namespace content | 95 } // namespace content |
| 94 | 96 |
| 95 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ | 97 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ |
| OLD | NEW |