| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // The core context is only for use on the IO thread. | 47 // The core context is only for use on the IO thread. |
| 48 ServiceWorkerContextCore* context(); | 48 ServiceWorkerContextCore* context(); |
| 49 | 49 |
| 50 // ServiceWorkerContext implementation: | 50 // ServiceWorkerContext implementation: |
| 51 virtual void RegisterServiceWorker( | 51 virtual void RegisterServiceWorker( |
| 52 const GURL& pattern, | 52 const GURL& pattern, |
| 53 const GURL& script_url, | 53 const GURL& script_url, |
| 54 const ResultCallback& continuation) OVERRIDE; | 54 const ResultCallback& continuation) OVERRIDE; |
| 55 virtual void UnregisterServiceWorker(const GURL& pattern, | 55 virtual void UnregisterServiceWorker(const GURL& pattern, |
| 56 int source_process_id, | |
| 57 const ResultCallback& continuation) | 56 const ResultCallback& continuation) |
| 58 OVERRIDE; | 57 OVERRIDE; |
| 59 | 58 |
| 60 void AddObserver(ServiceWorkerContextObserver* observer); | 59 void AddObserver(ServiceWorkerContextObserver* observer); |
| 61 void RemoveObserver(ServiceWorkerContextObserver* observer); | 60 void RemoveObserver(ServiceWorkerContextObserver* observer); |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; | 63 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; |
| 65 friend class ServiceWorkerProcessManager; | 64 friend class ServiceWorkerProcessManager; |
| 66 virtual ~ServiceWorkerContextWrapper(); | 65 virtual ~ServiceWorkerContextWrapper(); |
| 67 | 66 |
| 68 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > | 67 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > |
| 69 observer_list_; | 68 observer_list_; |
| 70 // Cleared in Shutdown(): | 69 // Cleared in Shutdown(): |
| 71 BrowserContext* browser_context_; | 70 BrowserContext* browser_context_; |
| 72 scoped_ptr<ServiceWorkerContextCore> context_core_; | 71 scoped_ptr<ServiceWorkerContextCore> context_core_; |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 } // namespace content | 74 } // namespace content |
| 76 | 75 |
| 77 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 76 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |