| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 void AddListener(Listener* listener); | 347 void AddListener(Listener* listener); |
| 348 void RemoveListener(Listener* listener); | 348 void RemoveListener(Listener* listener); |
| 349 | 349 |
| 350 ServiceWorkerScriptCacheMap* script_cache_map() { return &script_cache_map_; } | 350 ServiceWorkerScriptCacheMap* script_cache_map() { return &script_cache_map_; } |
| 351 EmbeddedWorkerInstance* embedded_worker() { return embedded_worker_.get(); } | 351 EmbeddedWorkerInstance* embedded_worker() { return embedded_worker_.get(); } |
| 352 | 352 |
| 353 // Reports the error message to |listeners_|. | 353 // Reports the error message to |listeners_|. |
| 354 void ReportError(ServiceWorkerStatusCode status, | 354 void ReportError(ServiceWorkerStatusCode status, |
| 355 const std::string& status_message); | 355 const std::string& status_message); |
| 356 | 356 |
| 357 void ReportForceUpdateToDevTools(); |
| 358 |
| 357 // Sets the status code to pass to StartWorker callbacks if start fails. | 359 // Sets the status code to pass to StartWorker callbacks if start fails. |
| 358 void SetStartWorkerStatusCode(ServiceWorkerStatusCode status); | 360 void SetStartWorkerStatusCode(ServiceWorkerStatusCode status); |
| 359 | 361 |
| 360 // Sets this version's status to REDUNDANT and deletes its resources. | 362 // Sets this version's status to REDUNDANT and deletes its resources. |
| 361 // The version must not have controllees. | 363 // The version must not have controllees. |
| 362 void Doom(); | 364 void Doom(); |
| 363 bool is_redundant() const { return status_ == REDUNDANT; } | 365 bool is_redundant() const { return status_ == REDUNDANT; } |
| 364 | 366 |
| 365 bool skip_waiting() const { return skip_waiting_; } | 367 bool skip_waiting() const { return skip_waiting_; } |
| 366 void set_skip_waiting(bool skip_waiting) { skip_waiting_ = skip_waiting; } | 368 void set_skip_waiting(bool skip_waiting) { skip_waiting_ = skip_waiting; } |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 | 902 |
| 901 // At this point |this| can have been deleted, so don't do anything other | 903 // At this point |this| can have been deleted, so don't do anything other |
| 902 // than returning. | 904 // than returning. |
| 903 | 905 |
| 904 return true; | 906 return true; |
| 905 } | 907 } |
| 906 | 908 |
| 907 } // namespace content | 909 } // namespace content |
| 908 | 910 |
| 909 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 911 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |