| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 enum class FetchHandlerExistence { | 95 enum class FetchHandlerExistence { |
| 96 UNKNOWN, // This version is a new version and not installed yet. | 96 UNKNOWN, // This version is a new version and not installed yet. |
| 97 EXISTS, | 97 EXISTS, |
| 98 DOES_NOT_EXIST, | 98 DOES_NOT_EXIST, |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class Listener { | 101 class Listener { |
| 102 public: | 102 public: |
| 103 virtual void OnRunningStateChanged(ServiceWorkerVersion* version) {} | 103 virtual void OnRunningStateChanged(ServiceWorkerVersion* version) {} |
| 104 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) {} | 104 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) {} |
| 105 virtual void OnDevToolsRoutingIdChanged(ServiceWorkerVersion* version) {} |
| 105 virtual void OnMainScriptHttpResponseInfoSet( | 106 virtual void OnMainScriptHttpResponseInfoSet( |
| 106 ServiceWorkerVersion* version) {} | 107 ServiceWorkerVersion* version) {} |
| 107 virtual void OnErrorReported(ServiceWorkerVersion* version, | 108 virtual void OnErrorReported(ServiceWorkerVersion* version, |
| 108 const base::string16& error_message, | 109 const base::string16& error_message, |
| 109 int line_number, | 110 int line_number, |
| 110 int column_number, | 111 int column_number, |
| 111 const GURL& source_url) {} | 112 const GURL& source_url) {} |
| 112 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, | 113 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, |
| 113 int source_identifier, | 114 int source_identifier, |
| 114 int message_level, | 115 int message_level, |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 548 |
| 548 // EmbeddedWorkerInstance::Listener overrides: | 549 // EmbeddedWorkerInstance::Listener overrides: |
| 549 void OnThreadStarted() override; | 550 void OnThreadStarted() override; |
| 550 void OnStarting() override; | 551 void OnStarting() override; |
| 551 void OnStarted() override; | 552 void OnStarted() override; |
| 552 void OnStopping() override; | 553 void OnStopping() override; |
| 553 void OnStopped(EmbeddedWorkerStatus old_status) override; | 554 void OnStopped(EmbeddedWorkerStatus old_status) override; |
| 554 void OnDetached(EmbeddedWorkerStatus old_status) override; | 555 void OnDetached(EmbeddedWorkerStatus old_status) override; |
| 555 void OnScriptLoaded() override; | 556 void OnScriptLoaded() override; |
| 556 void OnScriptLoadFailed() override; | 557 void OnScriptLoadFailed() override; |
| 558 void OnRegisteredToDevToolsManager() override; |
| 557 void OnReportException(const base::string16& error_message, | 559 void OnReportException(const base::string16& error_message, |
| 558 int line_number, | 560 int line_number, |
| 559 int column_number, | 561 int column_number, |
| 560 const GURL& source_url) override; | 562 const GURL& source_url) override; |
| 561 void OnReportConsoleMessage(int source_identifier, | 563 void OnReportConsoleMessage(int source_identifier, |
| 562 int message_level, | 564 int message_level, |
| 563 const base::string16& message, | 565 const base::string16& message, |
| 564 int line_number, | 566 int line_number, |
| 565 const GURL& source_url) override; | 567 const GURL& source_url) override; |
| 566 bool OnMessageReceived(const IPC::Message& message) override; | 568 bool OnMessageReceived(const IPC::Message& message) override; |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 | 838 |
| 837 // At this point |this| can have been deleted, so don't do anything other | 839 // At this point |this| can have been deleted, so don't do anything other |
| 838 // than returning. | 840 // than returning. |
| 839 | 841 |
| 840 return true; | 842 return true; |
| 841 } | 843 } |
| 842 | 844 |
| 843 } // namespace content | 845 } // namespace content |
| 844 | 846 |
| 845 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 847 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |