| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Returns where the RootWindow is on screen. | 108 // Returns where the RootWindow is on screen. |
| 109 gfx::Point GetHostOrigin() const; | 109 gfx::Point GetHostOrigin() const; |
| 110 | 110 |
| 111 // Sets the currently-displayed cursor. If the cursor was previously hidden | 111 // Sets the currently-displayed cursor. If the cursor was previously hidden |
| 112 // via ShowCursor(false), it will remain hidden until ShowCursor(true) is | 112 // via ShowCursor(false), it will remain hidden until ShowCursor(true) is |
| 113 // called, at which point the cursor that was last set via SetCursor() will be | 113 // called, at which point the cursor that was last set via SetCursor() will be |
| 114 // used. | 114 // used. |
| 115 void SetCursor(gfx::NativeCursor cursor); | 115 void SetCursor(gfx::NativeCursor cursor); |
| 116 | 116 |
| 117 // Invoked when the cursor's visibility has changed. | 117 // Invoked when the cursor gets enabled or disabled. |
| 118 void OnCursorVisibilityChanged(bool visible); | 118 void OnCursorEnableStateChanged(bool enabled); |
| 119 | 119 |
| 120 // Moves the cursor to the specified location relative to the root window. | 120 // Moves the cursor to the specified location relative to the root window. |
| 121 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 121 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 122 | 122 |
| 123 // Clips the cursor movement to the root_window. | 123 // Clips the cursor movement to the root_window. |
| 124 bool ConfineCursorToWindow(); | 124 bool ConfineCursorToWindow(); |
| 125 | 125 |
| 126 // Draws the necessary set of windows. | 126 // Draws the necessary set of windows. |
| 127 void Draw(); | 127 void Draw(); |
| 128 | 128 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Overridden from Window: | 249 // Overridden from Window: |
| 250 virtual bool CanFocus() const OVERRIDE; | 250 virtual bool CanFocus() const OVERRIDE; |
| 251 virtual bool CanReceiveEvents() const OVERRIDE; | 251 virtual bool CanReceiveEvents() const OVERRIDE; |
| 252 | 252 |
| 253 // Overridden from aura::client::CaptureDelegate: | 253 // Overridden from aura::client::CaptureDelegate: |
| 254 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; | 254 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; |
| 255 virtual void SetNativeCapture() OVERRIDE; | 255 virtual void SetNativeCapture() OVERRIDE; |
| 256 virtual void ReleaseNativeCapture() OVERRIDE; | 256 virtual void ReleaseNativeCapture() OVERRIDE; |
| 257 | 257 |
| 258 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. | 258 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. |
| 259 gfx::Point QueryMouseLocationForTest() const; | 259 bool QueryMouseLocationForTest(gfx::Point* point) const; |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 friend class Window; | 262 friend class Window; |
| 263 | 263 |
| 264 // The parameter for OnWindowHidden() to specify why window is hidden. | 264 // The parameter for OnWindowHidden() to specify why window is hidden. |
| 265 enum WindowHiddenReason { | 265 enum WindowHiddenReason { |
| 266 WINDOW_DESTROYED, // Window is destroyed. | 266 WINDOW_DESTROYED, // Window is destroyed. |
| 267 WINDOW_HIDDEN, // Window is hidden. | 267 WINDOW_HIDDEN, // Window is hidden. |
| 268 WINDOW_MOVING, // Window is temporarily marked as hidden due to move | 268 WINDOW_MOVING, // Window is temporarily marked as hidden due to move |
| 269 // across root windows. | 269 // across root windows. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; | 395 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; |
| 396 | 396 |
| 397 scoped_ptr<ui::ViewProp> prop_; | 397 scoped_ptr<ui::ViewProp> prop_; |
| 398 | 398 |
| 399 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 399 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 400 }; | 400 }; |
| 401 | 401 |
| 402 } // namespace aura | 402 } // namespace aura |
| 403 | 403 |
| 404 #endif // UI_AURA_ROOT_WINDOW_H_ | 404 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |