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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10817028: Add Fade-out/Fade-in animation during output-configuration change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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/ash.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 0d190febf5d53e177bfcaa61e0996ca89d884978..e9b5f903f39522988937b55a8427717c29c8a35e 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -35,6 +35,7 @@
#include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace/snap_sizer.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
@@ -50,6 +51,7 @@
#include "ui/views/widget/widget.h"
#if defined(OS_CHROMEOS)
+#include "ash/display/output_configurator_animation.h"
#include "chromeos/display/output_configurator.h"
#endif // defined(OS_CHROMEOS)
@@ -406,9 +408,14 @@ bool AcceleratorController::PerformAction(int action,
return HandleCrosh();
case TOGGLE_SPOKEN_FEEDBACK:
return HandleToggleSpokenFeedback();
- case CYCLE_DISPLAY_MODE:
- ash::Shell::GetInstance()->output_configurator()->CycleDisplayMode();
+ case CYCLE_DISPLAY_MODE: {
+ internal::OutputConfiguratorAnimation* animation =
+ Shell::GetInstance()->output_configurator_animation();
+ animation->StartFadeOutAnimation(base::Bind(
+ base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode),
+ base::Unretained(Shell::GetInstance()->output_configurator())));
return true;
+ }
#endif
case OPEN_FEEDBACK_PAGE:
ash::Shell::GetInstance()->delegate()->OpenFeedbackPage();
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698