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

Side by Side Diff: ash/display/display_manager.cc

Issue 1251573006: Cleanup: Enable 125DSFForUIScaling on by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « ash/display/display_info_unittest.cc ('k') | ash/display/display_manager_unittest.cc » ('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) 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 "ash/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 num_connected_displays_(0), 129 num_connected_displays_(0),
130 force_bounds_changed_(false), 130 force_bounds_changed_(false),
131 change_display_upon_host_resize_(false), 131 change_display_upon_host_resize_(false),
132 multi_display_mode_(EXTENDED), 132 multi_display_mode_(EXTENDED),
133 default_multi_display_mode_(EXTENDED), 133 default_multi_display_mode_(EXTENDED),
134 mirroring_display_id_(gfx::Display::kInvalidDisplayID), 134 mirroring_display_id_(gfx::Display::kInvalidDisplayID),
135 registered_internal_display_rotation_lock_(false), 135 registered_internal_display_rotation_lock_(false),
136 registered_internal_display_rotation_(gfx::Display::ROTATE_0), 136 registered_internal_display_rotation_(gfx::Display::ROTATE_0),
137 weak_ptr_factory_(this) { 137 weak_ptr_factory_(this) {
138 #if defined(OS_CHROMEOS) 138 #if defined(OS_CHROMEOS)
139 // Enable only on the device so that DisplayManagerFontTest passes.
140 if (base::SysInfo::IsRunningOnChromeOS())
141 DisplayInfo::SetUse125DSFForUIScaling(true);
142
143 change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS(); 139 change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS();
144 #endif 140 #endif
145 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); 141 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
146 gfx::Screen* current_native = 142 gfx::Screen* current_native =
147 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE); 143 gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE);
148 // If there is no native, or the native was for shutdown, 144 // If there is no native, or the native was for shutdown,
149 // use ash's screen. 145 // use ash's screen.
150 if (!current_native || 146 if (!current_native ||
151 current_native == screen_for_shutdown) { 147 current_native == screen_for_shutdown) {
152 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 148 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1388 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1393 secondary_display->UpdateWorkAreaFromInsets(insets); 1389 secondary_display->UpdateWorkAreaFromInsets(insets);
1394 } 1390 }
1395 1391
1396 void DisplayManager::RunPendingTasksForTest() { 1392 void DisplayManager::RunPendingTasksForTest() {
1397 if (!software_mirroring_display_list_.empty()) 1393 if (!software_mirroring_display_list_.empty())
1398 base::RunLoop().RunUntilIdle(); 1394 base::RunLoop().RunUntilIdle();
1399 } 1395 }
1400 1396
1401 } // namespace ash 1397 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_info_unittest.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698