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

Side by Side Diff: ui/base/win/dpi_setup.cc

Issue 271543009: Send the device scale factor from Windows 8 ASH during initialization via the MetroViewerHostMsg_Se… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed tabs Created 6 years, 7 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
« no previous file with comments | « ui/aura/remote_window_tree_host_win.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 "ui/base/win/dpi_setup.h" 5 #include "ui/base/win/dpi_setup.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/base/layout.h" 8 #include "ui/base/layout.h"
9 #include "ui/gfx/display.h" 9 #include "ui/gfx/display.h"
10 #include "ui/gfx/win/dpi.h" 10 #include "ui/gfx/win/dpi.h"
11 11
12 namespace ui { 12 namespace ui {
13 namespace win { 13 namespace win {
14 14
15 void InitDeviceScaleFactor() { 15 void InitDeviceScaleFactor() {
16 float scale = 1.0; 16 gfx::InitDeviceScaleFactor(gfx::GetDPIScale());
17 if (CommandLine::ForCurrentProcess()->HasSwitch("silent-launch")) {
18 if (gfx::IsHighDPIEnabled())
19 scale = gfx::GetModernUIScale();
20 }
21 else {
22 scale = gfx::GetDPIScale();
23 }
24 gfx::InitDeviceScaleFactor(scale);
25 } 17 }
26 18
27 } // namespace win 19 } // namespace win
28 } // namespace ui 20 } // namespace ui
OLDNEW
« no previous file with comments | « ui/aura/remote_window_tree_host_win.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698