| 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/manager/chromeos/display_configurator.h" | 5 #include "ui/display/manager/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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/sys_info.h" | |
| 15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "chromeos/system/devicemode.h" |
| 16 #include "ui/display/display.h" | 16 #include "ui/display/display.h" |
| 17 #include "ui/display/display_switches.h" | 17 #include "ui/display/display_switches.h" |
| 18 #include "ui/display/manager/chromeos/apply_content_protection_task.h" | 18 #include "ui/display/manager/chromeos/apply_content_protection_task.h" |
| 19 #include "ui/display/manager/chromeos/display_layout_manager.h" | 19 #include "ui/display/manager/chromeos/display_layout_manager.h" |
| 20 #include "ui/display/manager/chromeos/display_snapshot_virtual.h" | 20 #include "ui/display/manager/chromeos/display_snapshot_virtual.h" |
| 21 #include "ui/display/manager/chromeos/display_util.h" | 21 #include "ui/display/manager/chromeos/display_util.h" |
| 22 #include "ui/display/manager/chromeos/update_display_configuration_task.h" | 22 #include "ui/display/manager/chromeos/update_display_configuration_task.h" |
| 23 #include "ui/display/types/display_mode.h" | 23 #include "ui/display/types/display_mode.h" |
| 24 #include "ui/display/types/display_snapshot.h" | 24 #include "ui/display/types/display_snapshot.h" |
| 25 #include "ui/display/types/native_display_delegate.h" | 25 #include "ui/display/types/native_display_delegate.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 best_mode = mode.get(); | 459 best_mode = mode.get(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 return best_mode; | 462 return best_mode; |
| 463 } | 463 } |
| 464 | 464 |
| 465 DisplayConfigurator::DisplayConfigurator() | 465 DisplayConfigurator::DisplayConfigurator() |
| 466 : state_controller_(NULL), | 466 : state_controller_(NULL), |
| 467 mirroring_controller_(NULL), | 467 mirroring_controller_(NULL), |
| 468 is_panel_fitting_enabled_(false), | 468 is_panel_fitting_enabled_(false), |
| 469 configure_display_(base::SysInfo::IsRunningOnChromeOS()), | 469 configure_display_(chromeos::IsRunningAsSystemCompositor()), |
| 470 current_display_state_(MULTIPLE_DISPLAY_STATE_INVALID), | 470 current_display_state_(MULTIPLE_DISPLAY_STATE_INVALID), |
| 471 current_power_state_(chromeos::DISPLAY_POWER_ALL_ON), | 471 current_power_state_(chromeos::DISPLAY_POWER_ALL_ON), |
| 472 requested_display_state_(MULTIPLE_DISPLAY_STATE_INVALID), | 472 requested_display_state_(MULTIPLE_DISPLAY_STATE_INVALID), |
| 473 requested_power_state_(chromeos::DISPLAY_POWER_ALL_ON), | 473 requested_power_state_(chromeos::DISPLAY_POWER_ALL_ON), |
| 474 pending_power_state_(chromeos::DISPLAY_POWER_ALL_ON), | 474 pending_power_state_(chromeos::DISPLAY_POWER_ALL_ON), |
| 475 has_pending_power_state_(false), | 475 has_pending_power_state_(false), |
| 476 pending_power_flags_(kSetDisplayPowerNoFlags), | 476 pending_power_flags_(kSetDisplayPowerNoFlags), |
| 477 force_configure_(false), | 477 force_configure_(false), |
| 478 next_display_protection_client_id_(1), | 478 next_display_protection_client_id_(1), |
| 479 display_externally_controlled_(false), | 479 display_externally_controlled_(false), |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 last_virtual_display_id_ = max_display_id & 0xff; | 1192 last_virtual_display_id_ = max_display_id & 0xff; |
| 1193 | 1193 |
| 1194 return true; | 1194 return true; |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 bool DisplayConfigurator::IsDisplayOn() const { | 1197 bool DisplayConfigurator::IsDisplayOn() const { |
| 1198 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; | 1198 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 } // namespace display | 1201 } // namespace display |
| OLD | NEW |