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