Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: content/test/layouttest_support.cc

Issue 323663002: Revert of Call RenderViewImpl::SetScreenOrientationForTesting to make sure that events are not sent when orie… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/screen_orientation/mock_screen_orientation_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 97 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) {
98 RendererWebKitPlatformSupportImpl:: 98 RendererWebKitPlatformSupportImpl::
99 SetMockDeviceOrientationDataForTesting(data); 99 SetMockDeviceOrientationDataForTesting(data);
100 } 100 }
101 101
102 void SetMockScreenOrientation( 102 void SetMockScreenOrientation(
103 RenderView* render_view, 103 RenderView* render_view,
104 const blink::WebScreenOrientationType& orientation) { 104 const blink::WebScreenOrientationType& orientation) {
105 static_cast<RenderViewImpl*>(render_view)
106 ->SetScreenOrientationForTesting(orientation);
107 // FIXME(ostap): Remove this when blink side gets updated.
105 RendererWebKitPlatformSupportImpl:: 108 RendererWebKitPlatformSupportImpl::
106 SetMockScreenOrientationForTesting(render_view, orientation); 109 SetMockScreenOrientationForTesting(orientation);
107 } 110 }
108 111
109 void ResetMockScreenOrientation() 112 void ResetMockScreenOrientation()
110 { 113 {
111 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting(); 114 RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting();
112 } 115 }
113 116
114 void EnableRendererLayoutTestMode() { 117 void EnableRendererLayoutTestMode() {
115 RenderThreadImpl::current()->set_layout_test_mode(true); 118 RenderThreadImpl::current()->set_layout_test_mode(true);
116 } 119 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 result.append( 293 result.append(
291 DumpHistoryItem(entry->root_history_node(), 294 DumpHistoryItem(entry->root_history_node(),
292 8, 295 8,
293 index == current_index)); 296 index == current_index));
294 } 297 }
295 result.append("===============================================\n"); 298 result.append("===============================================\n");
296 return result; 299 return result;
297 } 300 }
298 301
299 } // namespace content 302 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/screen_orientation/mock_screen_orientation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698