| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 base::Passed(&autodeleter), callback)); | 262 base::Passed(&autodeleter), callback)); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void SetMockGamepadProvider(std::unique_ptr<RendererGamepadProvider> provider) { | 265 void SetMockGamepadProvider(std::unique_ptr<RendererGamepadProvider> provider) { |
| 266 RenderThreadImpl::current() | 266 RenderThreadImpl::current() |
| 267 ->blink_platform_impl() | 267 ->blink_platform_impl() |
| 268 ->SetPlatformEventObserverForTesting(blink::kWebPlatformEventTypeGamepad, | 268 ->SetPlatformEventObserverForTesting(blink::kWebPlatformEventTypeGamepad, |
| 269 std::move(provider)); | 269 std::move(provider)); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void SetMockDeviceLightData(const double data) { | |
| 273 RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(data); | |
| 274 } | |
| 275 | |
| 276 void SetMockDeviceMotionData(const MotionData& data) { | 272 void SetMockDeviceMotionData(const MotionData& data) { |
| 277 RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(data); | 273 RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(data); |
| 278 } | 274 } |
| 279 | 275 |
| 280 void SetMockDeviceOrientationData(const OrientationData& data) { | 276 void SetMockDeviceOrientationData(const OrientationData& data) { |
| 281 RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting(data); | 277 RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting(data); |
| 282 } | 278 } |
| 283 | 279 |
| 284 namespace { | 280 namespace { |
| 285 | 281 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 } | 597 } |
| 602 } | 598 } |
| 603 | 599 |
| 604 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { | 600 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { |
| 605 RequestExtraData* extra_data = | 601 RequestExtraData* extra_data = |
| 606 static_cast<RequestExtraData*>(request.GetExtraData()); | 602 static_cast<RequestExtraData*>(request.GetExtraData()); |
| 607 return extra_data && extra_data->navigation_initiated_by_renderer(); | 603 return extra_data && extra_data->navigation_initiated_by_renderer(); |
| 608 } | 604 } |
| 609 | 605 |
| 610 } // namespace content | 606 } // namespace content |
| OLD | NEW |