| 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 <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Returns a lock which will keep the top-of-window views revealed for its | 115 // Returns a lock which will keep the top-of-window views revealed for its |
| 116 // lifetime. Several locks can be obtained. When all of the locks are | 116 // lifetime. Several locks can be obtained. When all of the locks are |
| 117 // destroyed, if immersive fullscreen is enabled and there is nothing else | 117 // destroyed, if immersive fullscreen is enabled and there is nothing else |
| 118 // keeping the top-of-window views revealed, the top-of-window views will be | 118 // keeping the top-of-window views revealed, the top-of-window views will be |
| 119 // closed. This method always returns a valid lock regardless of whether | 119 // closed. This method always returns a valid lock regardless of whether |
| 120 // immersive fullscreen is enabled. The lock's lifetime can span immersive | 120 // immersive fullscreen is enabled. The lock's lifetime can span immersive |
| 121 // fullscreen being enabled / disabled. If acquiring the lock causes a reveal, | 121 // fullscreen being enabled / disabled. If acquiring the lock causes a reveal, |
| 122 // the top-of-window views will animate according to |animate_reveal|. The | 122 // the top-of-window views will animate according to |animate_reveal|. The |
| 123 // caller takes ownership of the returned lock. | 123 // caller takes ownership of the returned lock. |
| 124 ImmersiveRevealedLock* GetRevealedLock( | 124 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) |
| 125 AnimateReveal animate_reveal) WARN_UNUSED_RESULT; | 125 WARN_UNUSED_RESULT; |
| 126 | 126 |
| 127 // Disables animations and moves the mouse so that it is not over the | 127 // Disables animations and moves the mouse so that it is not over the |
| 128 // top-of-window views for the sake of testing. | 128 // top-of-window views for the sake of testing. |
| 129 void SetupForTest(); | 129 void SetupForTest(); |
| 130 | 130 |
| 131 // ui::EventHandler overrides: | 131 // ui::EventHandler overrides: |
| 132 void OnMouseEvent(ui::MouseEvent* event) override; | 132 void OnMouseEvent(ui::MouseEvent* event) override; |
| 133 void OnTouchEvent(ui::TouchEvent* event) override; | 133 void OnTouchEvent(ui::TouchEvent* event) override; |
| 134 void OnGestureEvent(ui::GestureEvent* event) override; | 134 void OnGestureEvent(ui::GestureEvent* event) override; |
| 135 | 135 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 164 ANIMATE_NO, | 164 ANIMATE_NO, |
| 165 ANIMATE_SLOW, | 165 ANIMATE_SLOW, |
| 166 ANIMATE_FAST, | 166 ANIMATE_FAST, |
| 167 }; | 167 }; |
| 168 enum RevealState { | 168 enum RevealState { |
| 169 CLOSED, | 169 CLOSED, |
| 170 SLIDING_OPEN, | 170 SLIDING_OPEN, |
| 171 REVEALED, | 171 REVEALED, |
| 172 SLIDING_CLOSED, | 172 SLIDING_CLOSED, |
| 173 }; | 173 }; |
| 174 enum SwipeType { | 174 enum SwipeType { SWIPE_OPEN, SWIPE_CLOSE, SWIPE_NONE }; |
| 175 SWIPE_OPEN, | |
| 176 SWIPE_CLOSE, | |
| 177 SWIPE_NONE | |
| 178 }; | |
| 179 | 175 |
| 180 // Enables or disables observers for mouse, touch, focus, and activation. | 176 // Enables or disables observers for mouse, touch, focus, and activation. |
| 181 void EnableWindowObservers(bool enable); | 177 void EnableWindowObservers(bool enable); |
| 182 | 178 |
| 183 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is | 179 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is |
| 184 // hovered at the top of the screen the timer is started. If the mouse moves | 180 // hovered at the top of the screen the timer is started. If the mouse moves |
| 185 // away from the top edge, or moves too much in the x direction, the timer is | 181 // away from the top edge, or moves too much in the x direction, the timer is |
| 186 // stopped. | 182 // stopped. |
| 187 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event); | 183 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event); |
| 188 | 184 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 std::unique_ptr<BubbleObserver> bubble_observer_; | 290 std::unique_ptr<BubbleObserver> bubble_observer_; |
| 295 | 291 |
| 296 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; | 292 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; |
| 297 | 293 |
| 298 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); | 294 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); |
| 299 }; | 295 }; |
| 300 | 296 |
| 301 } // namespace ash | 297 } // namespace ash |
| 302 | 298 |
| 303 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 299 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |