Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: content/child/service_worker/web_service_worker_provider_impl.h

Issue 1002393005: Revert of ServiceWorker: Introduce SWMessageSender in order to mock IPC messaging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix patch apply failure Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h" 11 #include "third_party/WebKit/public/platform/WebServiceWorkerProvider.h"
12 12
13 namespace blink { 13 namespace blink {
14 class WebURL; 14 class WebURL;
15 class WebServiceWorkerProviderClient; 15 class WebServiceWorkerProviderClient;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 19
20 class ServiceWorkerDispatcher; 20 class ServiceWorkerDispatcher;
21 class ServiceWorkerMessageSender;
22 class ServiceWorkerProviderContext; 21 class ServiceWorkerProviderContext;
23 class ThreadSafeSender; 22 class ThreadSafeSender;
24 23
25 // This class corresponds to one ServiceWorkerContainer interface in 24 // This class corresponds to one ServiceWorkerContainer interface in
26 // JS context (i.e. navigator.serviceWorker). 25 // JS context (i.e. navigator.serviceWorker).
27 class WebServiceWorkerProviderImpl 26 class WebServiceWorkerProviderImpl
28 : NON_EXPORTED_BASE(public blink::WebServiceWorkerProvider) { 27 : NON_EXPORTED_BASE(public blink::WebServiceWorkerProvider) {
29 public: 28 public:
30 WebServiceWorkerProviderImpl(ThreadSafeSender* thread_safe_sender, 29 WebServiceWorkerProviderImpl(ThreadSafeSender* thread_safe_sender,
31 ServiceWorkerProviderContext* context); 30 ServiceWorkerProviderContext* context);
(...skipping 15 matching lines...) Expand all
47 WebServiceWorkerGetRegistrationForReadyCallbacks*); 46 WebServiceWorkerGetRegistrationForReadyCallbacks*);
48 47
49 ServiceWorkerProviderContext* context() { return context_.get(); } 48 ServiceWorkerProviderContext* context() { return context_.get(); }
50 49
51 int provider_id() const { return provider_id_; } 50 int provider_id() const { return provider_id_; }
52 51
53 private: 52 private:
54 void RemoveProviderClient(); 53 void RemoveProviderClient();
55 ServiceWorkerDispatcher* GetDispatcher(); 54 ServiceWorkerDispatcher* GetDispatcher();
56 55
57 scoped_refptr<ServiceWorkerMessageSender> sender_; 56 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
58 scoped_refptr<ServiceWorkerProviderContext> context_; 57 scoped_refptr<ServiceWorkerProviderContext> context_;
59 const int provider_id_; 58 const int provider_id_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerProviderImpl); 60 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerProviderImpl);
62 }; 61 };
63 62
64 } // namespace content 63 } // namespace content
65 64
66 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_ 65 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698