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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 void RemoveStreamingURLRequestJob( | 273 void RemoveStreamingURLRequestJob( |
274 const ServiceWorkerURLRequestJob* request_job); | 274 const ServiceWorkerURLRequestJob* request_job); |
275 | 275 |
276 // Adds and removes Listeners. | 276 // Adds and removes Listeners. |
277 void AddListener(Listener* listener); | 277 void AddListener(Listener* listener); |
278 void RemoveListener(Listener* listener); | 278 void RemoveListener(Listener* listener); |
279 | 279 |
280 ServiceWorkerScriptCacheMap* script_cache_map() { return &script_cache_map_; } | 280 ServiceWorkerScriptCacheMap* script_cache_map() { return &script_cache_map_; } |
281 EmbeddedWorkerInstance* embedded_worker() { return embedded_worker_.get(); } | 281 EmbeddedWorkerInstance* embedded_worker() { return embedded_worker_.get(); } |
282 | 282 |
| 283 // Reports the error message to |listeners_|. |
| 284 void ReportError(ServiceWorkerStatusCode status, |
| 285 const std::string& status_message); |
| 286 |
283 // Dooms this version to have REDUNDANT status and its resources deleted. If | 287 // Dooms this version to have REDUNDANT status and its resources deleted. If |
284 // the version is controlling a page, these changes will happen when the | 288 // the version is controlling a page, these changes will happen when the |
285 // version no longer controls any pages. | 289 // version no longer controls any pages. |
286 void Doom(); | 290 void Doom(); |
287 bool is_doomed() const { return is_doomed_; } | 291 bool is_doomed() const { return is_doomed_; } |
288 | 292 |
289 bool skip_waiting() const { return skip_waiting_; } | 293 bool skip_waiting() const { return skip_waiting_; } |
290 | 294 |
291 void SetDevToolsAttached(bool attached); | 295 void SetDevToolsAttached(bool attached); |
292 | 296 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; | 519 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
516 | 520 |
517 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; | 521 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
518 | 522 |
519 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); | 523 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |
520 }; | 524 }; |
521 | 525 |
522 } // namespace content | 526 } // namespace content |
523 | 527 |
524 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 528 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
OLD | NEW |