Chromium Code Reviews| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 // Sets the currently-displayed cursor. If the cursor was previously hidden | 119 // Sets the currently-displayed cursor. If the cursor was previously hidden |
| 120 // via ShowCursor(false), it will remain hidden until ShowCursor(true) is | 120 // via ShowCursor(false), it will remain hidden until ShowCursor(true) is |
| 121 // called, at which point the cursor that was last set via SetCursor() will be | 121 // called, at which point the cursor that was last set via SetCursor() will be |
| 122 // used. | 122 // used. |
| 123 void SetCursor(gfx::NativeCursor cursor); | 123 void SetCursor(gfx::NativeCursor cursor); |
| 124 | 124 |
| 125 // Shows or hides the cursor. | 125 // Shows or hides the cursor. |
| 126 void ShowCursor(bool show); | 126 void ShowCursor(bool show); |
| 127 | 127 |
| 128 // Moves the cursor to the specified location relative to the root window. | 128 // Moves the cursor to the specified location relative to the root window. |
| 129 void MoveCursorTo(const gfx::Point& location); | 129 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 130 | 130 |
| 131 // Clips the cursor movement to the root_window. | 131 // Clips the cursor movement to the root_window. |
| 132 bool ConfineCursorToWindow(); | 132 bool ConfineCursorToWindow(); |
| 133 | 133 |
| 134 // Draws the necessary set of windows. | 134 // Draws the necessary set of windows. |
| 135 void Draw(); | 135 void Draw(); |
| 136 | 136 |
| 137 // Draw the whole screen. | 137 // Draw the whole screen. |
| 138 void ScheduleFullDraw(); | 138 void ScheduleFullDraw(); |
| 139 | 139 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 // Overridden from Window: | 257 // Overridden from Window: |
| 258 virtual bool CanFocus() const OVERRIDE; | 258 virtual bool CanFocus() const OVERRIDE; |
| 259 virtual bool CanReceiveEvents() const OVERRIDE; | 259 virtual bool CanReceiveEvents() const OVERRIDE; |
| 260 virtual FocusManager* GetFocusManager() OVERRIDE; | 260 virtual FocusManager* GetFocusManager() OVERRIDE; |
| 261 | 261 |
| 262 // Overridden from aura::client::CaptureDelegate: | 262 // Overridden from aura::client::CaptureDelegate: |
| 263 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; | 263 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; |
| 264 virtual void SetNativeCapture() OVERRIDE; | 264 virtual void SetNativeCapture() OVERRIDE; |
| 265 virtual void ReleaseNativeCapture() OVERRIDE; | 265 virtual void ReleaseNativeCapture() OVERRIDE; |
| 266 | 266 |
| 267 // Exposes RootWindowHost::QueryMouseLocation() for test purpose. | |
|
Ben Goodger (Google)
2012/06/18 20:30:52
purposes
| |
| 268 gfx::Point QueryMouseLocationForTest() const; | |
| 269 | |
| 267 private: | 270 private: |
| 268 friend class Window; | 271 friend class Window; |
| 269 friend class CompositorLock; | 272 friend class CompositorLock; |
| 270 | 273 |
| 271 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 274 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
| 272 // sending exited and entered events as its value changes. | 275 // sending exited and entered events as its value changes. |
| 273 void HandleMouseMoved(const MouseEvent& event, Window* target); | 276 void HandleMouseMoved(const MouseEvent& event, Window* target); |
| 274 | 277 |
| 275 bool ProcessMouseEvent(Window* target, MouseEvent* event); | 278 bool ProcessMouseEvent(Window* target, MouseEvent* event); |
| 276 bool ProcessKeyEvent(Window* target, KeyEvent* event); | 279 bool ProcessKeyEvent(Window* target, KeyEvent* event); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 394 | 397 |
| 395 CompositorLock* compositor_lock_; | 398 CompositorLock* compositor_lock_; |
| 396 bool draw_on_compositor_unlock_; | 399 bool draw_on_compositor_unlock_; |
| 397 | 400 |
| 398 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 401 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 399 }; | 402 }; |
| 400 | 403 |
| 401 } // namespace aura | 404 } // namespace aura |
| 402 | 405 |
| 403 #endif // UI_AURA_ROOT_WINDOW_H_ | 406 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |