Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: ash/display/display_controller.cc

Issue 1150913002: Save and restore unified mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/display/display_layout.h » ('j') | ash/display/display_layout.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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());
849 851
850 if (Shell::GetScreen()->GetNumDisplays() > 1 ) { 852 if (Shell::GetScreen()->GetNumDisplays() > 1 ) {
851 DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair); 853 DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair);
852 int64 primary_id = layout.primary_id; 854 int64 primary_id = layout.primary_id;
853 SetPrimaryDisplayId( 855 SetPrimaryDisplayId(
854 primary_id == gfx::Display::kInvalidDisplayID ? 856 primary_id == gfx::Display::kInvalidDisplayID ?
855 pair.first : primary_id); 857 pair.first : primary_id);
856 // Update the primary_id in case the above call is 858 // Update the primary_id in case the above call is
857 // ignored. Happens when a) default layout's primary id 859 // ignored. Happens when a) default layout's primary id
858 // doesn't exist, or b) the primary_id has already been 860 // doesn't exist, or b) the primary_id has already been
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 Shell::GetInstance()->display_configurator_animation() 907 Shell::GetInstance()->display_configurator_animation()
906 ->StartFadeInAnimation(); 908 ->StartFadeInAnimation();
907 #endif 909 #endif
908 } 910 }
909 911
910 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { 912 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) {
911 GetDisplayManager()->SetMirrorMode(mirror); 913 GetDisplayManager()->SetMirrorMode(mirror);
912 } 914 }
913 915
914 } // namespace ash 916 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_layout.h » ('j') | ash/display/display_layout.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698