| 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 "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 ServiceWorkerContextCore* context(); | 44 ServiceWorkerContextCore* context(); |
| 45 | 45 |
| 46 // ServiceWorkerContext implementation: | 46 // ServiceWorkerContext implementation: |
| 47 virtual void RegisterServiceWorker(const GURL& pattern, | 47 virtual void RegisterServiceWorker(const GURL& pattern, |
| 48 const GURL& script_url, | 48 const GURL& script_url, |
| 49 int source_process_id, | 49 int source_process_id, |
| 50 const ResultCallback& continuation) | 50 const ResultCallback& continuation) |
| 51 OVERRIDE; | 51 OVERRIDE; |
| 52 | 52 |
| 53 virtual void UnregisterServiceWorker(const GURL& pattern, | 53 virtual void UnregisterServiceWorker(const GURL& pattern, |
| 54 int source_process_id, | |
| 55 const ResultCallback& continuation) | 54 const ResultCallback& continuation) |
| 56 OVERRIDE; | 55 OVERRIDE; |
| 57 | 56 |
| 58 void AddObserver(ServiceWorkerContextObserver* observer); | 57 void AddObserver(ServiceWorkerContextObserver* observer); |
| 59 void RemoveObserver(ServiceWorkerContextObserver* observer); | 58 void RemoveObserver(ServiceWorkerContextObserver* observer); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; | 61 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; |
| 63 virtual ~ServiceWorkerContextWrapper(); | 62 virtual ~ServiceWorkerContextWrapper(); |
| 64 | 63 |
| 65 scoped_ptr<ServiceWorkerContextCore> context_core_; | 64 scoped_ptr<ServiceWorkerContextCore> context_core_; |
| 66 scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > | 65 scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > |
| 67 observer_list_; | 66 observer_list_; |
| 68 }; | 67 }; |
| 69 | 68 |
| 70 } // namespace content | 69 } // namespace content |
| 71 | 70 |
| 72 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 71 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |