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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { | 99 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { |
100 RendererWebKitPlatformSupportImpl:: | 100 RendererWebKitPlatformSupportImpl:: |
101 SetMockDeviceOrientationDataForTesting(data); | 101 SetMockDeviceOrientationDataForTesting(data); |
102 } | 102 } |
103 | 103 |
104 void SetMockScreenOrientation( | 104 void SetMockScreenOrientation( |
105 RenderView* render_view, | 105 RenderView* render_view, |
106 const blink::WebScreenOrientationType& orientation) { | 106 const blink::WebScreenOrientationType& orientation) { |
107 static_cast<RenderViewImpl*>(render_view) | |
108 ->SetScreenOrientationForTesting(orientation); | |
109 // FIXME(ostap): Remove this when blink side gets updated. | |
110 RendererWebKitPlatformSupportImpl:: | 107 RendererWebKitPlatformSupportImpl:: |
111 SetMockScreenOrientationForTesting(orientation); | 108 SetMockScreenOrientationForTesting(render_view, orientation); |
112 } | 109 } |
113 | 110 |
114 void ResetMockScreenOrientation() | 111 void ResetMockScreenOrientation() |
115 { | 112 { |
116 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting(); | 113 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting(); |
117 } | 114 } |
118 | 115 |
119 void MockBatteryStatusChanged(const WebBatteryStatus& status) { | 116 void MockBatteryStatusChanged(const WebBatteryStatus& status) { |
120 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); | 117 RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting(status); |
121 } | 118 } |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 result.append( | 296 result.append( |
300 DumpHistoryItem(entry->root_history_node(), | 297 DumpHistoryItem(entry->root_history_node(), |
301 8, | 298 8, |
302 index == current_index)); | 299 index == current_index)); |
303 } | 300 } |
304 result.append("===============================================\n"); | 301 result.append("===============================================\n"); |
305 return result; | 302 return result; |
306 } | 303 } |
307 | 304 |
308 } // namespace content | 305 } // namespace content |
OLD | NEW |