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

Unified Diff: ash/wm/session_state_animator.cc

Issue 2622103003: ash: Tune shutdown timer in TabletPowerButtonController and shutdown white animation speed (Closed)
Patch Set: make it differentiate on touchViewEnabled Created 3 years, 11 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/system/chromeos/power/tablet_power_button_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 4d5f18bfbb44295dc08dfdecdf9913f83a89b07a..73ddd43b8764bf4e89cd3240ea55f351922fa166 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -4,9 +4,11 @@
#include "ash/wm/session_state_animator.h"
+#include "ash/common/ash_switches.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
#include "ash/wm/window_animations.h"
+#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/layer_animation_observer.h"
@@ -16,6 +18,17 @@
namespace ash {
+namespace {
+
+bool IsTouchViewEnabled() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableTouchView) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableTouchViewTesting);
+}
+
+} // namespace
+
const int SessionStateAnimator::kAllLockScreenContainersMask =
SessionStateAnimator::LOCK_SCREEN_WALLPAPER |
SessionStateAnimator::LOCK_SCREEN_CONTAINERS |
@@ -82,7 +95,8 @@ base::TimeDelta SessionStateAnimator::GetDuration(
case ANIMATION_SPEED_UNDO_MOVE_WINDOWS:
return base::TimeDelta::FromMilliseconds(350);
case ANIMATION_SPEED_SHUTDOWN:
- return base::TimeDelta::FromMilliseconds(1000);
+ return IsTouchViewEnabled() ? base::TimeDelta::FromMilliseconds(2500)
+ : base::TimeDelta::FromMilliseconds(1000);
case ANIMATION_SPEED_REVERT_SHUTDOWN:
return base::TimeDelta::FromMilliseconds(500);
}
« no previous file with comments | « ash/system/chromeos/power/tablet_power_button_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698