| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 NEW, // The version is just created. | 63 NEW, // The version is just created. |
| 64 INSTALLING, // Install event is dispatched and being handled. | 64 INSTALLING, // Install event is dispatched and being handled. |
| 65 INSTALLED, // Install event is finished and is ready to be activated. | 65 INSTALLED, // Install event is finished and is ready to be activated. |
| 66 ACTIVATING, // Activate event is dispatched and being handled. | 66 ACTIVATING, // Activate event is dispatched and being handled. |
| 67 ACTIVE, // Activation is finished and can run as active. | 67 ACTIVE, // Activation is finished and can run as active. |
| 68 DEACTIVATED, // The version is no longer running as active, due to | 68 DEACTIVATED, // The version is no longer running as active, due to |
| 69 // unregistration or replace. (TODO(kinuko): we may need | 69 // unregistration or replace. (TODO(kinuko): we may need |
| 70 // different states for different termination sequences) | 70 // different states for different termination sequences) |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 class Listener { | 73 class CONTENT_EXPORT Listener { |
| 74 public: | 74 public: |
| 75 virtual void OnWorkerStarted(ServiceWorkerVersion* version) = 0; | 75 virtual void OnWorkerStarted(ServiceWorkerVersion* version) = 0; |
| 76 virtual void OnWorkerStopped(ServiceWorkerVersion* version) = 0; | 76 virtual void OnWorkerStopped(ServiceWorkerVersion* version) = 0; |
| 77 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) = 0; | 77 virtual void OnVersionStateChanged(ServiceWorkerVersion* version) = 0; |
| 78 virtual void OnErrorReported(ServiceWorkerVersion* version, | 78 virtual void OnErrorReported(ServiceWorkerVersion* version, |
| 79 const base::string16& error_message, | 79 const base::string16& error_message, |
| 80 int line_number, | 80 int line_number, |
| 81 int column_number, | 81 int column_number, |
| 82 const GURL& source_url) = 0; | 82 const GURL& source_url) = 0; |
| 83 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, | 83 virtual void OnReportConsoleMessage(ServiceWorkerVersion* version, |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 ResourceIDMap script_cache_map_; | 265 ResourceIDMap script_cache_map_; |
| 266 | 266 |
| 267 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 267 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| 268 | 268 |
| 269 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 269 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } // namespace content | 272 } // namespace content |
| 273 | 273 |
| 274 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 274 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |