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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/gpu/compositor_util.h" 9 #include "content/browser/gpu/compositor_util.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 19 matching lines...) Expand all
30 #include "ui/base/ui_base_switches.h" 30 #include "ui/base/ui_base_switches.h"
31 #include "ui/gfx/size_conversions.h" 31 #include "ui/gfx/size_conversions.h"
32 #include "ui/gfx/switches.h" 32 #include "ui/gfx/switches.h"
33 #include "ui/gl/gl_switches.h" 33 #include "ui/gl/gl_switches.h"
34 34
35 #if defined(OS_MACOSX) 35 #if defined(OS_MACOSX)
36 #include "ui/gl/io_surface_support_mac.h" 36 #include "ui/gl/io_surface_support_mac.h"
37 #endif 37 #endif
38 38
39 #if defined(OS_WIN) 39 #if defined(OS_WIN)
40 #include "ui/gfx/dpi_win.h" 40 #include "ui/gfx/win/dpi.h"
41 #endif 41 #endif
42 42
43 namespace content { 43 namespace content {
44 namespace { 44 namespace {
45 45
46 // Convenience macro: Short-circuit a pass for the tests where platform support 46 // Convenience macro: Short-circuit a pass for the tests where platform support
47 // for forced-compositing mode (or disabled-compositing mode) is lacking. 47 // for forced-compositing mode (or disabled-compositing mode) is lacking.
48 #define SET_UP_SURFACE_OR_PASS_TEST(wait_message) \ 48 #define SET_UP_SURFACE_OR_PASS_TEST(wait_message) \
49 if (!SetUpSourceSurface(wait_message)) { \ 49 if (!SetUpSourceSurface(wait_message)) { \
50 LOG(WARNING) \ 50 LOG(WARNING) \
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 public: 828 public:
829 CompositingRenderWidgetHostViewTabCaptureHighDPI() 829 CompositingRenderWidgetHostViewTabCaptureHighDPI()
830 : kScale(2.f) { 830 : kScale(2.f) {
831 } 831 }
832 832
833 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { 833 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE {
834 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd); 834 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd);
835 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor, 835 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor,
836 base::StringPrintf("%f", scale())); 836 base::StringPrintf("%f", scale()));
837 #if defined(OS_WIN) 837 #if defined(OS_WIN)
838 cmd->AppendSwitchASCII(gfx::switches::kHighDPISupport, "1"); 838 cmd->AppendSwitchASCII(switches::kHighDPISupport, "1");
839 gfx::EnableHighDPISupport(); 839 gfx::EnableHighDPISupport();
840 #endif 840 #endif
841 } 841 }
842 842
843 float scale() const { return kScale; } 843 float scale() const { return kScale; }
844 844
845 private: 845 private:
846 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE { 846 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE {
847 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale()); 847 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale());
848 return true; 848 return true;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 copy_rect, 883 copy_rect,
884 output_size, 884 output_size,
885 expected_bitmap_size, 885 expected_bitmap_size,
886 video_frame); 886 video_frame);
887 } 887 }
888 888
889 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 889 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
890 890
891 } // namespace 891 } // namespace
892 } // namespace content 892 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698