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

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

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Rebase Created 3 years, 9 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/test/DEPS ('k') | device/BUILD.gn » ('j') | 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 <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 22 matching lines...) Expand all
33 #include "content/renderer/render_frame_impl.h" 33 #include "content/renderer/render_frame_impl.h"
34 #include "content/renderer/render_thread_impl.h" 34 #include "content/renderer/render_thread_impl.h"
35 #include "content/renderer/render_view_impl.h" 35 #include "content/renderer/render_view_impl.h"
36 #include "content/renderer/render_widget.h" 36 #include "content/renderer/render_widget.h"
37 #include "content/renderer/renderer_blink_platform_impl.h" 37 #include "content/renderer/renderer_blink_platform_impl.h"
38 #include "content/shell/common/shell_switches.h" 38 #include "content/shell/common/shell_switches.h"
39 #include "content/shell/test_runner/test_common.h" 39 #include "content/shell/test_runner/test_common.h"
40 #include "content/shell/test_runner/web_frame_test_proxy.h" 40 #include "content/shell/test_runner/web_frame_test_proxy.h"
41 #include "content/shell/test_runner/web_view_test_proxy.h" 41 #include "content/shell/test_runner/web_view_test_proxy.h"
42 #include "content/shell/test_runner/web_widget_test_proxy.h" 42 #include "content/shell/test_runner/web_widget_test_proxy.h"
43 #include "device/sensors/public/cpp/motion_data.h"
44 #include "device/sensors/public/cpp/orientation_data.h"
43 #include "gpu/ipc/service/image_transport_surface.h" 45 #include "gpu/ipc/service/image_transport_surface.h"
44 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" 46 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
45 #include "third_party/WebKit/public/platform/WebFloatRect.h" 47 #include "third_party/WebKit/public/platform/WebFloatRect.h"
46 #include "third_party/WebKit/public/platform/WebGamepads.h" 48 #include "third_party/WebKit/public/platform/WebGamepads.h"
47 #include "third_party/WebKit/public/platform/WebInputEvent.h" 49 #include "third_party/WebKit/public/platform/WebInputEvent.h"
48 #include "third_party/WebKit/public/platform/WebRect.h" 50 #include "third_party/WebKit/public/platform/WebRect.h"
49 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eMotionData.h"
50 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eOrientationData.h"
51 #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_t est_support.h" 51 #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_t est_support.h"
52 #include "third_party/WebKit/public/web/WebHistoryItem.h" 52 #include "third_party/WebKit/public/web/WebHistoryItem.h"
53 #include "third_party/WebKit/public/web/WebView.h" 53 #include "third_party/WebKit/public/web/WebView.h"
54 #include "ui/events/blink/blink_event_util.h" 54 #include "ui/events/blink/blink_event_util.h"
55 #include "ui/gfx/geometry/vector2d.h" 55 #include "ui/gfx/geometry/vector2d.h"
56 #include "ui/gfx/icc_profile.h" 56 #include "ui/gfx/icc_profile.h"
57 #include "ui/gfx/test/icc_profiles.h" 57 #include "ui/gfx/test/icc_profiles.h"
58 58
59 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
60 #include "content/browser/frame_host/popup_menu_helper_mac.h" 60 #include "content/browser/frame_host/popup_menu_helper_mac.h"
61 #elif defined(OS_WIN) 61 #elif defined(OS_WIN)
62 #include "content/child/font_warmup_win.h" 62 #include "content/child/font_warmup_win.h"
63 #include "third_party/WebKit/public/web/win/WebFontRendering.h" 63 #include "third_party/WebKit/public/web/win/WebFontRendering.h"
64 #include "third_party/skia/include/core/SkRefCnt.h" 64 #include "third_party/skia/include/core/SkRefCnt.h"
65 #include "third_party/skia/include/ports/SkFontMgr.h" 65 #include "third_party/skia/include/ports/SkFontMgr.h"
66 #include "third_party/skia/include/ports/SkTypeface_win.h" 66 #include "third_party/skia/include/ports/SkTypeface_win.h"
67 #include "ui/gfx/win/direct_write.h" 67 #include "ui/gfx/win/direct_write.h"
68 #endif 68 #endif
69 69
70 using blink::WebDeviceMotionData; 70 using device::MotionData;
71 using blink::WebDeviceOrientationData; 71 using device::OrientationData;
72 using blink::WebGamepad; 72 using blink::WebGamepad;
73 using blink::WebGamepads; 73 using blink::WebGamepads;
74 using blink::WebRect; 74 using blink::WebRect;
75 using blink::WebSize; 75 using blink::WebSize;
76 76
77 namespace content { 77 namespace content {
78 78
79 namespace { 79 namespace {
80 80
81 base::LazyInstance<ViewProxyCreationCallback>::Leaky 81 base::LazyInstance<ViewProxyCreationCallback>::Leaky
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 RenderThreadImpl::current() 271 RenderThreadImpl::current()
272 ->blink_platform_impl() 272 ->blink_platform_impl()
273 ->SetPlatformEventObserverForTesting(blink::WebPlatformEventTypeGamepad, 273 ->SetPlatformEventObserverForTesting(blink::WebPlatformEventTypeGamepad,
274 std::move(provider)); 274 std::move(provider));
275 } 275 }
276 276
277 void SetMockDeviceLightData(const double data) { 277 void SetMockDeviceLightData(const double data) {
278 RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(data); 278 RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(data);
279 } 279 }
280 280
281 void SetMockDeviceMotionData(const WebDeviceMotionData& data) { 281 void SetMockDeviceMotionData(const MotionData& data) {
282 RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(data); 282 RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(data);
283 } 283 }
284 284
285 void SetMockDeviceOrientationData(const WebDeviceOrientationData& data) { 285 void SetMockDeviceOrientationData(const OrientationData& data) {
286 RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting(data); 286 RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting(data);
287 } 287 }
288 288
289 namespace { 289 namespace {
290 290
291 // Invokes a callback on commit (on the main thread) to obtain the output 291 // Invokes a callback on commit (on the main thread) to obtain the output
292 // surface that should be used, then asks that output surface to submit the copy 292 // surface that should be used, then asks that output surface to submit the copy
293 // request at SwapBuffers time. 293 // request at SwapBuffers time.
294 class CopyRequestSwapPromise : public cc::SwapPromise { 294 class CopyRequestSwapPromise : public cc::SwapPromise {
295 public: 295 public:
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 } 607 }
608 608
609 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { 609 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) {
610 RequestExtraData* extra_data = static_cast<RequestExtraData*>( 610 RequestExtraData* extra_data = static_cast<RequestExtraData*>(
611 request.getExtraData()); 611 request.getExtraData());
612 return extra_data && extra_data->navigation_initiated_by_renderer(); 612 return extra_data && extra_data->navigation_initiated_by_renderer();
613 } 613 }
614 614
615 } // namespace content 615 } // namespace content
OLDNEW
« no previous file with comments | « content/test/DEPS ('k') | device/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698