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/webfallbackthemeengine_impl.h" |
16 #include "webkit/glue/webkit_glue_export.h" | 17 #include "webkit/glue/webkit_glue_export.h" |
17 | 18 |
18 #if defined(USE_DEFAULT_RENDER_THEME) | 19 #if defined(OS_WIN) |
19 #include "webkit/glue/webthemeengine_impl_default.h" | |
20 #elif defined(OS_WIN) | |
21 #include "webkit/glue/webthemeengine_impl_win.h" | 20 #include "webkit/glue/webthemeengine_impl_win.h" |
22 #elif defined(OS_MACOSX) | 21 #elif defined(OS_MACOSX) |
23 #include "webkit/glue/webthemeengine_impl_mac.h" | 22 #include "webkit/glue/webthemeengine_impl_mac.h" |
24 #elif defined(OS_ANDROID) | 23 #elif defined(OS_ANDROID) |
25 #include "webkit/glue/webthemeengine_impl_android.h" | 24 #include "webkit/glue/webthemeengine_impl_android.h" |
26 #include "webkit/media/audio_decoder.h" | 25 #include "webkit/media/audio_decoder.h" |
27 #endif | 26 #endif |
28 | 27 |
29 namespace base { | 28 namespace base { |
30 class MessageLoop; | 29 class MessageLoop; |
(...skipping 18 matching lines...) Expand all Loading... |
49 NON_EXPORTED_BASE(public WebKit::Platform) { | 48 NON_EXPORTED_BASE(public WebKit::Platform) { |
50 public: | 49 public: |
51 WebKitPlatformSupportImpl(); | 50 WebKitPlatformSupportImpl(); |
52 virtual ~WebKitPlatformSupportImpl(); | 51 virtual ~WebKitPlatformSupportImpl(); |
53 | 52 |
54 void SetFlingCurveParameters( | 53 void SetFlingCurveParameters( |
55 const std::vector<float>& new_touchpad, | 54 const std::vector<float>& new_touchpad, |
56 const std::vector<float>& new_touchscreen); | 55 const std::vector<float>& new_touchscreen); |
57 | 56 |
58 // Platform methods (partial implementation): | 57 // Platform methods (partial implementation): |
| 58 #if !defined(USE_DEFAULT_RENDER_THEME) |
59 virtual WebKit::WebThemeEngine* themeEngine(); | 59 virtual WebKit::WebThemeEngine* themeEngine(); |
| 60 #endif |
| 61 virtual WebKit::WebFallbackThemeEngine* fallbackThemeEngine(); |
60 | 62 |
61 virtual base::PlatformFile databaseOpenFile( | 63 virtual base::PlatformFile databaseOpenFile( |
62 const WebKit::WebString& vfs_file_name, int desired_flags); | 64 const WebKit::WebString& vfs_file_name, int desired_flags); |
63 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 65 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
64 bool sync_dir); | 66 bool sync_dir); |
65 virtual long databaseGetFileAttributes( | 67 virtual long databaseGetFileAttributes( |
66 const WebKit::WebString& vfs_file_name); | 68 const WebKit::WebString& vfs_file_name); |
67 virtual long long databaseGetFileSize(const WebKit::WebString& vfs_file_name); | 69 virtual long long databaseGetFileSize(const WebKit::WebString& vfs_file_name); |
68 virtual long long databaseGetSpaceAvailableForOrigin( | 70 virtual long long databaseGetSpaceAvailableForOrigin( |
69 const WebKit::WebString& origin_identifier); | 71 const WebKit::WebString& origin_identifier); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 shared_timer_func_(); | 186 shared_timer_func_(); |
185 } | 187 } |
186 static void DestroyCurrentThread(void*); | 188 static void DestroyCurrentThread(void*); |
187 | 189 |
188 base::MessageLoop* main_loop_; | 190 base::MessageLoop* main_loop_; |
189 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 191 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
190 void (*shared_timer_func_)(); | 192 void (*shared_timer_func_)(); |
191 double shared_timer_fire_time_; | 193 double shared_timer_fire_time_; |
192 bool shared_timer_fire_time_was_set_while_suspended_; | 194 bool shared_timer_fire_time_was_set_while_suspended_; |
193 int shared_timer_suspended_; // counter | 195 int shared_timer_suspended_; // counter |
194 WebThemeEngineImpl theme_engine_; | 196 WebThemeEngineImpl native_theme_engine_; |
| 197 WebFallbackThemeEngineImpl fallback_theme_engine_; |
195 base::ThreadLocalStorage::Slot current_thread_slot_; | 198 base::ThreadLocalStorage::Slot current_thread_slot_; |
196 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; | 199 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_; |
197 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | 200 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; |
198 }; | 201 }; |
199 | 202 |
200 } // namespace webkit_glue | 203 } // namespace webkit_glue |
201 | 204 |
202 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 205 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |