| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // destroyed, if immersive fullscreen is enabled and there is nothing else | 66 // destroyed, if immersive fullscreen is enabled and there is nothing else |
| 67 // keeping the top-of-window views revealed, the top-of-window views will be | 67 // keeping the top-of-window views revealed, the top-of-window views will be |
| 68 // closed. This method always returns a valid lock regardless of whether | 68 // closed. This method always returns a valid lock regardless of whether |
| 69 // immersive fullscreen is enabled. The lock's lifetime can span immersive | 69 // immersive fullscreen is enabled. The lock's lifetime can span immersive |
| 70 // fullscreen being enabled / disabled. If acquiring the lock causes a reveal, | 70 // fullscreen being enabled / disabled. If acquiring the lock causes a reveal, |
| 71 // the top-of-window views will animate according to |animate_reveal|. The | 71 // the top-of-window views will animate according to |animate_reveal|. The |
| 72 // caller takes ownership of the returned lock. | 72 // caller takes ownership of the returned lock. |
| 73 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) | 73 ImmersiveRevealedLock* GetRevealedLock(AnimateReveal animate_reveal) |
| 74 WARN_UNUSED_RESULT; | 74 WARN_UNUSED_RESULT; |
| 75 | 75 |
| 76 // Disables animations and moves the mouse so that it is not over the | |
| 77 // top-of-window views for the sake of testing. | |
| 78 void SetupForTest(); | |
| 79 | |
| 80 views::Widget* widget() { return widget_; } | 76 views::Widget* widget() { return widget_; } |
| 81 views::View* top_container() { return top_container_; } | 77 views::View* top_container() { return top_container_; } |
| 82 | 78 |
| 83 // TODO(sky): move OnMouseEvent/OnTouchEvent to private section. | 79 // TODO(sky): move OnMouseEvent/OnTouchEvent to private section. |
| 84 void OnMouseEvent(const ui::MouseEvent& event, | 80 void OnMouseEvent(const ui::MouseEvent& event, |
| 85 const gfx::Point& location_in_screen, | 81 const gfx::Point& location_in_screen, |
| 86 views::Widget* target); | 82 views::Widget* target); |
| 87 void OnTouchEvent(const ui::TouchEvent& event, | 83 void OnTouchEvent(const ui::TouchEvent& event, |
| 88 const gfx::Point& location_in_screen); | 84 const gfx::Point& location_in_screen); |
| 89 // Processes a GestureEvent. This may call SetHandled() on the supplied event. | 85 // Processes a GestureEvent. This may call SetHandled() on the supplied event. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 std::unique_ptr<ImmersiveGestureHandler> immersive_gesture_handler_; | 235 std::unique_ptr<ImmersiveGestureHandler> immersive_gesture_handler_; |
| 240 | 236 |
| 241 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; | 237 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; |
| 242 | 238 |
| 243 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); | 239 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); |
| 244 }; | 240 }; |
| 245 | 241 |
| 246 } // namespace ash | 242 } // namespace ash |
| 247 | 243 |
| 248 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 244 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |