Chromium Code Reviews| 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" |
| 11 #include "base/timer.h" | 11 #include "base/timer.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo rmSupport.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo rmSupport.h" |
| 13 #include "ui/base/layout.h" | 13 #include "ui/base/layout.h" |
| 14 #include "webkit/compositor/web_compositor_support_impl.h" | |
| 14 #include "webkit/glue/resource_loader_bridge.h" | 15 #include "webkit/glue/resource_loader_bridge.h" |
| 15 #include "webkit/glue/webkit_glue_export.h" | 16 #include "webkit/glue/webkit_glue_export.h" |
| 16 | 17 |
| 17 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
| 18 #include "webkit/glue/webthemeengine_impl_win.h" | 19 #include "webkit/glue/webthemeengine_impl_win.h" |
| 19 #elif defined(OS_MACOSX) | 20 #elif defined(OS_MACOSX) |
| 20 #include "webkit/glue/webthemeengine_impl_mac.h" | 21 #include "webkit/glue/webthemeengine_impl_mac.h" |
| 21 #elif defined(OS_ANDROID) | 22 #elif defined(OS_ANDROID) |
| 22 #include "webkit/glue/webthemeengine_impl_android.h" | 23 #include "webkit/glue/webthemeengine_impl_android.h" |
| 23 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 24 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 virtual double currentTime(); | 113 virtual double currentTime(); |
| 113 virtual double monotonicallyIncreasingTime(); | 114 virtual double monotonicallyIncreasingTime(); |
| 114 virtual void cryptographicallyRandomValues( | 115 virtual void cryptographicallyRandomValues( |
| 115 unsigned char* buffer, size_t length); | 116 unsigned char* buffer, size_t length); |
| 116 virtual void setSharedTimerFiredFunction(void (*func)()); | 117 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 117 virtual void setSharedTimerFireInterval(double interval_seconds); | 118 virtual void setSharedTimerFireInterval(double interval_seconds); |
| 118 virtual void stopSharedTimer(); | 119 virtual void stopSharedTimer(); |
| 119 virtual void callOnMainThread(void (*func)(void*), void* context); | 120 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 120 virtual WebKit::WebThread* createThread(const char* name); | 121 virtual WebKit::WebThread* createThread(const char* name); |
| 121 virtual WebKit::WebThread* currentThread(); | 122 virtual WebKit::WebThread* currentThread(); |
| 123 virtual WebKit::WebCompositorSupport* compositorSupport(); | |
| 122 | 124 |
| 123 | 125 |
| 124 // Embedder functions. The following are not implemented by the glue layer and | 126 // Embedder functions. The following are not implemented by the glue layer and |
| 125 // need to be specialized by the embedder. | 127 // need to be specialized by the embedder. |
| 126 | 128 |
| 127 // Gets a localized string given a message id. Returns an empty string if the | 129 // Gets a localized string given a message id. Returns an empty string if the |
| 128 // message id is not found. | 130 // message id is not found. |
| 129 virtual string16 GetLocalizedString(int message_id) = 0; | 131 virtual string16 GetLocalizedString(int message_id) = 0; |
| 130 | 132 |
| 131 // Returns the raw data for a resource. This resource must have been | 133 // Returns the raw data for a resource. This resource must have been |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 } | 166 } |
| 165 static void DestroyCurrentThread(void*); | 167 static void DestroyCurrentThread(void*); |
| 166 | 168 |
| 167 MessageLoop* main_loop_; | 169 MessageLoop* main_loop_; |
| 168 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; | 170 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; |
| 169 void (*shared_timer_func_)(); | 171 void (*shared_timer_func_)(); |
| 170 double shared_timer_fire_time_; | 172 double shared_timer_fire_time_; |
| 171 int shared_timer_suspended_; // counter | 173 int shared_timer_suspended_; // counter |
| 172 WebThemeEngineImpl theme_engine_; | 174 WebThemeEngineImpl theme_engine_; |
| 173 base::ThreadLocalStorage::Slot current_thread_slot_; | 175 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 176 webkit::WebCompositorSupportImpl compositor_support_; | |
|
tfarina
2012/09/01 01:55:09
can this be a scoped_ptr? up to you though. At lea
| |
| 174 }; | 177 }; |
| 175 | 178 |
| 176 } // namespace webkit_glue | 179 } // namespace webkit_glue |
| 177 | 180 |
| 178 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 181 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
| OLD | NEW |