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 "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" |
15 #include "ui/base/layout.h" | 15 #include "ui/base/layout.h" |
16 #include "webkit/glue/resource_loader_bridge.h" | 16 #include "webkit/glue/resource_loader_bridge.h" |
| 17 #include "webkit/glue/webfallbackthemeengine_impl.h" |
17 #include "webkit/glue/webkit_glue_export.h" | 18 #include "webkit/glue/webkit_glue_export.h" |
18 | 19 |
19 #if defined(USE_DEFAULT_RENDER_THEME) | 20 #if defined(USE_DEFAULT_RENDER_THEME) |
20 #include "webkit/glue/webthemeengine_impl_default.h" | 21 #include "webkit/glue/webthemeengine_impl_default.h" |
21 #elif defined(OS_WIN) | 22 #elif defined(OS_WIN) |
22 #include "webkit/glue/webthemeengine_impl_win.h" | 23 #include "webkit/glue/webthemeengine_impl_win.h" |
23 #elif defined(OS_MACOSX) | 24 #elif defined(OS_MACOSX) |
24 #include "webkit/glue/webthemeengine_impl_mac.h" | 25 #include "webkit/glue/webthemeengine_impl_mac.h" |
25 #elif defined(OS_ANDROID) | 26 #elif defined(OS_ANDROID) |
26 #include "webkit/glue/webthemeengine_impl_android.h" | 27 #include "webkit/glue/webthemeengine_impl_android.h" |
(...skipping 23 matching lines...) Expand all Loading... |
50 public: | 51 public: |
51 WebKitPlatformSupportImpl(); | 52 WebKitPlatformSupportImpl(); |
52 virtual ~WebKitPlatformSupportImpl(); | 53 virtual ~WebKitPlatformSupportImpl(); |
53 | 54 |
54 void SetFlingCurveParameters( | 55 void SetFlingCurveParameters( |
55 const std::vector<float>& new_touchpad, | 56 const std::vector<float>& new_touchpad, |
56 const std::vector<float>& new_touchscreen); | 57 const std::vector<float>& new_touchscreen); |
57 | 58 |
58 // Platform methods (partial implementation): | 59 // Platform methods (partial implementation): |
59 virtual WebKit::WebThemeEngine* themeEngine(); | 60 virtual WebKit::WebThemeEngine* themeEngine(); |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 shared_timer_func_(); | 181 shared_timer_func_(); |
180 } | 182 } |
181 static void DestroyCurrentThread(void*); | 183 static void DestroyCurrentThread(void*); |
182 | 184 |
183 base::MessageLoop* main_loop_; | 185 base::MessageLoop* main_loop_; |
184 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 186 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
185 void (*shared_timer_func_)(); | 187 void (*shared_timer_func_)(); |
186 double shared_timer_fire_time_; | 188 double shared_timer_fire_time_; |
187 bool shared_timer_fire_time_was_set_while_suspended_; | 189 bool shared_timer_fire_time_was_set_while_suspended_; |
188 int shared_timer_suspended_; // counter | 190 int shared_timer_suspended_; // counter |
189 WebThemeEngineImpl theme_engine_; | 191 WebThemeEngineImpl native_theme_engine_; |
| 192 WebFallbackThemeEngineImpl fallback_theme_engine_; |
190 base::ThreadLocalStorage::Slot current_thread_slot_; | 193 base::ThreadLocalStorage::Slot current_thread_slot_; |
191 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; | 194 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; |
192 }; | 195 }; |
193 | 196 |
194 } // namespace webkit_glue | 197 } // namespace webkit_glue |
195 | 198 |
196 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 199 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
OLD | NEW |