| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "ui/events/blink/blink_event_util.h" | 53 #include "ui/events/blink/blink_event_util.h" |
| 54 #include "ui/gfx/geometry/vector2d.h" | 54 #include "ui/gfx/geometry/vector2d.h" |
| 55 #include "ui/gfx/icc_profile.h" | 55 #include "ui/gfx/icc_profile.h" |
| 56 #include "ui/gfx/test/icc_profiles.h" | 56 #include "ui/gfx/test/icc_profiles.h" |
| 57 | 57 |
| 58 #if defined(OS_MACOSX) | 58 #if defined(OS_MACOSX) |
| 59 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 59 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| 60 #elif defined(OS_WIN) | 60 #elif defined(OS_WIN) |
| 61 #include "content/child/font_warmup_win.h" | 61 #include "content/child/font_warmup_win.h" |
| 62 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 62 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
| 63 #include "third_party/skia/include/core/SkRefCnt.h" |
| 63 #include "third_party/skia/include/ports/SkFontMgr.h" | 64 #include "third_party/skia/include/ports/SkFontMgr.h" |
| 64 #include "third_party/skia/include/ports/SkTypeface_win.h" | 65 #include "third_party/skia/include/ports/SkTypeface_win.h" |
| 65 #include "ui/gfx/win/direct_write.h" | 66 #include "ui/gfx/win/direct_write.h" |
| 66 #endif | 67 #endif |
| 67 | 68 |
| 68 using blink::WebDeviceMotionData; | 69 using blink::WebDeviceMotionData; |
| 69 using blink::WebDeviceOrientationData; | 70 using blink::WebDeviceOrientationData; |
| 70 using blink::WebGamepad; | 71 using blink::WebGamepad; |
| 71 using blink::WebGamepads; | 72 using blink::WebGamepads; |
| 72 using blink::WebRect; | 73 using blink::WebRect; |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 std::unordered_map<int32_t, cc::TestCompositorFrameSink*> | 429 std::unordered_map<int32_t, cc::TestCompositorFrameSink*> |
| 429 compositor_frame_sinks_; | 430 compositor_frame_sinks_; |
| 430 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; | 431 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; |
| 431 }; | 432 }; |
| 432 | 433 |
| 433 void EnableRendererLayoutTestMode() { | 434 void EnableRendererLayoutTestMode() { |
| 434 RenderThreadImpl::current()->set_layout_test_dependencies( | 435 RenderThreadImpl::current()->set_layout_test_dependencies( |
| 435 base::MakeUnique<LayoutTestDependenciesImpl>()); | 436 base::MakeUnique<LayoutTestDependenciesImpl>()); |
| 436 | 437 |
| 437 #if defined(OS_WIN) | 438 #if defined(OS_WIN) |
| 438 RegisterSideloadedTypefaces(SkFontMgr_New_DirectWrite()); | 439 RegisterSideloadedTypefaces(SkFontMgr_New_DirectWrite().get()); |
| 439 #endif | 440 #endif |
| 440 } | 441 } |
| 441 | 442 |
| 442 void EnableBrowserLayoutTestMode() { | 443 void EnableBrowserLayoutTestMode() { |
| 443 #if defined(OS_MACOSX) | 444 #if defined(OS_MACOSX) |
| 444 gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); | 445 gpu::ImageTransportSurface::SetAllowOSMesaForTesting(true); |
| 445 PopupMenuHelper::DontShowPopupMenuForTesting(); | 446 PopupMenuHelper::DontShowPopupMenuForTesting(); |
| 446 #endif | 447 #endif |
| 447 RenderWidgetHostImpl::DisableResizeAckCheckForTesting(); | 448 RenderWidgetHostImpl::DisableResizeAckCheckForTesting(); |
| 448 } | 449 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 600 |
| 600 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { | 601 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { |
| 601 if (auto* render_widget = | 602 if (auto* render_widget = |
| 602 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { | 603 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { |
| 603 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, | 604 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, |
| 604 ChangeSource::FROM_NON_IME); | 605 ChangeSource::FROM_NON_IME); |
| 605 } | 606 } |
| 606 } | 607 } |
| 607 | 608 |
| 608 } // namespace content | 609 } // namespace content |
| OLD | NEW |