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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 namespace webkit { | 35 namespace webkit { |
36 struct WebPluginInfo; | 36 struct WebPluginInfo; |
37 } | 37 } |
38 | 38 |
39 namespace WebKit { | 39 namespace WebKit { |
40 class WebSocketStreamHandle; | 40 class WebSocketStreamHandle; |
41 } | 41 } |
42 | 42 |
43 namespace webkit_glue { | 43 namespace webkit_glue { |
44 | 44 |
45 class FlingCurveConfiguration; | |
46 class WebSocketStreamHandleDelegate; | 45 class WebSocketStreamHandleDelegate; |
47 class WebSocketStreamHandleBridge; | 46 class WebSocketStreamHandleBridge; |
48 | 47 |
49 class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : | 48 class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : |
50 NON_EXPORTED_BASE(public WebKit::Platform) { | 49 NON_EXPORTED_BASE(public WebKit::Platform) { |
51 public: | 50 public: |
52 WebKitPlatformSupportImpl(); | 51 WebKitPlatformSupportImpl(); |
53 virtual ~WebKitPlatformSupportImpl(); | 52 virtual ~WebKitPlatformSupportImpl(); |
54 | 53 |
55 void SetFlingCurveParameters( | |
56 const std::vector<float>& new_touchpad, | |
57 const std::vector<float>& new_touchscreen); | |
58 | |
59 // Platform methods (partial implementation): | 54 // Platform methods (partial implementation): |
60 virtual WebKit::WebThemeEngine* themeEngine(); | 55 virtual WebKit::WebThemeEngine* themeEngine(); |
61 virtual WebKit::WebFallbackThemeEngine* fallbackThemeEngine(); | 56 virtual WebKit::WebFallbackThemeEngine* fallbackThemeEngine(); |
62 | 57 |
63 virtual base::PlatformFile databaseOpenFile( | 58 virtual base::PlatformFile databaseOpenFile( |
64 const WebKit::WebString& vfs_file_name, int desired_flags); | 59 const WebKit::WebString& vfs_file_name, int desired_flags); |
65 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 60 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
66 bool sync_dir); | 61 bool sync_dir); |
67 virtual long databaseGetFileAttributes( | 62 virtual long databaseGetFileAttributes( |
68 const WebKit::WebString& vfs_file_name); | 63 const WebKit::WebString& vfs_file_name); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 157 |
163 void SuspendSharedTimer(); | 158 void SuspendSharedTimer(); |
164 void ResumeSharedTimer(); | 159 void ResumeSharedTimer(); |
165 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 160 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
166 | 161 |
167 virtual void didStartWorkerRunLoop( | 162 virtual void didStartWorkerRunLoop( |
168 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; | 163 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
169 virtual void didStopWorkerRunLoop( | 164 virtual void didStopWorkerRunLoop( |
170 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; | 165 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
171 | 166 |
172 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | |
173 int device_source, | |
174 const WebKit::WebFloatPoint& velocity, | |
175 const WebKit::WebSize& cumulative_scroll) OVERRIDE; | |
176 | |
177 #if defined(OS_ANDROID) | 167 #if defined(OS_ANDROID) |
178 virtual webkit_media::WebAudioMediaCodecRunner | 168 virtual webkit_media::WebAudioMediaCodecRunner |
179 GetWebAudioMediaCodecRunner(); | 169 GetWebAudioMediaCodecRunner(); |
180 #endif | 170 #endif |
181 private: | 171 private: |
182 void DoTimeout() { | 172 void DoTimeout() { |
183 if (shared_timer_func_ && !shared_timer_suspended_) | 173 if (shared_timer_func_ && !shared_timer_suspended_) |
184 shared_timer_func_(); | 174 shared_timer_func_(); |
185 } | 175 } |
186 static void DestroyCurrentThread(void*); | 176 static void DestroyCurrentThread(void*); |
187 | 177 |
188 base::MessageLoop* main_loop_; | 178 base::MessageLoop* main_loop_; |
189 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 179 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
190 void (*shared_timer_func_)(); | 180 void (*shared_timer_func_)(); |
191 double shared_timer_fire_time_; | 181 double shared_timer_fire_time_; |
192 bool shared_timer_fire_time_was_set_while_suspended_; | 182 bool shared_timer_fire_time_was_set_while_suspended_; |
193 int shared_timer_suspended_; // counter | 183 int shared_timer_suspended_; // counter |
194 WebThemeEngineImpl native_theme_engine_; | 184 WebThemeEngineImpl native_theme_engine_; |
195 WebFallbackThemeEngineImpl fallback_theme_engine_; | 185 WebFallbackThemeEngineImpl fallback_theme_engine_; |
196 base::ThreadLocalStorage::Slot current_thread_slot_; | 186 base::ThreadLocalStorage::Slot current_thread_slot_; |
197 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | |
198 }; | 187 }; |
199 | 188 |
200 } // namespace webkit_glue | 189 } // namespace webkit_glue |
201 | 190 |
202 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 191 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |