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

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

Issue 153403003: Move supports-high-dpi flag into registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Renaming function. Created 6 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 | « chrome/browser/about_flags.cc ('k') | ui/gfx/win/dpi.h » ('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) 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 class CompositingRenderWidgetHostViewTabCaptureHighDPI 870 class CompositingRenderWidgetHostViewTabCaptureHighDPI
871 : public CompositingRenderWidgetHostViewBrowserTestTabCapture { 871 : public CompositingRenderWidgetHostViewBrowserTestTabCapture {
872 public: 872 public:
873 CompositingRenderWidgetHostViewTabCaptureHighDPI() : kScale(2.f) {} 873 CompositingRenderWidgetHostViewTabCaptureHighDPI() : kScale(2.f) {}
874 874
875 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE { 875 virtual void SetUpCommandLine(CommandLine* cmd) OVERRIDE {
876 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd); 876 CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUpCommandLine(cmd);
877 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor, 877 cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor,
878 base::StringPrintf("%f", scale())); 878 base::StringPrintf("%f", scale()));
879 #if defined(OS_WIN) 879 #if defined(OS_WIN)
880 cmd->AppendSwitchASCII(switches::kHighDPISupport, "1"); 880 gfx::ForceHighDPISupportForTesting(scale());
881 gfx::EnableHighDPISupport(); 881 gfx::EnableHighDPISupport();
882 #endif 882 #endif
883 } 883 }
884 884
885 float scale() const { return kScale; } 885 float scale() const { return kScale; }
886 886
887 private: 887 private:
888 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE { 888 virtual bool ShouldContinueAfterTestURLLoad() OVERRIDE {
889 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale()); 889 PASS_TEST_IF_SCALE_FACTOR_NOT_SUPPORTED(scale());
890 return true; 890 return true;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 CompositingRenderWidgetHostViewBrowserTestTabCapture, 944 CompositingRenderWidgetHostViewBrowserTestTabCapture,
945 testing::ValuesIn(kAllCompositingModes)); 945 testing::ValuesIn(kAllCompositingModes));
946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, 946 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing,
947 CompositingRenderWidgetHostViewTabCaptureHighDPI, 947 CompositingRenderWidgetHostViewTabCaptureHighDPI,
948 testing::ValuesIn(kAllCompositingModes)); 948 testing::ValuesIn(kAllCompositingModes));
949 949
950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 950 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
951 951
952 } // namespace 952 } // namespace
953 } // namespace content 953 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698