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

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

Issue 304403002: Gamepad: add test support for page visibility behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing override's 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/shell/renderer/webkit_test_runner.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } // namespace 74 } // namespace
75 75
76 76
77 void EnableWebTestProxyCreation( 77 void EnableWebTestProxyCreation(
78 const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback) { 78 const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback) {
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 SetMockGamepads(const WebGamepads& pads) { 84 void SetMockGamepadProvider(RendererGamepadProvider* provider) {
85 RendererWebKitPlatformSupportImpl::SetMockGamepadsForTesting(pads); 85 RenderThreadImpl::current()->webkit_platform_support()->
86 } 86 set_gamepad_provider(provider);
87
88 void MockGamepadConnected(int index, const WebGamepad& pad) {
89 RendererWebKitPlatformSupportImpl::MockGamepadConnected(index, pad);
90 }
91
92 void MockGamepadDisconnected(int index, const WebGamepad& pad) {
93 RendererWebKitPlatformSupportImpl::MockGamepadDisconnected(index, pad);
94 } 87 }
95 88
96 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { 89 void SetMockDeviceMotionData(const WebDeviceMotionData& data) {
97 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); 90 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data);
98 } 91 }
99 92
100 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 93 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) {
101 RendererWebKitPlatformSupportImpl:: 94 RendererWebKitPlatformSupportImpl::
102 SetMockDeviceOrientationDataForTesting(data); 95 SetMockDeviceOrientationDataForTesting(data);
103 } 96 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 294 }
302 result.append("===============================================\n"); 295 result.append("===============================================\n");
303 return result; 296 return result;
304 } 297 }
305 298
306 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { 299 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) {
307 return new WebLayerImpl(layer); 300 return new WebLayerImpl(layer);
308 } 301 }
309 302
310 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/webkit_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698