Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 15 matching lines...) Expand all Loading... | |
| 26 #elif defined(OS_ANDROID) | 26 #elif defined(OS_ANDROID) |
| 27 #include "content/child/webthemeengine_impl_android.h" | 27 #include "content/child/webthemeengine_impl_android.h" |
| 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; | |
| 37 class ThreadSafeSender; | |
| 36 class WebCryptoImpl; | 38 class WebCryptoImpl; |
| 37 class WebGeofencingProviderImpl; | 39 class WebGeofencingProviderImpl; |
| 38 | 40 |
| 39 class CONTENT_EXPORT BlinkPlatformImpl | 41 class CONTENT_EXPORT BlinkPlatformImpl |
| 40 : NON_EXPORTED_BASE(public blink::Platform) { | 42 : NON_EXPORTED_BASE(public blink::Platform) { |
| 41 public: | 43 public: |
| 42 BlinkPlatformImpl(); | 44 BlinkPlatformImpl(); |
| 43 virtual ~BlinkPlatformImpl(); | 45 virtual ~BlinkPlatformImpl(); |
| 44 | 46 |
| 45 // Platform methods (partial implementation): | 47 // Platform methods (partial implementation): |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 virtual void callOnMainThread(void (*func)(void*), void* context); | 149 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 148 virtual blink::WebGestureCurve* createFlingAnimationCurve( | 150 virtual blink::WebGestureCurve* createFlingAnimationCurve( |
| 149 blink::WebGestureDevice device_source, | 151 blink::WebGestureDevice device_source, |
| 150 const blink::WebFloatPoint& velocity, | 152 const blink::WebFloatPoint& velocity, |
| 151 const blink::WebSize& cumulative_scroll) override; | 153 const blink::WebSize& cumulative_scroll) override; |
| 152 virtual void didStartWorkerRunLoop( | 154 virtual void didStartWorkerRunLoop( |
| 153 const blink::WebWorkerRunLoop& runLoop) override; | 155 const blink::WebWorkerRunLoop& runLoop) override; |
| 154 virtual void didStopWorkerRunLoop( | 156 virtual void didStopWorkerRunLoop( |
| 155 const blink::WebWorkerRunLoop& runLoop) override; | 157 const blink::WebWorkerRunLoop& runLoop) override; |
| 156 virtual blink::WebCrypto* crypto() override; | 158 virtual blink::WebCrypto* crypto() override; |
| 157 virtual blink::WebGeofencingProvider* geofencingProvider() override; | 159 virtual blink::WebGeofencingProvider* geofencingProvider() override; |
|
Mike West
2014/10/24 13:20:18
Not-your-nit: We should drop these 'override' decl
Peter Beverloo
2014/10/24 13:57:35
https://codereview.chromium.org/679523004/
| |
| 160 virtual blink::WebNotificationManager* notificationManager(); | |
| 158 | 161 |
| 159 void SuspendSharedTimer(); | 162 void SuspendSharedTimer(); |
| 160 void ResumeSharedTimer(); | 163 void ResumeSharedTimer(); |
| 161 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 164 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
| 162 | 165 |
| 163 private: | 166 private: |
| 164 static void DestroyCurrentThread(void*); | 167 static void DestroyCurrentThread(void*); |
| 165 | 168 |
| 166 void DoTimeout() { | 169 void DoTimeout() { |
| 167 if (shared_timer_func_ && !shared_timer_suspended_) | 170 if (shared_timer_func_ && !shared_timer_suspended_) |
| 168 shared_timer_func_(); | 171 shared_timer_func_(); |
| 169 } | 172 } |
| 170 | 173 |
| 171 WebThemeEngineImpl native_theme_engine_; | 174 WebThemeEngineImpl native_theme_engine_; |
| 172 WebFallbackThemeEngineImpl fallback_theme_engine_; | 175 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 173 base::MessageLoop* main_loop_; | 176 base::MessageLoop* main_loop_; |
| 174 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; | 177 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; |
| 175 void (*shared_timer_func_)(); | 178 void (*shared_timer_func_)(); |
| 176 double shared_timer_fire_time_; | 179 double shared_timer_fire_time_; |
| 177 bool shared_timer_fire_time_was_set_while_suspended_; | 180 bool shared_timer_fire_time_was_set_while_suspended_; |
| 178 int shared_timer_suspended_; // counter | 181 int shared_timer_suspended_; // counter |
| 179 base::ThreadLocalStorage::Slot current_thread_slot_; | 182 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 180 WebCryptoImpl web_crypto_; | 183 WebCryptoImpl web_crypto_; |
| 181 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 184 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
| 185 | |
| 186 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | |
| 187 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | |
| 182 }; | 188 }; |
| 183 | 189 |
| 184 } // namespace content | 190 } // namespace content |
| 185 | 191 |
| 186 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 192 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |