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

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

Issue 336823002: [DeviceLight] Add Layout support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SetMockGamepadProvider(RendererGamepadProvider* provider) { 84 void SetMockGamepadProvider(RendererGamepadProvider* provider) {
85 RenderThreadImpl::current()->webkit_platform_support()-> 85 RenderThreadImpl::current()->webkit_platform_support()->
86 set_gamepad_provider(provider); 86 set_gamepad_provider(provider);
87 } 87 }
88 88
89 void SetMockDeviceLightData(const double data) {
90 RendererWebKitPlatformSupportImpl::SetMockDeviceLightDataForTesting(data);
91 }
92
89 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { 93 void SetMockDeviceMotionData(const WebDeviceMotionData& data) {
90 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data); 94 RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(data);
91 } 95 }
92 96
93 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 97 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) {
94 RendererWebKitPlatformSupportImpl:: 98 RendererWebKitPlatformSupportImpl::
95 SetMockDeviceOrientationDataForTesting(data); 99 SetMockDeviceOrientationDataForTesting(data);
96 } 100 }
97 101
98 void SetMockScreenOrientation( 102 void SetMockScreenOrientation(
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 298 }
295 result.append("===============================================\n"); 299 result.append("===============================================\n");
296 return result; 300 return result;
297 } 301 }
298 302
299 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { 303 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) {
300 return new WebLayerImpl(layer); 304 return new WebLayerImpl(layer);
301 } 305 }
302 306
303 } // namespace content 307 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698