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

Side by Side Diff: ui/display/chromeos/display_configurator.cc

Issue 2519993002: Move kInvalidDisplayID to display_constants.h. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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 | « ui/display/BUILD.gn ('k') | ui/display/display.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/display_configurator.h" 5 #include "ui/display/chromeos/display_configurator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 } 1149 }
1150 1150
1151 void DisplayConfigurator::NotifyPowerStateObservers() { 1151 void DisplayConfigurator::NotifyPowerStateObservers() {
1152 for (Observer& observer : observers_) 1152 for (Observer& observer : observers_)
1153 observer.OnPowerStateChanged(current_power_state_); 1153 observer.OnPowerStateChanged(current_power_state_);
1154 } 1154 }
1155 1155
1156 int64_t DisplayConfigurator::AddVirtualDisplay(const gfx::Size& display_size) { 1156 int64_t DisplayConfigurator::AddVirtualDisplay(const gfx::Size& display_size) {
1157 if (last_virtual_display_id_ == 0xff) { 1157 if (last_virtual_display_id_ == 0xff) {
1158 LOG(WARNING) << "Exceeded virtual display id limit"; 1158 LOG(WARNING) << "Exceeded virtual display id limit";
1159 return display::Display::kInvalidDisplayID; 1159 return display::kInvalidDisplayId;
1160 } 1160 }
1161 1161
1162 DisplaySnapshotVirtual* virtual_snapshot = new DisplaySnapshotVirtual( 1162 DisplaySnapshotVirtual* virtual_snapshot = new DisplaySnapshotVirtual(
1163 display::GenerateDisplayID(kReservedManufacturerID, 0x0, 1163 display::GenerateDisplayID(kReservedManufacturerID, 0x0,
1164 ++last_virtual_display_id_), 1164 ++last_virtual_display_id_),
1165 display_size); 1165 display_size);
1166 virtual_display_snapshots_.push_back(virtual_snapshot); 1166 virtual_display_snapshots_.push_back(virtual_snapshot);
1167 ConfigureDisplays(); 1167 ConfigureDisplays();
1168 1168
1169 return virtual_snapshot->display_id(); 1169 return virtual_snapshot->display_id();
(...skipping 20 matching lines...) Expand all
1190 last_virtual_display_id_ = max_display_id & 0xff; 1190 last_virtual_display_id_ = max_display_id & 0xff;
1191 1191
1192 return true; 1192 return true;
1193 } 1193 }
1194 1194
1195 bool DisplayConfigurator::IsDisplayOn() const { 1195 bool DisplayConfigurator::IsDisplayOn() const {
1196 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; 1196 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF;
1197 } 1197 }
1198 1198
1199 } // namespace ui 1199 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698