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" |
11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
13 #include "ui/base/events/event_handler.h" | 13 #include "ui/base/events/event_handler.h" |
14 #include "ui/compositor/layer_animation_observer.h" | 14 #include "ui/compositor/layer_animation_observer.h" |
15 #include "ui/views/focus/focus_manager.h" | 15 #include "ui/views/focus/focus_manager.h" |
16 #include "ui/views/widget/widget_observer.h" | 16 #include "ui/views/widget/widget_observer.h" |
17 | 17 |
18 class BrowserView; | 18 class BrowserView; |
19 | 19 |
20 namespace aura { | 20 namespace aura { |
21 class Window; | 21 class Window; |
| 22 class RootWindow; |
22 } | 23 } |
23 | 24 |
24 namespace gfx { | 25 namespace gfx { |
25 class Transform; | 26 class Transform; |
26 } | 27 } |
27 | 28 |
28 namespace ui { | 29 namespace ui { |
29 class Layer; | 30 class Layer; |
30 } | 31 } |
31 | 32 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // mouse state. | 216 // mouse state. |
216 scoped_ptr<ImmersiveRevealedLock> mouse_revealed_lock_; | 217 scoped_ptr<ImmersiveRevealedLock> mouse_revealed_lock_; |
217 | 218 |
218 // Lock which keeps the top-of-window views revealed based on the focused view | 219 // Lock which keeps the top-of-window views revealed based on the focused view |
219 // and the active widget. | 220 // and the active widget. |
220 scoped_ptr<ImmersiveRevealedLock> focus_revealed_lock_; | 221 scoped_ptr<ImmersiveRevealedLock> focus_revealed_lock_; |
221 | 222 |
222 // Native window for the browser, needed to clean up observers. | 223 // Native window for the browser, needed to clean up observers. |
223 aura::Window* native_window_; | 224 aura::Window* native_window_; |
224 | 225 |
| 226 // Native window for Top-Level Window, needed for registering as filter. |
| 227 aura::RootWindow* root_window_; |
| 228 |
225 // Observer to disable immersive mode when window leaves the maximized state. | 229 // Observer to disable immersive mode when window leaves the maximized state. |
226 class WindowObserver; | 230 class WindowObserver; |
227 scoped_ptr<WindowObserver> window_observer_; | 231 scoped_ptr<WindowObserver> window_observer_; |
228 | 232 |
229 // Manages widgets which are anchored to the top-of-window views. | 233 // Manages widgets which are anchored to the top-of-window views. |
230 class AnchoredWidgetManager; | 234 class AnchoredWidgetManager; |
231 scoped_ptr<AnchoredWidgetManager> anchored_widget_manager_; | 235 scoped_ptr<AnchoredWidgetManager> anchored_widget_manager_; |
232 | 236 |
233 content::NotificationRegistrar registrar_; | 237 content::NotificationRegistrar registrar_; |
234 | 238 |
235 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; | 239 base::WeakPtrFactory<ImmersiveModeControllerAsh> weak_ptr_factory_; |
236 | 240 |
237 // Tracks if the controller has seen a ET_GESTURE_SCROLL_BEGIN, without the | 241 // Tracks if the controller has seen a ET_GESTURE_SCROLL_BEGIN, without the |
238 // following events. | 242 // following events. |
239 bool gesture_begun_; | 243 bool gesture_begun_; |
240 | 244 |
| 245 // Inset size needed to guarantee that even under rotation the filter will see |
| 246 // relevant events. |
| 247 int bezel_inset_; |
| 248 |
241 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); | 249 DISALLOW_COPY_AND_ASSIGN(ImmersiveModeControllerAsh); |
242 }; | 250 }; |
243 | 251 |
244 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ | 252 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_IMMERSIVE_MODE_CONTROLLER_ASH_H_ |
OLD | NEW |