OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_AURA_ROOT_WINDOW_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_H_ |
6 #define UI_AURA_ROOT_WINDOW_H_ | 6 #define UI_AURA_ROOT_WINDOW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void set_focus_manager(FocusManager* focus_manager) { | 102 void set_focus_manager(FocusManager* focus_manager) { |
103 focus_manager_ = focus_manager; | 103 focus_manager_ = focus_manager; |
104 } | 104 } |
105 | 105 |
106 // Initializes the root window. | 106 // Initializes the root window. |
107 void Init(); | 107 void Init(); |
108 | 108 |
109 // Shows the root window host. | 109 // Shows the root window host. |
110 void ShowRootWindow(); | 110 void ShowRootWindow(); |
111 | 111 |
| 112 // Hides the root window host. |
| 113 void HideRootWindow(); |
| 114 |
112 RootWindowHostDelegate* AsRootWindowHostDelegate(); | 115 RootWindowHostDelegate* AsRootWindowHostDelegate(); |
113 | 116 |
114 // Sets the size of the root window. | 117 // Sets the size of the root window. |
115 void SetHostSize(const gfx::Size& size_in_pixel); | 118 void SetHostSize(const gfx::Size& size_in_pixel); |
116 gfx::Size GetHostSize() const; | 119 gfx::Size GetHostSize() const; |
117 | 120 |
118 // Sets the bounds of the host window. | 121 // Sets the bounds of the host window. |
119 void SetHostBounds(const gfx::Rect& size_in_pixel); | 122 void SetHostBounds(const gfx::Rect& size_in_pixel); |
120 | 123 |
121 // Returns where the RootWindow is on screen. | 124 // Returns where the RootWindow is on screen. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 virtual void OnLayerAnimationAborted( | 300 virtual void OnLayerAnimationAborted( |
298 ui::LayerAnimationSequence* animation) OVERRIDE; | 301 ui::LayerAnimationSequence* animation) OVERRIDE; |
299 | 302 |
300 // Overridden from aura::RootWindowHostDelegate: | 303 // Overridden from aura::RootWindowHostDelegate: |
301 virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE; | 304 virtual bool OnHostKeyEvent(ui::KeyEvent* event) OVERRIDE; |
302 virtual bool OnHostMouseEvent(ui::MouseEvent* event) OVERRIDE; | 305 virtual bool OnHostMouseEvent(ui::MouseEvent* event) OVERRIDE; |
303 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 306 virtual bool OnHostScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
304 virtual bool OnHostTouchEvent(ui::TouchEvent* event) OVERRIDE; | 307 virtual bool OnHostTouchEvent(ui::TouchEvent* event) OVERRIDE; |
305 virtual void OnHostLostCapture() OVERRIDE; | 308 virtual void OnHostLostCapture() OVERRIDE; |
306 virtual void OnHostPaint() OVERRIDE; | 309 virtual void OnHostPaint() OVERRIDE; |
| 310 virtual void OnHostMoved(const gfx::Point& origin) OVERRIDE; |
307 virtual void OnHostResized(const gfx::Size& size) OVERRIDE; | 311 virtual void OnHostResized(const gfx::Size& size) OVERRIDE; |
308 virtual float GetDeviceScaleFactor() OVERRIDE; | 312 virtual float GetDeviceScaleFactor() OVERRIDE; |
309 virtual RootWindow* AsRootWindow() OVERRIDE; | 313 virtual RootWindow* AsRootWindow() OVERRIDE; |
310 | 314 |
311 // We hold and aggregate mouse drags as a way of throttling resizes when | 315 // We hold and aggregate mouse drags as a way of throttling resizes when |
312 // HoldMouseMoves() is called. The following methods are used to dispatch held | 316 // HoldMouseMoves() is called. The following methods are used to dispatch held |
313 // and newly incoming mouse events, typically when an event other than a mouse | 317 // and newly incoming mouse events, typically when an event other than a mouse |
314 // drag needs dispatching or a matching ReleaseMouseMoves() is called. | 318 // drag needs dispatching or a matching ReleaseMouseMoves() is called. |
315 // NOTE: because these methods dispatch events from RootWindowHost the | 319 // NOTE: because these methods dispatch events from RootWindowHost the |
316 // coordinates are in terms of the root. | 320 // coordinates are in terms of the root. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 389 |
386 CompositorLock* compositor_lock_; | 390 CompositorLock* compositor_lock_; |
387 bool draw_on_compositor_unlock_; | 391 bool draw_on_compositor_unlock_; |
388 | 392 |
389 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 393 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
390 }; | 394 }; |
391 | 395 |
392 } // namespace aura | 396 } // namespace aura |
393 | 397 |
394 #endif // UI_AURA_ROOT_WINDOW_H_ | 398 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |