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 #include "content/public/test/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
10 #include "content/common/gpu/image_transport_surface.h" | 10 #include "content/common/gpu/image_transport_surface.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 g_callback.Get() = callback; | 79 g_callback.Get() = callback; |
80 RenderViewImpl::InstallCreateHook(CreateWebTestProxy); | 80 RenderViewImpl::InstallCreateHook(CreateWebTestProxy); |
81 RenderFrameImpl::InstallCreateHook(CreateWebFrameTestProxy); | 81 RenderFrameImpl::InstallCreateHook(CreateWebFrameTestProxy); |
82 } | 82 } |
83 | 83 |
84 void SetMockGamepadProvider(RendererGamepadProvider* provider) { | 84 void SetMockGamepadProvider(RendererGamepadProvider* provider) { |
85 RenderThreadImpl::current()->webkit_platform_support()-> | 85 RenderThreadImpl::current()->webkit_platform_support()-> |
86 set_gamepad_provider(provider); | 86 set_gamepad_provider(provider); |
87 } | 87 } |
88 | 88 |
| 89 void SetMockDeviceLightData(const double data) { |
| 90 RendererWebKitPlatformSupportImpl::SetMockDeviceLightDataForTesting(data); |
| 91 } |
| 92 |
89 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { | 93 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { |
90 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); | 94 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); |
91 } | 95 } |
92 | 96 |
93 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { | 97 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { |
94 RendererWebKitPlatformSupportImpl:: | 98 RendererWebKitPlatformSupportImpl:: |
95 SetMockDeviceOrientationDataForTesting(data); | 99 SetMockDeviceOrientationDataForTesting(data); |
96 } | 100 } |
97 | 101 |
98 void MockBatteryStatusChanged(const WebBatteryStatus& status) { | 102 void MockBatteryStatusChanged(const WebBatteryStatus& status) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 } | 286 } |
283 result.append("===============================================\n"); | 287 result.append("===============================================\n"); |
284 return result; | 288 return result; |
285 } | 289 } |
286 | 290 |
287 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { | 291 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { |
288 return new WebLayerImpl(layer); | 292 return new WebLayerImpl(layer); |
289 } | 293 } |
290 | 294 |
291 } // namespace content | 295 } // namespace content |
OLD | NEW |