| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 5 #ifndef WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
| 6 #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 6 #define WEBKIT_PLATFORM_SUPPORT_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/platform_file.h" | 10 #include "base/platform_file.h" |
| 11 #include "base/threading/thread_local_storage.h" | 11 #include "base/threading/thread_local_storage.h" |
| 12 #include "base/timer.h" | 12 #include "base/timer.h" |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" |
| 14 #include "ui/base/layout.h" | 14 #include "ui/base/layout.h" |
| 15 #include "webkit/glue/resource_loader_bridge.h" | 15 #include "webkit/glue/resource_loader_bridge.h" |
| 16 #include "webkit/glue/webkit_glue_export.h" | 16 #include "webkit/glue/webkit_glue_export.h" |
| 17 | 17 |
| 18 #if defined(USE_DEFAULT_RENDER_THEME) | 18 #if defined(USE_DEFAULT_RENDER_THEME) |
| 19 #include "webkit/glue/webthemeengine_impl_default.h" | 19 #include "webkit/glue/webthemeengine_impl_default.h" |
| 20 #elif defined(OS_WIN) | 20 #elif defined(OS_WIN) |
| 21 #include "webkit/glue/webthemeengine_impl_win.h" | 21 #include "webkit/glue/webthemeengine_impl_win.h" |
| 22 #elif defined(OS_MACOSX) | 22 #elif defined(OS_MACOSX) |
| 23 #include "webkit/glue/webthemeengine_impl_mac.h" | 23 #include "webkit/glue/webthemeengine_impl_mac.h" |
| 24 #elif defined(OS_ANDROID) | 24 #elif defined(OS_ANDROID) |
| 25 #include "webkit/glue/webthemeengine_impl_android.h" | 25 #include "webkit/glue/webthemeengine_impl_android.h" |
| 26 #include "webkit/media/audio_decoder.h" |
| 26 #endif | 27 #endif |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| 29 class MessageLoop; | 30 class MessageLoop; |
| 30 } | 31 } |
| 31 | 32 |
| 32 namespace webkit { | 33 namespace webkit { |
| 33 class WebCompositorSupportImpl; | 34 class WebCompositorSupportImpl; |
| 34 struct WebPluginInfo; | 35 struct WebPluginInfo; |
| 35 } | 36 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 166 |
| 166 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | 167 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( |
| 167 int device_source, | 168 int device_source, |
| 168 const WebKit::WebFloatPoint& velocity, | 169 const WebKit::WebFloatPoint& velocity, |
| 169 const WebKit::WebSize& cumulative_scroll) OVERRIDE; | 170 const WebKit::WebSize& cumulative_scroll) OVERRIDE; |
| 170 | 171 |
| 171 webkit::WebCompositorSupportImpl* compositor_support_impl() const { | 172 webkit::WebCompositorSupportImpl* compositor_support_impl() const { |
| 172 return compositor_support_.get(); | 173 return compositor_support_.get(); |
| 173 } | 174 } |
| 174 | 175 |
| 176 #if defined(OS_ANDROID) |
| 177 virtual webkit_media::WebAudioMediaCodecRunner |
| 178 GetWebAudioMediaCodecRunner(); |
| 179 #endif |
| 175 private: | 180 private: |
| 176 void DoTimeout() { | 181 void DoTimeout() { |
| 177 if (shared_timer_func_ && !shared_timer_suspended_) | 182 if (shared_timer_func_ && !shared_timer_suspended_) |
| 178 shared_timer_func_(); | 183 shared_timer_func_(); |
| 179 } | 184 } |
| 180 static void DestroyCurrentThread(void*); | 185 static void DestroyCurrentThread(void*); |
| 181 | 186 |
| 182 base::MessageLoop* main_loop_; | 187 base::MessageLoop* main_loop_; |
| 183 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 188 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
| 184 void (*shared_timer_func_)(); | 189 void (*shared_timer_func_)(); |
| 185 double shared_timer_fire_time_; | 190 double shared_timer_fire_time_; |
| 186 bool shared_timer_fire_time_was_set_while_suspended_; | 191 bool shared_timer_fire_time_was_set_while_suspended_; |
| 187 int shared_timer_suspended_; // counter | 192 int shared_timer_suspended_; // counter |
| 188 WebThemeEngineImpl theme_engine_; | 193 WebThemeEngineImpl theme_engine_; |
| 189 base::ThreadLocalStorage::Slot current_thread_slot_; | 194 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 190 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; | 195 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; |
| 191 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | 196 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; |
| 192 }; | 197 }; |
| 193 | 198 |
| 194 } // namespace webkit_glue | 199 } // namespace webkit_glue |
| 195 | 200 |
| 196 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 201 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
| OLD | NEW |