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_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 // ServiceWorkerContext implementation: | 57 // ServiceWorkerContext implementation: |
58 virtual void RegisterServiceWorker( | 58 virtual void RegisterServiceWorker( |
59 const GURL& pattern, | 59 const GURL& pattern, |
60 const GURL& script_url, | 60 const GURL& script_url, |
61 const ResultCallback& continuation) OVERRIDE; | 61 const ResultCallback& continuation) OVERRIDE; |
62 virtual void UnregisterServiceWorker(const GURL& pattern, | 62 virtual void UnregisterServiceWorker(const GURL& pattern, |
63 const ResultCallback& continuation) | 63 const ResultCallback& continuation) |
64 OVERRIDE; | 64 OVERRIDE; |
| 65 virtual void Terminate() OVERRIDE; |
65 | 66 |
66 void AddObserver(ServiceWorkerContextObserver* observer); | 67 void AddObserver(ServiceWorkerContextObserver* observer); |
67 void RemoveObserver(ServiceWorkerContextObserver* observer); | 68 void RemoveObserver(ServiceWorkerContextObserver* observer); |
68 | 69 |
69 private: | 70 private: |
70 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; | 71 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; |
71 friend class EmbeddedWorkerTestHelper; | 72 friend class EmbeddedWorkerTestHelper; |
72 friend class ServiceWorkerProcessManager; | 73 friend class ServiceWorkerProcessManager; |
73 virtual ~ServiceWorkerContextWrapper(); | 74 virtual ~ServiceWorkerContextWrapper(); |
74 | 75 |
75 void InitInternal(const base::FilePath& user_data_directory, | 76 void InitInternal(const base::FilePath& user_data_directory, |
76 base::SequencedTaskRunner* database_task_runner, | 77 base::SequencedTaskRunner* database_task_runner, |
77 base::MessageLoopProxy* disk_cache_thread, | 78 base::MessageLoopProxy* disk_cache_thread, |
78 quota::QuotaManagerProxy* quota_manager_proxy); | 79 quota::QuotaManagerProxy* quota_manager_proxy); |
79 void ShutdownOnIO(); | 80 void ShutdownOnIO(); |
80 | 81 |
81 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > | 82 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > |
82 observer_list_; | 83 observer_list_; |
83 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; | 84 const scoped_ptr<ServiceWorkerProcessManager> process_manager_; |
84 // Cleared in Shutdown(): | 85 // Cleared in Shutdown(): |
85 scoped_ptr<ServiceWorkerContextCore> context_core_; | 86 scoped_ptr<ServiceWorkerContextCore> context_core_; |
86 }; | 87 }; |
87 | 88 |
88 } // namespace content | 89 } // namespace content |
89 | 90 |
90 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 91 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |