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

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

Issue 699843003: bluetooth: Impl uses new WebBluetoothDevice in content/browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: fix compile failure on android. Created 6 years 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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/threading/thread_local_storage.h" 10 #include "base/threading/thread_local_storage.h"
(...skipping 17 matching lines...) Expand all
28 #endif 28 #endif
29 29
30 namespace base { 30 namespace base {
31 class MessageLoop; 31 class MessageLoop;
32 } 32 }
33 33
34 namespace content { 34 namespace content {
35 class FlingCurveConfiguration; 35 class FlingCurveConfiguration;
36 class NotificationDispatcher; 36 class NotificationDispatcher;
37 class ThreadSafeSender; 37 class ThreadSafeSender;
38 class WebBluetoothImpl;
38 class WebCryptoImpl; 39 class WebCryptoImpl;
39 class WebGeofencingProviderImpl; 40 class WebGeofencingProviderImpl;
40 41
41 class CONTENT_EXPORT BlinkPlatformImpl 42 class CONTENT_EXPORT BlinkPlatformImpl
42 : NON_EXPORTED_BASE(public blink::Platform) { 43 : NON_EXPORTED_BASE(public blink::Platform) {
43 public: 44 public:
44 BlinkPlatformImpl(); 45 BlinkPlatformImpl();
45 explicit BlinkPlatformImpl( 46 explicit BlinkPlatformImpl(
46 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); 47 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);
47 virtual ~BlinkPlatformImpl(); 48 virtual ~BlinkPlatformImpl();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 virtual blink::WebGestureCurve* createFlingAnimationCurve( 147 virtual blink::WebGestureCurve* createFlingAnimationCurve(
147 blink::WebGestureDevice device_source, 148 blink::WebGestureDevice device_source,
148 const blink::WebFloatPoint& velocity, 149 const blink::WebFloatPoint& velocity,
149 const blink::WebSize& cumulative_scroll); 150 const blink::WebSize& cumulative_scroll);
150 virtual void didStartWorkerRunLoop( 151 virtual void didStartWorkerRunLoop(
151 const blink::WebWorkerRunLoop& runLoop); 152 const blink::WebWorkerRunLoop& runLoop);
152 virtual void didStopWorkerRunLoop( 153 virtual void didStopWorkerRunLoop(
153 const blink::WebWorkerRunLoop& runLoop); 154 const blink::WebWorkerRunLoop& runLoop);
154 virtual blink::WebCrypto* crypto(); 155 virtual blink::WebCrypto* crypto();
155 virtual blink::WebGeofencingProvider* geofencingProvider(); 156 virtual blink::WebGeofencingProvider* geofencingProvider();
157 virtual blink::WebBluetooth* bluetooth();
156 virtual blink::WebNotificationManager* notificationManager(); 158 virtual blink::WebNotificationManager* notificationManager();
157 159
158 void SuspendSharedTimer(); 160 void SuspendSharedTimer();
159 void ResumeSharedTimer(); 161 void ResumeSharedTimer();
160 virtual void OnStartSharedTimer(base::TimeDelta delay) {} 162 virtual void OnStartSharedTimer(base::TimeDelta delay) {}
161 163
164 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); }
165
162 private: 166 private:
163 static void DestroyCurrentThread(void*); 167 static void DestroyCurrentThread(void*);
164 168
165 void DoTimeout() { 169 void DoTimeout() {
166 if (shared_timer_func_ && !shared_timer_suspended_) 170 if (shared_timer_func_ && !shared_timer_suspended_)
167 shared_timer_func_(); 171 shared_timer_func_();
168 } 172 }
169 173
170 void InternalInit(); 174 void InternalInit();
171 175
172 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread(); 176 scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread();
173 177
174 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 178 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
175 WebThemeEngineImpl native_theme_engine_; 179 WebThemeEngineImpl native_theme_engine_;
176 WebFallbackThemeEngineImpl fallback_theme_engine_; 180 WebFallbackThemeEngineImpl fallback_theme_engine_;
177 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; 181 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
178 void (*shared_timer_func_)(); 182 void (*shared_timer_func_)();
179 double shared_timer_fire_time_; 183 double shared_timer_fire_time_;
180 bool shared_timer_fire_time_was_set_while_suspended_; 184 bool shared_timer_fire_time_was_set_while_suspended_;
181 int shared_timer_suspended_; // counter 185 int shared_timer_suspended_; // counter
182 base::ThreadLocalStorage::Slot current_thread_slot_; 186 base::ThreadLocalStorage::Slot current_thread_slot_;
183 WebCryptoImpl web_crypto_; 187 WebCryptoImpl web_crypto_;
184 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; 188 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_;
189 scoped_ptr<WebBluetoothImpl> bluetooth_;
185 190
186 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 191 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
187 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 192 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
188 }; 193 };
189 194
190 } // namespace content 195 } // namespace content
191 196
192 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 197 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698