| 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 16 matching lines...) Expand all Loading... |
| 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 WebCryptoImpl; | 36 class WebCryptoImpl; |
| 37 class WebGeofencingProviderImpl; |
| 37 | 38 |
| 38 class CONTENT_EXPORT BlinkPlatformImpl | 39 class CONTENT_EXPORT BlinkPlatformImpl |
| 39 : NON_EXPORTED_BASE(public blink::Platform) { | 40 : NON_EXPORTED_BASE(public blink::Platform) { |
| 40 public: | 41 public: |
| 41 BlinkPlatformImpl(); | 42 BlinkPlatformImpl(); |
| 42 virtual ~BlinkPlatformImpl(); | 43 virtual ~BlinkPlatformImpl(); |
| 43 | 44 |
| 44 // Platform methods (partial implementation): | 45 // Platform methods (partial implementation): |
| 45 virtual blink::WebThemeEngine* themeEngine(); | 46 virtual blink::WebThemeEngine* themeEngine(); |
| 46 virtual blink::WebFallbackThemeEngine* fallbackThemeEngine(); | 47 virtual blink::WebFallbackThemeEngine* fallbackThemeEngine(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 virtual void callOnMainThread(void (*func)(void*), void* context); | 146 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 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) OVERRIDE; | 150 const blink::WebSize& cumulative_scroll) OVERRIDE; |
| 150 virtual void didStartWorkerRunLoop( | 151 virtual void didStartWorkerRunLoop( |
| 151 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; | 152 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; |
| 152 virtual void didStopWorkerRunLoop( | 153 virtual void didStopWorkerRunLoop( |
| 153 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; | 154 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; |
| 154 virtual blink::WebCrypto* crypto() OVERRIDE; | 155 virtual blink::WebCrypto* crypto() OVERRIDE; |
| 156 virtual blink::WebGeofencingProvider* geofencingProvider() OVERRIDE; |
| 155 | 157 |
| 156 void SetFlingCurveParameters(const std::vector<float>& new_touchpad, | 158 void SetFlingCurveParameters(const std::vector<float>& new_touchpad, |
| 157 const std::vector<float>& new_touchscreen); | 159 const std::vector<float>& new_touchscreen); |
| 158 | 160 |
| 159 void SuspendSharedTimer(); | 161 void SuspendSharedTimer(); |
| 160 void ResumeSharedTimer(); | 162 void ResumeSharedTimer(); |
| 161 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 163 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
| 162 | 164 |
| 163 private: | 165 private: |
| 164 static void DestroyCurrentThread(void*); | 166 static void DestroyCurrentThread(void*); |
| 165 | 167 |
| 166 void DoTimeout() { | 168 void DoTimeout() { |
| 167 if (shared_timer_func_ && !shared_timer_suspended_) | 169 if (shared_timer_func_ && !shared_timer_suspended_) |
| 168 shared_timer_func_(); | 170 shared_timer_func_(); |
| 169 } | 171 } |
| 170 | 172 |
| 171 WebThemeEngineImpl native_theme_engine_; | 173 WebThemeEngineImpl native_theme_engine_; |
| 172 WebFallbackThemeEngineImpl fallback_theme_engine_; | 174 WebFallbackThemeEngineImpl fallback_theme_engine_; |
| 173 base::MessageLoop* main_loop_; | 175 base::MessageLoop* main_loop_; |
| 174 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; | 176 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; |
| 175 void (*shared_timer_func_)(); | 177 void (*shared_timer_func_)(); |
| 176 double shared_timer_fire_time_; | 178 double shared_timer_fire_time_; |
| 177 bool shared_timer_fire_time_was_set_while_suspended_; | 179 bool shared_timer_fire_time_was_set_while_suspended_; |
| 178 int shared_timer_suspended_; // counter | 180 int shared_timer_suspended_; // counter |
| 179 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | 181 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; |
| 180 base::ThreadLocalStorage::Slot current_thread_slot_; | 182 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 181 WebCryptoImpl web_crypto_; | 183 WebCryptoImpl web_crypto_; |
| 184 scoped_ptr<WebGeofencingProviderImpl> web_geofencing_provider_; |
| 182 }; | 185 }; |
| 183 | 186 |
| 184 } // namespace content | 187 } // namespace content |
| 185 | 188 |
| 186 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 189 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
| OLD | NEW |