| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // Overridden from FocusManager: | 242 // Overridden from FocusManager: |
| 243 virtual void SetFocusedWindow(Window* window, | 243 virtual void SetFocusedWindow(Window* window, |
| 244 const aura::Event* event) OVERRIDE; | 244 const aura::Event* event) OVERRIDE; |
| 245 virtual Window* GetFocusedWindow() OVERRIDE; | 245 virtual Window* GetFocusedWindow() OVERRIDE; |
| 246 virtual bool IsFocusedWindow(const Window* window) const OVERRIDE; | 246 virtual bool IsFocusedWindow(const Window* window) const OVERRIDE; |
| 247 | 247 |
| 248 // Initializes the root window. | 248 // Initializes the root window. |
| 249 void Init(); | 249 void Init(); |
| 250 | 250 |
| 251 // We hold and aggregregate mouse drags as a way of throttling resizes | 251 // We hold and aggregate mouse drags as a way of throttling resizes when |
| 252 // when HoldMouseMoves() is called. The following methods are used to | 252 // HoldMouseMoves() is called. The following methods are used to dispatch held |
| 253 // dispatch held and newly incoming mouse events, typically when an event | 253 // and newly incoming mouse events, typically when an event other than a mouse |
| 254 // other than a mouse drag needs dispatching or a matching ReleaseMouseMoves() | 254 // drag needs dispatching or a matching ReleaseMouseMoves() is called. |
| 255 // is called. | |
| 256 bool DispatchMouseEventImpl(MouseEvent* event); | 255 bool DispatchMouseEventImpl(MouseEvent* event); |
| 257 void DispatchHeldMouseMove(); | 256 void DispatchHeldMouseMove(); |
| 258 | 257 |
| 259 // Parses the switch describing the initial size for the host window and | 258 // Parses the switch describing the initial size for the host window and |
| 260 // returns bounds for the window. | 259 // returns bounds for the window. |
| 261 gfx::Rect GetInitialHostWindowBounds() const; | 260 gfx::Rect GetInitialHostWindowBounds() const; |
| 262 | 261 |
| 263 // Posts a task to send synthesized mouse move event if there | 262 // Posts a task to send synthesized mouse move event if there |
| 264 // is no a pending task. | 263 // is no a pending task. |
| 265 void PostMouseMoveEventAfterWindowChange(); | 264 void PostMouseMoveEventAfterWindowChange(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 bool should_hold_mouse_moves_; | 319 bool should_hold_mouse_moves_; |
| 321 bool release_mouse_moves_after_draw_; | 320 bool release_mouse_moves_after_draw_; |
| 322 scoped_ptr<MouseEvent> held_mouse_move_; | 321 scoped_ptr<MouseEvent> held_mouse_move_; |
| 323 | 322 |
| 324 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 323 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 325 }; | 324 }; |
| 326 | 325 |
| 327 } // namespace aura | 326 } // namespace aura |
| 328 | 327 |
| 329 #endif // UI_AURA_ROOT_WINDOW_H_ | 328 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |