| 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/wm/session_state_animator.h" | 5 #include "ash/wm/session_state_animator.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
| 8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "ui/aura/client/aura_constants.h" | 12 #include "ui/aura/client/aura_constants.h" |
| 13 #include "ui/aura/window_event_dispatcher.h" | 13 #include "ui/aura/window_event_dispatcher.h" |
| 14 #include "ui/compositor/layer_animation_observer.h" | 14 #include "ui/compositor/layer_animation_observer.h" |
| 15 #include "ui/compositor/layer_animation_sequence.h" | 15 #include "ui/compositor/layer_animation_sequence.h" |
| 16 #include "ui/compositor/scoped_layer_animation_settings.h" | 16 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 bool IsTouchViewEnabled() { | 23 bool IsTouchViewEnabled() { |
| 24 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 24 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 25 switches::kAshEnableTouchView) || | 25 switches::kAshEnableTouchView); |
| 26 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 27 switches::kAshEnableTouchViewTesting); | |
| 28 } | 26 } |
| 29 | 27 |
| 30 } // namespace | 28 } // namespace |
| 31 | 29 |
| 32 const int SessionStateAnimator::kAllLockScreenContainersMask = | 30 const int SessionStateAnimator::kAllLockScreenContainersMask = |
| 33 SessionStateAnimator::LOCK_SCREEN_WALLPAPER | | 31 SessionStateAnimator::LOCK_SCREEN_WALLPAPER | |
| 34 SessionStateAnimator::LOCK_SCREEN_CONTAINERS | | 32 SessionStateAnimator::LOCK_SCREEN_CONTAINERS | |
| 35 SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS; | 33 SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS; |
| 36 | 34 |
| 37 const int SessionStateAnimator::kAllNonRootContainersMask = | 35 const int SessionStateAnimator::kAllNonRootContainersMask = |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 case ANIMATION_SPEED_REVERT_SHUTDOWN: | 98 case ANIMATION_SPEED_REVERT_SHUTDOWN: |
| 101 return base::TimeDelta::FromMilliseconds(500); | 99 return base::TimeDelta::FromMilliseconds(500); |
| 102 } | 100 } |
| 103 // Satisfy compilers that do not understand that we will return from switch | 101 // Satisfy compilers that do not understand that we will return from switch |
| 104 // above anyway. | 102 // above anyway. |
| 105 DCHECK(false) << "Unhandled animation speed " << speed; | 103 DCHECK(false) << "Unhandled animation speed " << speed; |
| 106 return base::TimeDelta(); | 104 return base::TimeDelta(); |
| 107 } | 105 } |
| 108 | 106 |
| 109 } // namespace ash | 107 } // namespace ash |
| OLD | NEW |