| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 5 #ifndef ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| 6 #define ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 6 #define ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // The returned list is used for hittesting when the top-of-window views | 79 // The returned list is used for hittesting when the top-of-window views |
| 80 // are revealed. GetVisibleBoundsInScreen() must return a valid value when | 80 // are revealed. GetVisibleBoundsInScreen() must return a valid value when |
| 81 // not in immersive fullscreen for the sake of SetupForTest(). | 81 // not in immersive fullscreen for the sake of SetupForTest(). |
| 82 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const = 0; | 82 virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const = 0; |
| 83 | 83 |
| 84 protected: | 84 protected: |
| 85 virtual ~Delegate() {} | 85 virtual ~Delegate() {} |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 ImmersiveFullscreenController(); | 88 ImmersiveFullscreenController(); |
| 89 virtual ~ImmersiveFullscreenController(); | 89 ~ImmersiveFullscreenController() override; |
| 90 | 90 |
| 91 // Initializes the controller. Must be called prior to enabling immersive | 91 // Initializes the controller. Must be called prior to enabling immersive |
| 92 // fullscreen via SetEnabled(). |top_container| is used to keep the | 92 // fullscreen via SetEnabled(). |top_container| is used to keep the |
| 93 // top-of-window views revealed when a child of |top_container| has focus. | 93 // top-of-window views revealed when a child of |top_container| has focus. |
| 94 // |top_container| does not affect which mouse and touch events keep the | 94 // |top_container| does not affect which mouse and touch events keep the |
| 95 // top-of-window views revealed. | 95 // top-of-window views revealed. |
| 96 void Init(Delegate* delegate, | 96 void Init(Delegate* delegate, |
| 97 views::Widget* widget, | 97 views::Widget* widget, |
| 98 views::View* top_container); | 98 views::View* top_container); |
| 99 | 99 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 119 // the top-of-window views will animate according to |animate_reveal|. The | 119 // the top-of-window views will animate according to |animate_reveal|. The |
| 120 // caller takes ownership of the returned lock. | 120 // caller takes ownership of the returned lock. |
| 121 ImmersiveRevealedLock* GetRevealedLock( | 121 ImmersiveRevealedLock* GetRevealedLock( |
| 122 AnimateReveal animate_reveal) WARN_UNUSED_RESULT; | 122 AnimateReveal animate_reveal) WARN_UNUSED_RESULT; |
| 123 | 123 |
| 124 // Disables animations and moves the mouse so that it is not over the | 124 // Disables animations and moves the mouse so that it is not over the |
| 125 // top-of-window views for the sake of testing. | 125 // top-of-window views for the sake of testing. |
| 126 void SetupForTest(); | 126 void SetupForTest(); |
| 127 | 127 |
| 128 // ui::EventHandler overrides: | 128 // ui::EventHandler overrides: |
| 129 virtual void OnMouseEvent(ui::MouseEvent* event) override; | 129 void OnMouseEvent(ui::MouseEvent* event) override; |
| 130 virtual void OnTouchEvent(ui::TouchEvent* event) override; | 130 void OnTouchEvent(ui::TouchEvent* event) override; |
| 131 virtual void OnGestureEvent(ui::GestureEvent* event) override; | 131 void OnGestureEvent(ui::GestureEvent* event) override; |
| 132 | 132 |
| 133 // views::FocusChangeObserver overrides: | 133 // views::FocusChangeObserver overrides: |
| 134 virtual void OnWillChangeFocus(views::View* focused_before, | 134 void OnWillChangeFocus(views::View* focused_before, |
| 135 views::View* focused_now) override; | 135 views::View* focused_now) override; |
| 136 virtual void OnDidChangeFocus(views::View* focused_before, | 136 void OnDidChangeFocus(views::View* focused_before, |
| 137 views::View* focused_now) override; | 137 views::View* focused_now) override; |
| 138 | 138 |
| 139 // views::WidgetObserver overrides: | 139 // views::WidgetObserver overrides: |
| 140 virtual void OnWidgetDestroying(views::Widget* widget) override; | 140 void OnWidgetDestroying(views::Widget* widget) override; |
| 141 virtual void OnWidgetActivationChanged(views::Widget* widget, | 141 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; |
| 142 bool active) override; | |
| 143 | 142 |
| 144 // gfx::AnimationDelegate overrides: | 143 // gfx::AnimationDelegate overrides: |
| 145 virtual void AnimationEnded(const gfx::Animation* animation) override; | 144 void AnimationEnded(const gfx::Animation* animation) override; |
| 146 virtual void AnimationProgressed(const gfx::Animation* animation) override; | 145 void AnimationProgressed(const gfx::Animation* animation) override; |
| 147 | 146 |
| 148 // ::wm::TransientWindowObserver overrides: | 147 // ::wm::TransientWindowObserver overrides: |
| 149 virtual void OnTransientChildAdded(aura::Window* window, | 148 void OnTransientChildAdded(aura::Window* window, |
| 150 aura::Window* transient) override; | 149 aura::Window* transient) override; |
| 151 virtual void OnTransientChildRemoved(aura::Window* window, | 150 void OnTransientChildRemoved(aura::Window* window, |
| 152 aura::Window* transient) override; | 151 aura::Window* transient) override; |
| 153 | 152 |
| 154 // ash::ImmersiveRevealedLock::Delegate overrides: | 153 // ash::ImmersiveRevealedLock::Delegate overrides: |
| 155 virtual void LockRevealedState(AnimateReveal animate_reveal) override; | 154 void LockRevealedState(AnimateReveal animate_reveal) override; |
| 156 virtual void UnlockRevealedState() override; | 155 void UnlockRevealedState() override; |
| 157 | 156 |
| 158 private: | 157 private: |
| 159 friend class ImmersiveFullscreenControllerTest; | 158 friend class ImmersiveFullscreenControllerTest; |
| 160 | 159 |
| 161 enum Animate { | 160 enum Animate { |
| 162 ANIMATE_NO, | 161 ANIMATE_NO, |
| 163 ANIMATE_SLOW, | 162 ANIMATE_SLOW, |
| 164 ANIMATE_FAST, | 163 ANIMATE_FAST, |
| 165 }; | 164 }; |
| 166 enum RevealState { | 165 enum RevealState { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 scoped_ptr<BubbleManager> bubble_manager_; | 291 scoped_ptr<BubbleManager> bubble_manager_; |
| 293 | 292 |
| 294 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; | 293 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; |
| 295 | 294 |
| 296 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); | 295 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); |
| 297 }; | 296 }; |
| 298 | 297 |
| 299 } // namespace ash | 298 } // namespace ash |
| 300 | 299 |
| 301 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 300 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |