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

Side by Side Diff: webkit/glue/webkitplatformsupport_impl.h

Issue 12457043: Android implementation of WebAudio audio file decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months 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 (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
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 static void NullRunWebAudioMediaCodec(
qinmin 2013/04/12 14:43:08 you don't need a static member function here. You
180 base::SharedMemoryHandle encoded_data_handle,
181 base::FileDescriptor pcm_output);
182 #endif
175 private: 183 private:
176 void DoTimeout() { 184 void DoTimeout() {
177 if (shared_timer_func_ && !shared_timer_suspended_) 185 if (shared_timer_func_ && !shared_timer_suspended_)
178 shared_timer_func_(); 186 shared_timer_func_();
179 } 187 }
180 static void DestroyCurrentThread(void*); 188 static void DestroyCurrentThread(void*);
181 189
182 base::MessageLoop* main_loop_; 190 base::MessageLoop* main_loop_;
183 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; 191 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_;
184 void (*shared_timer_func_)(); 192 void (*shared_timer_func_)();
185 double shared_timer_fire_time_; 193 double shared_timer_fire_time_;
186 bool shared_timer_fire_time_was_set_while_suspended_; 194 bool shared_timer_fire_time_was_set_while_suspended_;
187 int shared_timer_suspended_; // counter 195 int shared_timer_suspended_; // counter
188 WebThemeEngineImpl theme_engine_; 196 WebThemeEngineImpl theme_engine_;
189 base::ThreadLocalStorage::Slot current_thread_slot_; 197 base::ThreadLocalStorage::Slot current_thread_slot_;
190 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; 198 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_;
191 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; 199 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_;
192 }; 200 };
193 201
194 } // namespace webkit_glue 202 } // namespace webkit_glue
195 203
196 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ 204 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698