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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 const DisplayInfoList& info_list) { | 798 const DisplayInfoList& info_list) { |
799 if (GetDisplayManager()->IsInMirrorMode() || | 799 if (GetDisplayManager()->IsInMirrorMode() || |
800 GetDisplayManager()->IsInUnifiedMode()) { | 800 GetDisplayManager()->IsInUnifiedMode()) { |
801 mirror_window_controller_->UpdateWindow(info_list); | 801 mirror_window_controller_->UpdateWindow(info_list); |
802 cursor_window_controller_->UpdateContainer(); | 802 cursor_window_controller_->UpdateContainer(); |
803 } else { | 803 } else { |
804 NOTREACHED(); | 804 NOTREACHED(); |
805 } | 805 } |
806 } | 806 } |
807 | 807 |
808 void DisplayController::CloseMirroringDisplay() { | 808 void DisplayController::CloseMirroringDisplayIfNotNecessary() { |
809 mirror_window_controller_->Close(); | 809 mirror_window_controller_->CloseIfNotNecessary(); |
810 // If cursor_compositing is enabled for large cursor, the cursor window is | 810 // If cursor_compositing is enabled for large cursor, the cursor window is |
811 // always on the desktop display (the visible cursor on the non-desktop | 811 // always on the desktop display (the visible cursor on the non-desktop |
812 // display is drawn through compositor mirroring). Therefore, it's unnecessary | 812 // display is drawn through compositor mirroring). Therefore, it's unnecessary |
813 // to handle the cursor_window at all. See: http://crbug.com/412910 | 813 // to handle the cursor_window at all. See: http://crbug.com/412910 |
814 if (!cursor_window_controller_->is_cursor_compositing_enabled()) | 814 if (!cursor_window_controller_->is_cursor_compositing_enabled()) |
815 cursor_window_controller_->UpdateContainer(); | 815 cursor_window_controller_->UpdateContainer(); |
816 } | 816 } |
817 | 817 |
818 void DisplayController::PreDisplayConfigurationChange(bool clear_focus) { | 818 void DisplayController::PreDisplayConfigurationChange(bool clear_focus) { |
819 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging()); | 819 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging()); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 Shell::GetInstance()->display_configurator_animation() | 902 Shell::GetInstance()->display_configurator_animation() |
903 ->StartFadeInAnimation(); | 903 ->StartFadeInAnimation(); |
904 #endif | 904 #endif |
905 } | 905 } |
906 | 906 |
907 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { | 907 void DisplayController::SetMirrorModeAfterAnimation(bool mirror) { |
908 GetDisplayManager()->SetMirrorMode(mirror); | 908 GetDisplayManager()->SetMirrorMode(mirror); |
909 } | 909 } |
910 | 910 |
911 } // namespace ash | 911 } // namespace ash |
OLD | NEW |