OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" | 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/window_properties.h" | 9 #include "ash/wm/window_properties.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 class RevealedLockAsh : public ImmersiveRevealedLock { | 86 class RevealedLockAsh : public ImmersiveRevealedLock { |
87 public: | 87 public: |
88 RevealedLockAsh(const base::WeakPtr<ImmersiveModeControllerAsh>& controller, | 88 RevealedLockAsh(const base::WeakPtr<ImmersiveModeControllerAsh>& controller, |
89 ImmersiveModeController::AnimateReveal animate_reveal) | 89 ImmersiveModeController::AnimateReveal animate_reveal) |
90 : controller_(controller) { | 90 : controller_(controller) { |
91 DCHECK(controller_); | 91 DCHECK(controller_); |
92 controller_->LockRevealedState(animate_reveal); | 92 controller_->LockRevealedState(animate_reveal); |
93 } | 93 } |
94 | 94 |
95 ~RevealedLockAsh() { | 95 virtual ~RevealedLockAsh() { |
96 if (controller_) | 96 if (controller_) |
97 controller_->UnlockRevealedState(); | 97 controller_->UnlockRevealedState(); |
98 } | 98 } |
99 | 99 |
100 private: | 100 private: |
101 base::WeakPtr<ImmersiveModeControllerAsh> controller_; | 101 base::WeakPtr<ImmersiveModeControllerAsh> controller_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(RevealedLockAsh); | 103 DISALLOW_COPY_AND_ASSIGN(RevealedLockAsh); |
104 }; | 104 }; |
105 | 105 |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator()); | 913 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator()); |
914 settings.SetTweenType(ui::Tween::EASE_OUT); | 914 settings.SetTweenType(ui::Tween::EASE_OUT); |
915 settings.SetTransitionDuration( | 915 settings.SetTransitionDuration( |
916 base::TimeDelta::FromMilliseconds(duration_ms)); | 916 base::TimeDelta::FromMilliseconds(duration_ms)); |
917 settings.SetPreemptionStrategy( | 917 settings.SetPreemptionStrategy( |
918 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 918 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
919 if (observer) | 919 if (observer) |
920 settings.AddObserver(observer); | 920 settings.AddObserver(observer); |
921 layer->SetTransform(target_transform); | 921 layer->SetTransform(target_transform); |
922 } | 922 } |
OLD | NEW |