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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual void OnRemoveTransientChild(aura::Window* window, | 136 virtual void OnRemoveTransientChild(aura::Window* window, |
137 aura::Window* transient) OVERRIDE; | 137 aura::Window* transient) OVERRIDE; |
138 | 138 |
139 // ash::ImmersiveRevealedLock::Delegate overrides: | 139 // ash::ImmersiveRevealedLock::Delegate overrides: |
140 virtual void LockRevealedState(AnimateReveal animate_reveal) OVERRIDE; | 140 virtual void LockRevealedState(AnimateReveal animate_reveal) OVERRIDE; |
141 virtual void UnlockRevealedState() OVERRIDE; | 141 virtual void UnlockRevealedState() OVERRIDE; |
142 | 142 |
143 private: | 143 private: |
144 friend class ImmersiveFullscreenControllerTest; | 144 friend class ImmersiveFullscreenControllerTest; |
145 | 145 |
146 enum AllowRevealWhileClosing { | |
147 ALLOW_REVEAL_WHILE_CLOSING_YES, | |
148 ALLOW_REVEAL_WHILE_CLOSING_NO | |
149 }; | |
150 enum Animate { | 146 enum Animate { |
151 ANIMATE_NO, | 147 ANIMATE_NO, |
152 ANIMATE_SLOW, | 148 ANIMATE_SLOW, |
153 ANIMATE_FAST, | 149 ANIMATE_FAST, |
154 }; | 150 }; |
155 enum RevealState { | 151 enum RevealState { |
156 CLOSED, | 152 CLOSED, |
157 SLIDING_OPEN, | 153 SLIDING_OPEN, |
158 REVEALED, | 154 REVEALED, |
159 SLIDING_CLOSED, | 155 SLIDING_CLOSED, |
160 }; | 156 }; |
161 enum SwipeType { | 157 enum SwipeType { |
162 SWIPE_OPEN, | 158 SWIPE_OPEN, |
163 SWIPE_CLOSE, | 159 SWIPE_CLOSE, |
164 SWIPE_NONE | 160 SWIPE_NONE |
165 }; | 161 }; |
166 | 162 |
167 // Enables or disables observers for mouse, touch, focus, and activation. | 163 // Enables or disables observers for mouse, touch, focus, and activation. |
168 void EnableWindowObservers(bool enable); | 164 void EnableWindowObservers(bool enable); |
169 | 165 |
170 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is | 166 // Updates |top_edge_hover_timer_| based on a mouse |event|. If the mouse is |
171 // hovered at the top of the screen the timer is started. If the mouse moves | 167 // hovered at the top of the screen the timer is started. If the mouse moves |
172 // away from the top edge, or moves too much in the x direction, the timer is | 168 // away from the top edge, or moves too much in the x direction, the timer is |
173 // stopped. | 169 // stopped. |
174 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event); | 170 void UpdateTopEdgeHoverTimer(ui::MouseEvent* event); |
175 | 171 |
176 // Updates |located_event_revealed_lock_| based on the current mouse state and | 172 // Updates |located_event_revealed_lock_| based on the current mouse state and |
177 // the current touch state. | 173 // the current touch state. |
178 // |event| is NULL if the source event is not known. | 174 // |event| is NULL if the source event is not known. |
179 // |allow_reveal_while_closing| indicates whether the mouse and touch | 175 void UpdateLocatedEventRevealedLock(ui::LocatedEvent* event); |
180 // are allowed to initiate a reveal while the top-of-window views are sliding | |
181 // closed. | |
182 void UpdateLocatedEventRevealedLock( | |
183 ui::LocatedEvent* event, | |
184 AllowRevealWhileClosing allow_reveal_while_closing); | |
185 | 176 |
186 // Acquires |located_event_revealed_lock_| if it is not already held. | 177 // Acquires |located_event_revealed_lock_| if it is not already held. |
187 void AcquireLocatedEventRevealedLock(); | 178 void AcquireLocatedEventRevealedLock(); |
188 | 179 |
189 // Updates |focus_revealed_lock_| based on the currently active view and the | 180 // Updates |focus_revealed_lock_| based on the currently active view and the |
190 // currently active widget. | 181 // currently active widget. |
191 void UpdateFocusRevealedLock(); | 182 void UpdateFocusRevealedLock(); |
192 | 183 |
193 // Update |located_event_revealed_lock_| and |focus_revealed_lock_| as a | 184 // Update |located_event_revealed_lock_| and |focus_revealed_lock_| as a |
194 // result of a gesture of |swipe_type|. Returns true if any locks were | 185 // result of a gesture of |swipe_type|. Returns true if any locks were |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 scoped_ptr<BubbleManager> bubble_manager_; | 277 scoped_ptr<BubbleManager> bubble_manager_; |
287 | 278 |
288 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; | 279 base::WeakPtrFactory<ImmersiveFullscreenController> weak_ptr_factory_; |
289 | 280 |
290 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); | 281 DISALLOW_COPY_AND_ASSIGN(ImmersiveFullscreenController); |
291 }; | 282 }; |
292 | 283 |
293 } // namespace ash | 284 } // namespace ash |
294 | 285 |
295 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ | 286 #endif // ASH_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
OLD | NEW |