| 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 8 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 9 | 9 |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void UnlockRevealedState(); | 35 void UnlockRevealedState(); |
| 36 | 36 |
| 37 // ImmersiveModeController overrides: | 37 // ImmersiveModeController overrides: |
| 38 virtual void Init(BrowserView* browser_view) OVERRIDE; | 38 virtual void Init(BrowserView* browser_view) OVERRIDE; |
| 39 virtual void SetEnabled(bool enabled) OVERRIDE; | 39 virtual void SetEnabled(bool enabled) OVERRIDE; |
| 40 virtual bool IsEnabled() const OVERRIDE; | 40 virtual bool IsEnabled() const OVERRIDE; |
| 41 virtual bool ShouldHideTabIndicators() const OVERRIDE; | 41 virtual bool ShouldHideTabIndicators() const OVERRIDE; |
| 42 virtual bool ShouldHideTopViews() const OVERRIDE; | 42 virtual bool ShouldHideTopViews() const OVERRIDE; |
| 43 virtual bool IsRevealed() const OVERRIDE; | 43 virtual bool IsRevealed() const OVERRIDE; |
| 44 virtual void MaybeStackViewAtTop() OVERRIDE; | 44 virtual void MaybeStackViewAtTop() OVERRIDE; |
| 45 virtual void MaybeStartReveal() OVERRIDE; | |
| 46 virtual void CancelReveal() OVERRIDE; | |
| 47 virtual ImmersiveModeController::RevealedLock* | 45 virtual ImmersiveModeController::RevealedLock* |
| 48 GetRevealedLock() OVERRIDE WARN_UNUSED_RESULT; | 46 GetRevealedLock() OVERRIDE WARN_UNUSED_RESULT; |
| 49 | 47 |
| 50 // ui::EventHandler overrides: | 48 // ui::EventHandler overrides: |
| 51 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 49 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 52 | 50 |
| 53 // views::FocusChangeObserver overrides: | 51 // views::FocusChangeObserver overrides: |
| 54 virtual void OnWillChangeFocus(views::View* focused_before, | 52 virtual void OnWillChangeFocus(views::View* focused_before, |
| 55 views::View* focused_now) OVERRIDE; | 53 views::View* focused_now) OVERRIDE; |
| 56 virtual void OnDidChangeFocus(views::View* focused_before, | 54 virtual void OnDidChangeFocus(views::View* focused_before, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Acquire the mouse revealed lock if it is not already held. | 88 // Acquire the mouse revealed lock if it is not already held. |
| 91 void AcquireMouseRevealedLock(); | 89 void AcquireMouseRevealedLock(); |
| 92 | 90 |
| 93 // Update |focus_revealed_lock_| based on the currently active view and the | 91 // Update |focus_revealed_lock_| based on the currently active view and the |
| 94 // currently active widget. | 92 // currently active widget. |
| 95 void UpdateFocusRevealedLock(); | 93 void UpdateFocusRevealedLock(); |
| 96 | 94 |
| 97 // Returns the animation duration given |animate|. | 95 // Returns the animation duration given |animate|. |
| 98 int GetAnimationDuration(Animate animate) const; | 96 int GetAnimationDuration(Animate animate) const; |
| 99 | 97 |
| 98 // Reveals the top-of-window views if immersive mode is enabled. |
| 99 void MaybeStartReveal(); |
| 100 |
| 100 // Temporarily reveals the top-of-window views while in immersive mode, | 101 // Temporarily reveals the top-of-window views while in immersive mode, |
| 101 // hiding them when the cursor exits the area of the top views. If |animate| | 102 // hiding them when the cursor exits the area of the top views. If |animate| |
| 102 // is not ANIMATE_NO, slides in the view, otherwise shows it immediately. | 103 // is not ANIMATE_NO, slides in the view, otherwise shows it immediately. |
| 103 void StartReveal(Animate animate); | 104 void StartReveal(Animate animate); |
| 104 | 105 |
| 105 // Enables or disables layer-based painting to allow smooth animations. | 106 // Enables or disables layer-based painting to allow smooth animations. |
| 106 void EnablePaintToLayer(bool enable); | 107 void EnablePaintToLayer(bool enable); |
| 107 | 108 |
| 108 // Updates layout for |browser_view_| including window caption controls and | 109 // Updates layout for |browser_view_| including window caption controls and |
| 109 // tab strip style |immersive_style|. | 110 // tab strip style |immersive_style|. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 class AnimationObserver; | 166 class AnimationObserver; |
| 166 scoped_ptr<AnimationObserver> slide_open_observer_; | 167 scoped_ptr<AnimationObserver> slide_open_observer_; |
| 167 scoped_ptr<AnimationObserver> slide_closed_observer_; | 168 scoped_ptr<AnimationObserver> slide_closed_observer_; |
| 168 | 169 |
| 169 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; | 170 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; |
| 170 | 171 |
| 171 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); | 172 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); |
| 172 }; | 173 }; |
| 173 | 174 |
| 174 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 175 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
| OLD | NEW |