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

Side by Side Diff: ui/display/manager/display_manager.cc

Issue 2585633004: ozone: Allow ozone evdev/kvm features to be enabled without running on ChromeOS. (Closed)
Patch Set: fix bad rebase Created 4 years 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
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/display/manager/display_manager.h" 5 #include "ui/display/manager/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 using std::vector; 129 using std::vector;
130 130
131 // static 131 // static
132 int64_t DisplayManager::kUnifiedDisplayId = -10; 132 int64_t DisplayManager::kUnifiedDisplayId = -10;
133 133
134 DisplayManager::DisplayManager(std::unique_ptr<Screen> screen) 134 DisplayManager::DisplayManager(std::unique_ptr<Screen> screen)
135 : screen_(std::move(screen)), 135 : screen_(std::move(screen)),
136 layout_store_(new DisplayLayoutStore), 136 layout_store_(new DisplayLayoutStore),
137 weak_ptr_factory_(this) { 137 weak_ptr_factory_(this) {
138 #if defined(OS_CHROMEOS) 138 #if defined(OS_CHROMEOS)
139 configure_displays_ = base::SysInfo::IsRunningOnChromeOS(); 139 configure_displays_ = base::SysInfo::IsRunningAsSystemCompositor();
140 change_display_upon_host_resize_ = !configure_displays_; 140 change_display_upon_host_resize_ = !configure_displays_;
141 unified_desktop_enabled_ = base::CommandLine::ForCurrentProcess()->HasSwitch( 141 unified_desktop_enabled_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
142 ::switches::kEnableUnifiedDesktop); 142 ::switches::kEnableUnifiedDesktop);
143 #endif 143 #endif
144 } 144 }
145 145
146 DisplayManager::~DisplayManager() { 146 DisplayManager::~DisplayManager() {
147 #if defined(OS_CHROMEOS) 147 #if defined(OS_CHROMEOS)
148 // Reset the font params. 148 // Reset the font params.
149 gfx::SetFontRenderParamsDeviceScaleFactor(1.0f); 149 gfx::SetFontRenderParamsDeviceScaleFactor(1.0f);
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 } 1436 }
1437 1437
1438 const Display& DisplayManager::GetSecondaryDisplay() const { 1438 const Display& DisplayManager::GetSecondaryDisplay() const {
1439 CHECK_LE(2U, GetNumDisplays()); 1439 CHECK_LE(2U, GetNumDisplays());
1440 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id() 1440 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id()
1441 ? GetDisplayAt(1) 1441 ? GetDisplayAt(1)
1442 : GetDisplayAt(0); 1442 : GetDisplayAt(0);
1443 } 1443 }
1444 1444
1445 } // namespace display 1445 } // namespace display
OLDNEW
« chromeos/settings/timezone_settings.cc ('K') | « ui/display/manager/chromeos/display_configurator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698