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 class MessageLoop; | 29 class MessageLoop; |
29 | 30 |
30 namespace webkit { | 31 namespace webkit { |
31 class WebCompositorSupportImpl; | 32 class WebCompositorSupportImpl; |
32 struct WebPluginInfo; | 33 struct WebPluginInfo; |
33 } | 34 } |
34 | 35 |
35 namespace WebKit { | 36 namespace WebKit { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 164 |
164 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | 165 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( |
165 int device_source, | 166 int device_source, |
166 const WebKit::WebFloatPoint& velocity, | 167 const WebKit::WebFloatPoint& velocity, |
167 const WebKit::WebSize& cumulative_scroll) OVERRIDE; | 168 const WebKit::WebSize& cumulative_scroll) OVERRIDE; |
168 | 169 |
169 webkit::WebCompositorSupportImpl* compositor_support_impl() const { | 170 webkit::WebCompositorSupportImpl* compositor_support_impl() const { |
170 return compositor_support_.get(); | 171 return compositor_support_.get(); |
171 } | 172 } |
172 | 173 |
| 174 #if defined(OS_ANDROID) |
| 175 virtual webkit_media::WebAudioMediaCodecRunner |
| 176 GetWebAudioMediaCodecRunner(); |
| 177 static void NullRunWebAudioMediaCodec( |
| 178 base::SharedMemoryHandle encoded_data_handle, |
| 179 base::FileDescriptor pcm_output); |
| 180 #endif |
173 private: | 181 private: |
174 void DoTimeout() { | 182 void DoTimeout() { |
175 if (shared_timer_func_ && !shared_timer_suspended_) | 183 if (shared_timer_func_ && !shared_timer_suspended_) |
176 shared_timer_func_(); | 184 shared_timer_func_(); |
177 } | 185 } |
178 static void DestroyCurrentThread(void*); | 186 static void DestroyCurrentThread(void*); |
179 | 187 |
180 MessageLoop* main_loop_; | 188 MessageLoop* main_loop_; |
181 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 189 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
182 void (*shared_timer_func_)(); | 190 void (*shared_timer_func_)(); |
183 double shared_timer_fire_time_; | 191 double shared_timer_fire_time_; |
184 bool shared_timer_fire_time_was_set_while_suspended_; | 192 bool shared_timer_fire_time_was_set_while_suspended_; |
185 int shared_timer_suspended_; // counter | 193 int shared_timer_suspended_; // counter |
186 WebThemeEngineImpl theme_engine_; | 194 WebThemeEngineImpl theme_engine_; |
187 base::ThreadLocalStorage::Slot current_thread_slot_; | 195 base::ThreadLocalStorage::Slot current_thread_slot_; |
188 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; | 196 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; |
189 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | 197 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; |
190 }; | 198 }; |
191 | 199 |
192 } // namespace webkit_glue | 200 } // namespace webkit_glue |
193 | 201 |
194 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 202 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |