| 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 CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/child/blink_platform_impl.h" | 10 #include "content/child/blink_platform_impl.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 class WebBatteryStatus; | 31 class WebBatteryStatus; |
| 32 class WebDeviceMotionData; | 32 class WebDeviceMotionData; |
| 33 class WebDeviceOrientationData; | 33 class WebDeviceOrientationData; |
| 34 class WebGraphicsContext3DProvider; | 34 class WebGraphicsContext3DProvider; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace content { | 37 namespace content { |
| 38 class BatteryStatusDispatcher; | 38 class BatteryStatusDispatcher; |
| 39 class DeviceLightEventPump; |
| 39 class DeviceMotionEventPump; | 40 class DeviceMotionEventPump; |
| 40 class DeviceOrientationEventPump; | 41 class DeviceOrientationEventPump; |
| 41 class QuotaMessageFilter; | 42 class QuotaMessageFilter; |
| 42 class RendererClipboardClient; | 43 class RendererClipboardClient; |
| 43 class RenderView; | 44 class RenderView; |
| 44 class RendererGamepadProvider; | 45 class RendererGamepadProvider; |
| 45 class ThreadSafeSender; | 46 class ThreadSafeSender; |
| 46 class WebClipboardImpl; | 47 class WebClipboardImpl; |
| 47 class WebDatabaseObserverImpl; | 48 class WebDatabaseObserverImpl; |
| 48 class WebFileSystemImpl; | 49 class WebFileSystemImpl; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( | 130 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
| 130 const blink::WebGraphicsContext3D::Attributes& attributes); | 131 const blink::WebGraphicsContext3D::Attributes& attributes); |
| 131 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( | 132 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
| 132 const blink::WebGraphicsContext3D::Attributes& attributes, | 133 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 133 blink::WebGraphicsContext3D* share_context); | 134 blink::WebGraphicsContext3D* share_context); |
| 134 virtual blink::WebGraphicsContext3DProvider* | 135 virtual blink::WebGraphicsContext3DProvider* |
| 135 createSharedOffscreenGraphicsContext3DProvider(); | 136 createSharedOffscreenGraphicsContext3DProvider(); |
| 136 virtual blink::WebCompositorSupport* compositorSupport(); | 137 virtual blink::WebCompositorSupport* compositorSupport(); |
| 137 virtual blink::WebString convertIDNToUnicode( | 138 virtual blink::WebString convertIDNToUnicode( |
| 138 const blink::WebString& host, const blink::WebString& languages); | 139 const blink::WebString& host, const blink::WebString& languages); |
| 140 virtual void setDeviceLightListener(blink::WebDeviceLightListener* listener); |
| 139 virtual void setDeviceMotionListener( | 141 virtual void setDeviceMotionListener( |
| 140 blink::WebDeviceMotionListener* listener); | 142 blink::WebDeviceMotionListener* listener); |
| 141 virtual void setDeviceOrientationListener( | 143 virtual void setDeviceOrientationListener( |
| 142 blink::WebDeviceOrientationListener* listener); | 144 blink::WebDeviceOrientationListener* listener); |
| 143 virtual void queryStorageUsageAndQuota( | 145 virtual void queryStorageUsageAndQuota( |
| 144 const blink::WebURL& storage_partition, | 146 const blink::WebURL& storage_partition, |
| 145 blink::WebStorageQuotaType, | 147 blink::WebStorageQuotaType, |
| 146 blink::WebStorageQuotaCallbacks); | 148 blink::WebStorageQuotaCallbacks); |
| 147 virtual void vibrate(unsigned int milliseconds); | 149 virtual void vibrate(unsigned int milliseconds); |
| 148 virtual void cancelVibration(); | 150 virtual void cancelVibration(); |
| 149 virtual void setBatteryStatusListener( | 151 virtual void setBatteryStatusListener( |
| 150 blink::WebBatteryStatusListener* listener); | 152 blink::WebBatteryStatusListener* listener); |
| 151 | 153 |
| 152 void set_gamepad_provider(RendererGamepadProvider* provider) { | 154 void set_gamepad_provider(RendererGamepadProvider* provider) { |
| 153 gamepad_provider_ = provider; | 155 gamepad_provider_ = provider; |
| 154 } | 156 } |
| 155 | 157 |
| 156 // Disables the WebSandboxSupport implementation for testing. | 158 // Disables the WebSandboxSupport implementation for testing. |
| 157 // Tests that do not set up a full sandbox environment should call | 159 // Tests that do not set up a full sandbox environment should call |
| 158 // SetSandboxEnabledForTesting(false) _before_ creating any instances | 160 // SetSandboxEnabledForTesting(false) _before_ creating any instances |
| 159 // of this class, to ensure that we don't attempt to use sandbox-related | 161 // of this class, to ensure that we don't attempt to use sandbox-related |
| 160 // file descriptors or other resources. | 162 // file descriptors or other resources. |
| 161 // | 163 // |
| 162 // Returns the previous |enable| value. | 164 // Returns the previous |enable| value. |
| 163 static bool SetSandboxEnabledForTesting(bool enable); | 165 static bool SetSandboxEnabledForTesting(bool enable); |
| 164 | 166 |
| 167 // Set a double to return when setDeviceLightListener is invoked. |
| 168 static void SetMockDeviceLightDataForTesting(double data); |
| 165 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. | 169 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. |
| 166 static void SetMockDeviceMotionDataForTesting( | 170 static void SetMockDeviceMotionDataForTesting( |
| 167 const blink::WebDeviceMotionData& data); | 171 const blink::WebDeviceMotionData& data); |
| 168 // Set WebDeviceOrientationData to return when setDeviceOrientationListener | 172 // Set WebDeviceOrientationData to return when setDeviceOrientationListener |
| 169 // is invoked. | 173 // is invoked. |
| 170 static void SetMockDeviceOrientationDataForTesting( | 174 static void SetMockDeviceOrientationDataForTesting( |
| 171 const blink::WebDeviceOrientationData& data); | 175 const blink::WebDeviceOrientationData& data); |
| 172 // Forces the screen orientation for testing purposes. | 176 // Forces the screen orientation for testing purposes. |
| 173 static void SetMockScreenOrientationForTesting( | 177 static void SetMockScreenOrientationForTesting( |
| 174 RenderView* render_view, | 178 RenderView* render_view, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 211 |
| 208 // If true, then a GetPlugins call is allowed to rescan the disk. | 212 // If true, then a GetPlugins call is allowed to rescan the disk. |
| 209 bool plugin_refresh_allowed_; | 213 bool plugin_refresh_allowed_; |
| 210 | 214 |
| 211 scoped_ptr<blink::WebIDBFactory> web_idb_factory_; | 215 scoped_ptr<blink::WebIDBFactory> web_idb_factory_; |
| 212 | 216 |
| 213 scoped_ptr<blink::WebBlobRegistry> blob_registry_; | 217 scoped_ptr<blink::WebBlobRegistry> blob_registry_; |
| 214 | 218 |
| 215 WebPublicSuffixListImpl public_suffix_list_; | 219 WebPublicSuffixListImpl public_suffix_list_; |
| 216 | 220 |
| 221 scoped_ptr<DeviceLightEventPump> device_light_event_pump_; |
| 217 scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_; | 222 scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_; |
| 218 scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_; | 223 scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_; |
| 219 | 224 |
| 220 scoped_refptr<base::MessageLoopProxy> child_thread_loop_; | 225 scoped_refptr<base::MessageLoopProxy> child_thread_loop_; |
| 221 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; | 226 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |
| 222 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 227 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 223 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 228 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
| 224 | 229 |
| 225 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; | 230 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; |
| 226 | 231 |
| 227 WebCompositorSupportImpl compositor_support_; | 232 WebCompositorSupportImpl compositor_support_; |
| 228 | 233 |
| 229 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; | 234 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; |
| 230 | 235 |
| 231 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; | 236 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; |
| 232 | 237 |
| 233 RendererGamepadProvider* gamepad_provider_; | 238 RendererGamepadProvider* gamepad_provider_; |
| 234 | 239 |
| 235 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); | 240 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); |
| 236 }; | 241 }; |
| 237 | 242 |
| 238 } // namespace content | 243 } // namespace content |
| 239 | 244 |
| 240 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 245 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
| OLD | NEW |