OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 void DisplayController::PostDisplayConfigurationChange() { | 838 void DisplayController::PostDisplayConfigurationChange() { |
839 if (limiter_) | 839 if (limiter_) |
840 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); | 840 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); |
841 | 841 |
842 focus_activation_store_->Restore(); | 842 focus_activation_store_->Restore(); |
843 | 843 |
844 DisplayManager* display_manager = GetDisplayManager(); | 844 DisplayManager* display_manager = GetDisplayManager(); |
845 DisplayLayoutStore* layout_store = display_manager->layout_store(); | 845 DisplayLayoutStore* layout_store = display_manager->layout_store(); |
846 if (display_manager->num_connected_displays() > 1) { | 846 if (display_manager->num_connected_displays() > 1) { |
847 DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); | 847 DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); |
848 layout_store->UpdateMirrorStatus(pair, display_manager->IsInMirrorMode()); | 848 layout_store->UpdateMultiDisplayState( |
| 849 pair, display_manager->IsInMirrorMode(), |
| 850 display_manager->default_multi_display_mode() == |
| 851 DisplayManager::UNIFIED); |
849 | 852 |
850 if (Shell::GetScreen()->GetNumDisplays() > 1 ) { | 853 if (Shell::GetScreen()->GetNumDisplays() > 1 ) { |
851 DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair); | 854 DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair); |
852 int64 primary_id = layout.primary_id; | 855 int64 primary_id = layout.primary_id; |
853 SetPrimaryDisplayId( | 856 SetPrimaryDisplayId( |
854 primary_id == gfx::Display::kInvalidDisplayID ? | 857 primary_id == gfx::Display::kInvalidDisplayID ? |
855 pair.first : primary_id); | 858 pair.first : primary_id); |
856 // Update the primary_id in case the above call is | 859 // Update the primary_id in case the above call is |
857 // ignored. Happens when a) default layout's primary id | 860 // ignored. Happens when a) default layout's primary id |
858 // doesn't exist, or b) the primary_id has already been | 861 // doesn't exist, or b) the primary_id has already been |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 Shell::GetInstance()->display_configurator_animation() | 908 Shell::GetInstance()->display_configurator_animation() |
906 ->StartFadeInAnimation(); | 909 ->StartFadeInAnimation(); |
907 #endif | 910 #endif |
908 } | 911 } |
909 | 912 |
910 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { | 913 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { |
911 GetDisplayManager()->SetMirrorMode(mirror); | 914 GetDisplayManager()->SetMirrorMode(mirror); |
912 } | 915 } |
913 | 916 |
914 } // namespace ash | 917 } // namespace ash |
OLD | NEW |