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/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/threading/thread_local_storage.h" | 10 #include "base/threading/thread_local_storage.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #endif | 25 #endif |
26 | 26 |
27 class MessageLoop; | 27 class MessageLoop; |
28 | 28 |
29 namespace webkit { | 29 namespace webkit { |
30 class WebCompositorSupportImpl; | 30 class WebCompositorSupportImpl; |
31 struct WebPluginInfo; | 31 struct WebPluginInfo; |
32 } | 32 } |
33 | 33 |
34 namespace WebKit { | 34 namespace WebKit { |
35 class WebFlingAnimator; | |
36 class WebSocketStreamHandle; | 35 class WebSocketStreamHandle; |
37 } | 36 } |
38 | 37 |
39 namespace webkit_glue { | 38 namespace webkit_glue { |
40 | 39 |
41 class WebSocketStreamHandleDelegate; | 40 class WebSocketStreamHandleDelegate; |
42 class WebSocketStreamHandleBridge; | 41 class WebSocketStreamHandleBridge; |
43 | 42 |
44 class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : | 43 class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : |
45 NON_EXPORTED_BASE(public WebKit::WebKitPlatformSupport) { | 44 NON_EXPORTED_BASE(public WebKit::WebKitPlatformSupport) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 146 |
148 void SuspendSharedTimer(); | 147 void SuspendSharedTimer(); |
149 void ResumeSharedTimer(); | 148 void ResumeSharedTimer(); |
150 virtual void OnStartSharedTimer(base::TimeDelta delay) {} | 149 virtual void OnStartSharedTimer(base::TimeDelta delay) {} |
151 | 150 |
152 virtual void didStartWorkerRunLoop( | 151 virtual void didStartWorkerRunLoop( |
153 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; | 152 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
154 virtual void didStopWorkerRunLoop( | 153 virtual void didStopWorkerRunLoop( |
155 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; | 154 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; |
156 | 155 |
157 #if defined(OS_ANDROID) | |
158 virtual WebKit::WebFlingAnimator* createFlingAnimator(); | |
159 #endif | |
160 | |
161 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | 156 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( |
162 int device_source, | 157 int device_source, |
163 const WebKit::WebFloatPoint& velocity, | 158 const WebKit::WebFloatPoint& velocity, |
164 const WebKit::WebSize& cumulative_scroll) OVERRIDE; | 159 const WebKit::WebSize& cumulative_scroll) OVERRIDE; |
165 | 160 |
166 private: | 161 private: |
167 void DoTimeout() { | 162 void DoTimeout() { |
168 if (shared_timer_func_ && !shared_timer_suspended_) | 163 if (shared_timer_func_ && !shared_timer_suspended_) |
169 shared_timer_func_(); | 164 shared_timer_func_(); |
170 } | 165 } |
171 static void DestroyCurrentThread(void*); | 166 static void DestroyCurrentThread(void*); |
172 | 167 |
173 MessageLoop* main_loop_; | 168 MessageLoop* main_loop_; |
174 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 169 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
175 void (*shared_timer_func_)(); | 170 void (*shared_timer_func_)(); |
176 double shared_timer_fire_time_; | 171 double shared_timer_fire_time_; |
177 int shared_timer_suspended_; // counter | 172 int shared_timer_suspended_; // counter |
178 WebThemeEngineImpl theme_engine_; | 173 WebThemeEngineImpl theme_engine_; |
179 base::ThreadLocalStorage::Slot current_thread_slot_; | 174 base::ThreadLocalStorage::Slot current_thread_slot_; |
180 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; | 175 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; |
181 }; | 176 }; |
182 | 177 |
183 } // namespace webkit_glue | 178 } // namespace webkit_glue |
184 | 179 |
185 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 180 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |