| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { | 89 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { |
| 90 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); | 90 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { | 93 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { |
| 94 RendererWebKitPlatformSupportImpl:: | 94 RendererWebKitPlatformSupportImpl:: |
| 95 SetMockDeviceOrientationDataForTesting(data); | 95 SetMockDeviceOrientationDataForTesting(data); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void SetMockScreenOrientation( | |
| 99 RenderView* render_view, | |
| 100 const blink::WebScreenOrientationType& orientation) { | |
| 101 RendererWebKitPlatformSupportImpl:: | |
| 102 SetMockScreenOrientationForTesting(render_view, orientation); | |
| 103 } | |
| 104 | |
| 105 void ResetMockScreenOrientation() | |
| 106 { | |
| 107 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting(); | |
| 108 } | |
| 109 | |
| 110 void MockBatteryStatusChanged(const WebBatteryStatus& status) { | 98 void MockBatteryStatusChanged(const WebBatteryStatus& status) { |
| 111 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); | 99 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); |
| 112 } | 100 } |
| 113 | 101 |
| 114 void EnableRendererLayoutTestMode() { | 102 void EnableRendererLayoutTestMode() { |
| 115 RenderThreadImpl::current()->set_layout_test_mode(true); | 103 RenderThreadImpl::current()->set_layout_test_mode(true); |
| 116 } | 104 } |
| 117 | 105 |
| 118 void EnableBrowserLayoutTestMode() { | 106 void EnableBrowserLayoutTestMode() { |
| 119 #if defined(OS_MACOSX) | 107 #if defined(OS_MACOSX) |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 282 } |
| 295 result.append("===============================================\n"); | 283 result.append("===============================================\n"); |
| 296 return result; | 284 return result; |
| 297 } | 285 } |
| 298 | 286 |
| 299 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { | 287 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { |
| 300 return new WebLayerImpl(layer); | 288 return new WebLayerImpl(layer); |
| 301 } | 289 } |
| 302 | 290 |
| 303 } // namespace content | 291 } // namespace content |
| OLD | NEW |