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

Side by Side Diff: ui/aura/single_monitor_manager.cc

Issue 10255020: Get the default device scale factor from monitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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
« ui/aura/monitor_manager.cc ('K') | « ui/aura/monitor_manager.cc ('k') | no next file » | 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 "ui/aura/single_monitor_manager.h" 5 #include "ui/aura/single_monitor_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "ui/aura/aura_switches.h" 10 #include "ui/aura/aura_switches.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void SingleMonitorManager::OnWindowDestroying(Window* window) { 83 void SingleMonitorManager::OnWindowDestroying(Window* window) {
84 if (root_window_ == window) 84 if (root_window_ == window)
85 root_window_ = NULL; 85 root_window_ = NULL;
86 } 86 }
87 87
88 void SingleMonitorManager::Init() { 88 void SingleMonitorManager::Init() {
89 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 89 const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
90 switches::kAuraHostWindowSize); 90 switches::kAuraHostWindowSize);
91 monitor_ = CreateMonitorFromSpec(size_str); 91 monitor_ = CreateMonitorFromSpec(default_device_scale_factor(), size_str);
92 } 92 }
93 93
94 void SingleMonitorManager::Update(const gfx::Size size) { 94 void SingleMonitorManager::Update(const gfx::Size size) {
95 monitor_.SetSize(size); 95 monitor_.SetSize(size);
96 } 96 }
97 97
98 } // namespace aura 98 } // namespace aura
OLDNEW
« ui/aura/monitor_manager.cc ('K') | « ui/aura/monitor_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698