| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 void MockGamepadConnected(int index, const WebGamepad& pad) { | 86 void MockGamepadConnected(int index, const WebGamepad& pad) { |
| 87 RendererWebKitPlatformSupportImpl::MockGamepadConnected(index, pad); | 87 RendererWebKitPlatformSupportImpl::MockGamepadConnected(index, pad); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void MockGamepadDisconnected(int index, const WebGamepad& pad) { | 90 void MockGamepadDisconnected(int index, const WebGamepad& pad) { |
| 91 RendererWebKitPlatformSupportImpl::MockGamepadDisconnected(index, pad); | 91 RendererWebKitPlatformSupportImpl::MockGamepadDisconnected(index, pad); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void SetMockDeviceLightData(const double& data) { |
| 95 RendererWebKitPlatformSupportImpl:: |
| 96 SetMockDeviceLightDataForTesting(data); |
| 97 } |
| 98 |
| 94 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { | 99 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { |
| 95 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); | 100 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); |
| 96 } | 101 } |
| 97 | 102 |
| 98 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { | 103 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { |
| 99 RendererWebKitPlatformSupportImpl:: | 104 RendererWebKitPlatformSupportImpl:: |
| 100 SetMockDeviceOrientationDataForTesting(data); | 105 SetMockDeviceOrientationDataForTesting(data); |
| 101 } | 106 } |
| 102 | 107 |
| 103 void SetMockScreenOrientation(const blink::WebScreenOrientation& orientation) { | 108 void SetMockScreenOrientation(const blink::WebScreenOrientation& orientation) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 DisableAutoResizeForTesting(new_size); | 165 DisableAutoResizeForTesting(new_size); |
| 161 } | 166 } |
| 162 | 167 |
| 163 void UseMockMediaStreams(RenderView* render_view) { | 168 void UseMockMediaStreams(RenderView* render_view) { |
| 164 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); | 169 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); |
| 165 render_view_impl->SetMediaStreamClientForTesting( | 170 render_view_impl->SetMediaStreamClientForTesting( |
| 166 new TestMediaStreamClient(render_view_impl)); | 171 new TestMediaStreamClient(render_view_impl)); |
| 167 } | 172 } |
| 168 | 173 |
| 169 } // namespace content | 174 } // namespace content |
| OLD | NEW |