| 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 <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ACTIVATING, // Activate event is dispatched and being handled. | 88 ACTIVATING, // Activate event is dispatched and being handled. |
| 89 ACTIVATED, // Activation is finished and can run as activated. | 89 ACTIVATED, // Activation is finished and can run as activated. |
| 90 REDUNDANT, // The version is no longer running as activated, due to | 90 REDUNDANT, // The version is no longer running as activated, due to |
| 91 // unregistration or replace. | 91 // unregistration or replace. |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class Listener { | 94 class Listener { |
| 95 public: | 95 public: |
| 96 virtual void OnRunningStateChanged(ServiceWorkerVersion* version) {} | 96 virtual void OnRunningStateChanged(ServiceWorkerVersion* version) {} |
| 97 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) {} | 97 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) {} |
| 98 virtual void OnMainScriptHttpResponseInfoSet( |
| 99 ServiceWorkerVersion* version) {} |
| 98 virtual void OnErrorReported(ServiceWorkerVersion* version, | 100 virtual void OnErrorReported(ServiceWorkerVersion* version, |
| 99 const base::string16& error_message, | 101 const base::string16& error_message, |
| 100 int line_number, | 102 int line_number, |
| 101 int column_number, | 103 int column_number, |
| 102 const GURL& source_url) {} | 104 const GURL& source_url) {} |
| 103 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, | 105 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, |
| 104 int source_identifier, | 106 int source_identifier, |
| 105 int message_level, | 107 int message_level, |
| 106 const base::string16& message, | 108 const base::string16& message, |
| 107 int line_number, | 109 int line_number, |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 521 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
| 520 | 522 |
| 521 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 523 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 522 | 524 |
| 523 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 525 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 524 }; | 526 }; |
| 525 | 527 |
| 526 } // namespace content | 528 } // namespace content |
| 527 | 529 |
| 528 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 530 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |