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 | 9 |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "ui/display/chromeos/apply_content_protection_task.h" | 16 #include "ui/display/chromeos/apply_content_protection_task.h" |
16 #include "ui/display/chromeos/display_layout_manager.h" | 17 #include "ui/display/chromeos/display_layout_manager.h" |
17 #include "ui/display/chromeos/display_snapshot_virtual.h" | 18 #include "ui/display/chromeos/display_snapshot_virtual.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 while (!enable_protection_callbacks_.empty()) { | 504 while (!enable_protection_callbacks_.empty()) { |
504 enable_protection_callbacks_.front().Run(false); | 505 enable_protection_callbacks_.front().Run(false); |
505 enable_protection_callbacks_.pop(); | 506 enable_protection_callbacks_.pop(); |
506 } | 507 } |
507 } | 508 } |
508 | 509 |
509 void DisplayConfigurator::SetDelegateForTesting( | 510 void DisplayConfigurator::SetDelegateForTesting( |
510 scoped_ptr<NativeDisplayDelegate> display_delegate) { | 511 scoped_ptr<NativeDisplayDelegate> display_delegate) { |
511 DCHECK(!native_display_delegate_); | 512 DCHECK(!native_display_delegate_); |
512 | 513 |
513 native_display_delegate_ = display_delegate.Pass(); | 514 native_display_delegate_ = std::move(display_delegate); |
514 configure_display_ = true; | 515 configure_display_ = true; |
515 } | 516 } |
516 | 517 |
517 void DisplayConfigurator::SetInitialDisplayPower( | 518 void DisplayConfigurator::SetInitialDisplayPower( |
518 chromeos::DisplayPowerState power_state) { | 519 chromeos::DisplayPowerState power_state) { |
519 DCHECK_EQ(current_display_state_, MULTIPLE_DISPLAY_STATE_INVALID); | 520 DCHECK_EQ(current_display_state_, MULTIPLE_DISPLAY_STATE_INVALID); |
520 requested_power_state_ = current_power_state_ = power_state; | 521 requested_power_state_ = current_power_state_ = power_state; |
521 } | 522 } |
522 | 523 |
523 void DisplayConfigurator::Init(bool is_panel_fitting_enabled) { | 524 void DisplayConfigurator::Init(bool is_panel_fitting_enabled) { |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 | 1136 |
1136 int64_t max_display_id = 0; | 1137 int64_t max_display_id = 0; |
1137 for (const auto& display : virtual_display_snapshots_) | 1138 for (const auto& display : virtual_display_snapshots_) |
1138 max_display_id = std::max(max_display_id, display->display_id()); | 1139 max_display_id = std::max(max_display_id, display->display_id()); |
1139 last_virtual_display_id_ = max_display_id & 0xff; | 1140 last_virtual_display_id_ = max_display_id & 0xff; |
1140 | 1141 |
1141 return true; | 1142 return true; |
1142 } | 1143 } |
1143 | 1144 |
1144 } // namespace ui | 1145 } // namespace ui |
OLD | NEW |