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

Unified Diff: ash/display/display_controller.cc

Issue 12496020: Use OutputConfigurator::SetDislpayMode for ctrl-fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/display/display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index d16af047e6e72e3caf2c0252a1e94b02622b2ff1..4349c513263fadd1eaa0b2983ba1be7fd2963b0b 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -557,14 +557,18 @@ void DisplayController::CycleDisplayMode() {
}
#if defined(OS_CHROMEOS)
Shell* shell = Shell::GetInstance();
+ internal::DisplayManager* display_manager = GetDisplayManager();
if (!base::chromeos::IsRunningOnChromeOS()) {
internal::DisplayManager::CycleDisplay();
- } else if (shell->output_configurator()->connected_output_count() > 1) {
+ } else if (display_manager->num_connected_displays() > 1) {
+ chromeos::OutputState new_state = display_manager->IsMirrored() ?
+ chromeos::STATE_DUAL_EXTENDED : chromeos::STATE_DUAL_MIRROR;
internal::OutputConfiguratorAnimation* animation =
shell->output_configurator_animation();
animation->StartFadeOutAnimation(base::Bind(
- base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode),
- base::Unretained(shell->output_configurator())));
+ base::IgnoreResult(&chromeos::OutputConfigurator::SetDisplayMode),
+ base::Unretained(shell->output_configurator()),
+ new_state));
}
#endif
}
« no previous file with comments | « no previous file | ash/display/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698