| 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_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ |
| 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h" | 10 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class ThreadSafeSender; | 26 class ThreadSafeSender; |
| 27 class ServiceWorkerMessageFilter; | 27 class ServiceWorkerMessageFilter; |
| 28 | 28 |
| 29 class WebServiceWorkerProviderImpl | 29 class WebServiceWorkerProviderImpl |
| 30 : NON_EXPORTED_BASE(public blink::WebServiceWorkerProvider) { | 30 : NON_EXPORTED_BASE(public blink::WebServiceWorkerProvider) { |
| 31 public: | 31 public: |
| 32 WebServiceWorkerProviderImpl( | 32 WebServiceWorkerProviderImpl( |
| 33 ThreadSafeSender* thread_safe_sender, | 33 ThreadSafeSender* thread_safe_sender, |
| 34 ServiceWorkerMessageFilter* message_filter, | |
| 35 const blink::WebURL& origin, | |
| 36 scoped_ptr<blink::WebServiceWorkerProviderClient> client); | 34 scoped_ptr<blink::WebServiceWorkerProviderClient> client); |
| 37 virtual ~WebServiceWorkerProviderImpl(); | 35 virtual ~WebServiceWorkerProviderImpl(); |
| 38 | 36 |
| 37 int provider_id() const { return provider_id_; } |
| 38 |
| 39 virtual void registerServiceWorker(const blink::WebURL& pattern, | 39 virtual void registerServiceWorker(const blink::WebURL& pattern, |
| 40 const blink::WebURL& script_url, | 40 const blink::WebURL& script_url, |
| 41 WebServiceWorkerCallbacks*); | 41 WebServiceWorkerCallbacks*); |
| 42 | 42 |
| 43 virtual void unregisterServiceWorker(const blink::WebURL& pattern, | 43 virtual void unregisterServiceWorker(const blink::WebURL& pattern, |
| 44 WebServiceWorkerCallbacks*); | 44 WebServiceWorkerCallbacks*); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 const int provider_id_; |
| 47 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 48 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 48 scoped_ptr<blink::WebServiceWorkerProviderClient> client_; | 49 scoped_ptr<blink::WebServiceWorkerProviderClient> client_; |
| 49 | 50 |
| 50 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerProviderImpl); | 51 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerProviderImpl); |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 } // namespace content | 54 } // namespace content |
| 54 | 55 |
| 55 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ | 56 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ |
| OLD | NEW |