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

Unified Diff: ash/display/display_controller.cc

Issue 15367003: Create a mirror window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash.gyp ('k') | 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 c2f981ff2b14178e020fe7b36b6dd20035647184..dd6307c13590acd12958239473a3de83664dad20 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -621,6 +621,10 @@ DisplayLayout DisplayController::GetRegisteredDisplayLayout(
}
void DisplayController::ToggleMirrorMode() {
+ internal::DisplayManager* display_manager = GetDisplayManager();
+ if (display_manager->num_connected_displays() <= 1)
+ return;
+
if (limiter_) {
if (limiter_->IsThrottled())
return;
@@ -628,15 +632,12 @@ void DisplayController::ToggleMirrorMode() {
}
#if defined(OS_CHROMEOS) && defined(USE_X11)
Shell* shell = Shell::GetInstance();
- internal::DisplayManager* display_manager = GetDisplayManager();
- if (display_manager->num_connected_displays() > 1) {
- internal::OutputConfiguratorAnimation* animation =
- shell->output_configurator_animation();
- animation->StartFadeOutAnimation(base::Bind(
- base::IgnoreResult(&internal::DisplayManager::SetMirrorMode),
- base::Unretained(display_manager),
- !display_manager->IsMirrored()));
- }
+ internal::OutputConfiguratorAnimation* animation =
+ shell->output_configurator_animation();
+ animation->StartFadeOutAnimation(base::Bind(
+ base::IgnoreResult(&internal::DisplayManager::SetMirrorMode),
+ base::Unretained(display_manager),
+ !display_manager->IsMirrored()));
#endif
}
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698