| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |