| 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/update_display_configuration_task.h" | 5 #include "ui/display/chromeos/update_display_configuration_task.h" |
| 6 | 6 |
| 7 #include "ui/display/chromeos/configure_displays_task.h" | 7 #include "ui/display/chromeos/configure_displays_task.h" |
| 8 #include "ui/display/chromeos/display_layout_manager.h" | 8 #include "ui/display/chromeos/display_layout_manager.h" |
| 9 #include "ui/display/chromeos/display_util.h" | 9 #include "ui/display/chromeos/display_util.h" |
| 10 #include "ui/display/types/display_snapshot.h" | 10 #include "ui/display/types/display_snapshot.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool success = status != ConfigureDisplaysTask::ERROR; | 104 bool success = status != ConfigureDisplaysTask::ERROR; |
| 105 if (new_display_state_ == MULTIPLE_DISPLAY_STATE_DUAL_MIRROR && | 105 if (new_display_state_ == MULTIPLE_DISPLAY_STATE_DUAL_MIRROR && |
| 106 status == ConfigureDisplaysTask::PARTIAL_SUCCESS) | 106 status == ConfigureDisplaysTask::PARTIAL_SUCCESS) |
| 107 success = false; | 107 success = false; |
| 108 | 108 |
| 109 if (layout_manager_->GetSoftwareMirroringController()) { | 109 if (layout_manager_->GetSoftwareMirroringController()) { |
| 110 bool enable_software_mirroring = false; | 110 bool enable_software_mirroring = false; |
| 111 if (!success && new_display_state_ == MULTIPLE_DISPLAY_STATE_DUAL_MIRROR) { | 111 if (!success && new_display_state_ == MULTIPLE_DISPLAY_STATE_DUAL_MIRROR) { |
| 112 if (layout_manager_->GetDisplayState() != | 112 if (layout_manager_->GetDisplayState() != |
| 113 MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED || | 113 MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED || |
| 114 layout_manager_->GetPowerState() != new_power_state_) { | 114 layout_manager_->GetPowerState() != new_power_state_ || |
| 115 force_configure_) { |
| 115 new_display_state_ = MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; | 116 new_display_state_ = MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; |
| 116 EnterState(base::Bind( | 117 EnterState(base::Bind( |
| 117 &UpdateDisplayConfigurationTask::OnEnableSoftwareMirroring, | 118 &UpdateDisplayConfigurationTask::OnEnableSoftwareMirroring, |
| 118 weak_ptr_factory_.GetWeakPtr())); | 119 weak_ptr_factory_.GetWeakPtr())); |
| 119 return; | 120 return; |
| 120 } | 121 } |
| 121 | 122 |
| 122 success = layout_manager_->GetDisplayState() == | 123 success = layout_manager_->GetDisplayState() == |
| 123 MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; | 124 MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; |
| 124 enable_software_mirroring = success; | 125 enable_software_mirroring = success; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 return layout_manager_->GetStateController()->GetStateForDisplayIds( | 203 return layout_manager_->GetStateController()->GetStateForDisplayIds( |
| 203 display_ids); | 204 display_ids); |
| 204 } | 205 } |
| 205 NOTREACHED(); | 206 NOTREACHED(); |
| 206 } | 207 } |
| 207 } | 208 } |
| 208 return MULTIPLE_DISPLAY_STATE_INVALID; | 209 return MULTIPLE_DISPLAY_STATE_INVALID; |
| 209 } | 210 } |
| 210 | 211 |
| 211 } // namespace ui | 212 } // namespace ui |
| OLD | NEW |