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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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's visibility has changed. |
118 void OnCursorVisibilityChanged(bool visible); | 118 void OnCursorVisibilityChanged(bool visible); |
119 | 119 |
| 120 // Invoked when the mouse events get enabled or disabled. |
| 121 void OnMouseEventsEnableStateChanged(bool enabled); |
| 122 |
120 // Moves the cursor to the specified location relative to the root window. | 123 // Moves the cursor to the specified location relative to the root window. |
121 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 124 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
122 | 125 |
123 // Clips the cursor movement to the root_window. | 126 // Clips the cursor movement to the root_window. |
124 bool ConfineCursorToWindow(); | 127 bool ConfineCursorToWindow(); |
125 | 128 |
126 // Draws the necessary set of windows. | 129 // Draws the necessary set of windows. |
127 void Draw(); | 130 void Draw(); |
128 | 131 |
129 // Draw the whole screen. | 132 // Draw the whole screen. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // Overridden from Window: | 252 // Overridden from Window: |
250 virtual bool CanFocus() const OVERRIDE; | 253 virtual bool CanFocus() const OVERRIDE; |
251 virtual bool CanReceiveEvents() const OVERRIDE; | 254 virtual bool CanReceiveEvents() const OVERRIDE; |
252 | 255 |
253 // Overridden from aura::client::CaptureDelegate: | 256 // Overridden from aura::client::CaptureDelegate: |
254 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; | 257 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; |
255 virtual void SetNativeCapture() OVERRIDE; | 258 virtual void SetNativeCapture() OVERRIDE; |
256 virtual void ReleaseNativeCapture() OVERRIDE; | 259 virtual void ReleaseNativeCapture() OVERRIDE; |
257 | 260 |
258 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. | 261 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. |
259 gfx::Point QueryMouseLocationForTest() const; | 262 bool QueryMouseLocationForTest(gfx::Point* point) const; |
260 | 263 |
261 private: | 264 private: |
262 friend class Window; | 265 friend class Window; |
263 | 266 |
264 // The parameter for OnWindowHidden() to specify why window is hidden. | 267 // The parameter for OnWindowHidden() to specify why window is hidden. |
265 enum WindowHiddenReason { | 268 enum WindowHiddenReason { |
266 WINDOW_DESTROYED, // Window is destroyed. | 269 WINDOW_DESTROYED, // Window is destroyed. |
267 WINDOW_HIDDEN, // Window is hidden. | 270 WINDOW_HIDDEN, // Window is hidden. |
268 WINDOW_MOVING, // Window is temporarily marked as hidden due to move | 271 WINDOW_MOVING, // Window is temporarily marked as hidden due to move |
269 // across root windows. | 272 // across root windows. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; | 398 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; |
396 | 399 |
397 scoped_ptr<ui::ViewProp> prop_; | 400 scoped_ptr<ui::ViewProp> prop_; |
398 | 401 |
399 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 402 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
400 }; | 403 }; |
401 | 404 |
402 } // namespace aura | 405 } // namespace aura |
403 | 406 |
404 #endif // UI_AURA_ROOT_WINDOW_H_ | 407 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |