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

Side by Side Diff: content/child/blink_platform_impl.h

Issue 2473483012: Move content/child/background_sync to Blink. (Closed)
Patch Set: Code review changes Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 25 matching lines...) Expand all
36 class WaitableEvent; 36 class WaitableEvent;
37 } 37 }
38 38
39 namespace blink { 39 namespace blink {
40 namespace scheduler { 40 namespace scheduler {
41 class WebThreadBase; 41 class WebThreadBase;
42 } 42 }
43 } 43 }
44 44
45 namespace content { 45 namespace content {
46 class BackgroundSyncProvider; 46
47 class FlingCurveConfiguration;
dcheng 2016/11/08 07:23:12 Introduced accidentally by a rebase?
adithyas 2016/11/08 16:47:47 Yup, removed it :)
47 class NotificationDispatcher; 48 class NotificationDispatcher;
48 class PushDispatcher; 49 class PushDispatcher;
49 class ThreadSafeSender; 50 class ThreadSafeSender;
50 class WebCryptoImpl; 51 class WebCryptoImpl;
51 52
52 class CONTENT_EXPORT BlinkPlatformImpl 53 class CONTENT_EXPORT BlinkPlatformImpl
53 : NON_EXPORTED_BASE(public blink::Platform) { 54 : NON_EXPORTED_BASE(public blink::Platform) {
54 public: 55 public:
55 BlinkPlatformImpl(); 56 BlinkPlatformImpl();
56 explicit BlinkPlatformImpl( 57 explicit BlinkPlatformImpl(
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 blink::WebGestureDevice device_source, 107 blink::WebGestureDevice device_source,
107 const blink::WebFloatPoint& velocity, 108 const blink::WebFloatPoint& velocity,
108 const blink::WebSize& cumulative_scroll) override; 109 const blink::WebSize& cumulative_scroll) override;
109 void didStartWorkerThread() override; 110 void didStartWorkerThread() override;
110 void willStopWorkerThread() override; 111 void willStopWorkerThread() override;
111 bool allowScriptExtensionForServiceWorker( 112 bool allowScriptExtensionForServiceWorker(
112 const blink::WebURL& script_url) override; 113 const blink::WebURL& script_url) override;
113 blink::WebCrypto* crypto() override; 114 blink::WebCrypto* crypto() override;
114 blink::WebNotificationManager* notificationManager() override; 115 blink::WebNotificationManager* notificationManager() override;
115 blink::WebPushProvider* pushProvider() override; 116 blink::WebPushProvider* pushProvider() override;
116 blink::WebSyncProvider* backgroundSyncProvider() override;
117 117
118 blink::WebString domCodeStringFromEnum(int dom_code) override; 118 blink::WebString domCodeStringFromEnum(int dom_code) override;
119 int domEnumFromCodeString(const blink::WebString& codeString) override; 119 int domEnumFromCodeString(const blink::WebString& codeString) override;
120 blink::WebString domKeyStringFromEnum(int dom_key) override; 120 blink::WebString domKeyStringFromEnum(int dom_key) override;
121 int domKeyEnumFromString(const blink::WebString& key_string) override; 121 int domKeyEnumFromString(const blink::WebString& key_string) override;
122 122
123 // This class does *not* own the compositor thread. It is the responsibility 123 // This class does *not* own the compositor thread. It is the responsibility
124 // of the caller to ensure that the compositor thread is cleared before it is 124 // of the caller to ensure that the compositor thread is cleared before it is
125 // destructed. 125 // destructed.
126 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); 126 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread);
127 127
128 private: 128 private:
129 void InternalInit(); 129 void InternalInit();
130 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); 130 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread);
131 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); 131 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
132 132
133 bool IsMainThread() const; 133 bool IsMainThread() const;
134 134
135 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 135 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
136 WebThemeEngineImpl native_theme_engine_; 136 WebThemeEngineImpl native_theme_engine_;
137 WebFallbackThemeEngineImpl fallback_theme_engine_; 137 WebFallbackThemeEngineImpl fallback_theme_engine_;
138 base::ThreadLocalStorage::Slot current_thread_slot_; 138 base::ThreadLocalStorage::Slot current_thread_slot_;
139 webcrypto::WebCryptoImpl web_crypto_; 139 webcrypto::WebCryptoImpl web_crypto_;
140 140
141 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 141 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
142 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 142 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
143 scoped_refptr<PushDispatcher> push_dispatcher_; 143 scoped_refptr<PushDispatcher> push_dispatcher_;
144 std::unique_ptr<BackgroundSyncProvider> main_thread_sync_provider_;
145 144
146 blink::scheduler::WebThreadBase* compositor_thread_; 145 blink::scheduler::WebThreadBase* compositor_thread_;
147 }; 146 };
148 147
149 } // namespace content 148 } // namespace content
150 149
151 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 150 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698