| 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 "webkit/glue/resource_loader_bridge.h" | 14 #include "webkit/glue/resource_loader_bridge.h" |
| 14 #include "webkit/glue/webkit_glue_export.h" | 15 #include "webkit/glue/webkit_glue_export.h" |
| 15 | 16 |
| 16 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 17 #include "webkit/glue/webthemeengine_impl_win.h" | 18 #include "webkit/glue/webthemeengine_impl_win.h" |
| 18 #elif defined(OS_MACOSX) | 19 #elif defined(OS_MACOSX) |
| 19 #include "webkit/glue/webthemeengine_impl_mac.h" | 20 #include "webkit/glue/webthemeengine_impl_mac.h" |
| 20 #elif defined(OS_POSIX) | 21 #elif defined(OS_POSIX) |
| 21 #include "webkit/glue/webthemeengine_impl_linux.h" | 22 #include "webkit/glue/webthemeengine_impl_linux.h" |
| 22 #endif | 23 #endif |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 113 |
| 113 // Embedder functions. The following are not implemented by the glue layer and | 114 // Embedder functions. The following are not implemented by the glue layer and |
| 114 // need to be specialized by the embedder. | 115 // need to be specialized by the embedder. |
| 115 | 116 |
| 116 // Gets a localized string given a message id. Returns an empty string if the | 117 // Gets a localized string given a message id. Returns an empty string if the |
| 117 // message id is not found. | 118 // message id is not found. |
| 118 virtual string16 GetLocalizedString(int message_id) = 0; | 119 virtual string16 GetLocalizedString(int message_id) = 0; |
| 119 | 120 |
| 120 // Returns the raw data for a resource. This resource must have been | 121 // Returns the raw data for a resource. This resource must have been |
| 121 // specified as BINDATA in the relevant .rc file. | 122 // specified as BINDATA in the relevant .rc file. |
| 122 virtual base::StringPiece GetDataResource(int resource_id) = 0; | 123 virtual base::StringPiece GetDataResource(int resource_id, |
| 123 | 124 ui::ScaleFactor scale_factor) = 0; |
| 124 // Returns the raw data for an image resource with a scale factor as close as | |
| 125 // is available to |scale_factor|. This resource must have been specified as | |
| 126 // BINDATA in the relevant .rc file. | |
| 127 virtual base::StringPiece GetImageResource(int resource_id, | |
| 128 float scale_factor) = 0; | |
| 129 | 125 |
| 130 // Returns the list of plugins. | 126 // Returns the list of plugins. |
| 131 virtual void GetPlugins(bool refresh, | 127 virtual void GetPlugins(bool refresh, |
| 132 std::vector<webkit::WebPluginInfo>* plugins) = 0; | 128 std::vector<webkit::WebPluginInfo>* plugins) = 0; |
| 133 // Creates a ResourceLoaderBridge. | 129 // Creates a ResourceLoaderBridge. |
| 134 virtual ResourceLoaderBridge* CreateResourceLoader( | 130 virtual ResourceLoaderBridge* CreateResourceLoader( |
| 135 const ResourceLoaderBridge::RequestInfo& request_info) = 0; | 131 const ResourceLoaderBridge::RequestInfo& request_info) = 0; |
| 136 // Creates a WebSocketStreamHandleBridge. | 132 // Creates a WebSocketStreamHandleBridge. |
| 137 virtual WebSocketStreamHandleBridge* CreateWebSocketBridge( | 133 virtual WebSocketStreamHandleBridge* CreateWebSocketBridge( |
| 138 WebKit::WebSocketStreamHandle* handle, | 134 WebKit::WebSocketStreamHandle* handle, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 159 void (*shared_timer_func_)(); | 155 void (*shared_timer_func_)(); |
| 160 double shared_timer_fire_time_; | 156 double shared_timer_fire_time_; |
| 161 int shared_timer_suspended_; // counter | 157 int shared_timer_suspended_; // counter |
| 162 WebThemeEngineImpl theme_engine_; | 158 WebThemeEngineImpl theme_engine_; |
| 163 base::ThreadLocalStorage::Slot current_thread_slot_; | 159 base::ThreadLocalStorage::Slot current_thread_slot_; |
| 164 }; | 160 }; |
| 165 | 161 |
| 166 } // namespace webkit_glue | 162 } // namespace webkit_glue |
| 167 | 163 |
| 168 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ | 164 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ |
| OLD | NEW |