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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 controller_->browser_view_->FullScreenStateChanged(); | 300 controller_->browser_view_->FullScreenStateChanged(); |
301 } | 301 } |
302 return; | 302 return; |
303 } | 303 } |
304 using ash::internal::kImmersiveModeKey; | 304 using ash::internal::kImmersiveModeKey; |
305 if (key == kImmersiveModeKey) { | 305 if (key == kImmersiveModeKey) { |
306 // Another component has toggled immersive mode. | 306 // Another component has toggled immersive mode. |
307 controller_->SetEnabled(window->GetProperty(kImmersiveModeKey)); | 307 controller_->SetEnabled(window->GetProperty(kImmersiveModeKey)); |
308 return; | 308 return; |
309 } | 309 } |
| 310 using ash::internal::kPendingImmersiveGestureKey; |
| 311 if (key == kPendingImmersiveGestureKey) { |
| 312 if (window->GetProperty(kPendingImmersiveGestureKey)) { |
| 313 window->SetProperty(kPendingImmersiveGestureKey, false); |
| 314 controller_->MaybeStartReveal(ANIMATE_FAST); |
| 315 } |
| 316 return; |
| 317 } |
310 } | 318 } |
311 | 319 |
312 private: | 320 private: |
313 ImmersiveModeControllerAsh* controller_; // Not owned. | 321 ImmersiveModeControllerAsh* controller_; // Not owned. |
314 | 322 |
315 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 323 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
316 }; | 324 }; |
317 | 325 |
318 //////////////////////////////////////////////////////////////////////////////// | 326 //////////////////////////////////////////////////////////////////////////////// |
319 | 327 |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator()); | 846 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator()); |
839 settings.SetTweenType(ui::Tween::EASE_OUT); | 847 settings.SetTweenType(ui::Tween::EASE_OUT); |
840 settings.SetTransitionDuration( | 848 settings.SetTransitionDuration( |
841 base::TimeDelta::FromMilliseconds(duration_ms)); | 849 base::TimeDelta::FromMilliseconds(duration_ms)); |
842 settings.SetPreemptionStrategy( | 850 settings.SetPreemptionStrategy( |
843 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 851 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
844 if (observer) | 852 if (observer) |
845 settings.AddObserver(observer); | 853 settings.AddObserver(observer); |
846 layer->SetTransform(target_transform); | 854 layer->SetTransform(target_transform); |
847 } | 855 } |
OLD | NEW |