| 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_HOST_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_HOST_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Sets the OS capture to the root window. | 67 // Sets the OS capture to the root window. |
| 68 virtual void SetCapture() = 0; | 68 virtual void SetCapture() = 0; |
| 69 | 69 |
| 70 // Releases OS capture of the root window. | 70 // Releases OS capture of the root window. |
| 71 virtual void ReleaseCapture() = 0; | 71 virtual void ReleaseCapture() = 0; |
| 72 | 72 |
| 73 // Sets the currently displayed cursor. | 73 // Sets the currently displayed cursor. |
| 74 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 74 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
| 75 | 75 |
| 76 // Shows or hides the cursor. | |
| 77 virtual void ShowCursor(bool show) = 0; | |
| 78 | |
| 79 // Queries the mouse's current position relative to the host window and sets | 76 // Queries the mouse's current position relative to the host window and sets |
| 80 // it in |location_return|. Returns true if the cursor is within the host | 77 // it in |location_return|. Returns true if the cursor is within the host |
| 81 // window. The position set to |location_return| is constrained within the | 78 // window. The position set to |location_return| is constrained within the |
| 82 // host window. | 79 // host window. |
| 83 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint(). | 80 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint(). |
| 84 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0; | 81 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0; |
| 85 | 82 |
| 86 // Clips the cursor to the bounds of the root window until UnConfineCursor(). | 83 // Clips the cursor to the bounds of the root window until UnConfineCursor(). |
| 87 virtual bool ConfineCursorToRootWindow() = 0; | 84 virtual bool ConfineCursorToRootWindow() = 0; |
| 88 virtual void UnConfineCursor() = 0; | 85 virtual void UnConfineCursor() = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 107 // Called when the device scale factor of the root window has chagned. | 104 // Called when the device scale factor of the root window has chagned. |
| 108 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; | 105 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; |
| 109 | 106 |
| 110 // Stop listening events in preparation for shutdown. | 107 // Stop listening events in preparation for shutdown. |
| 111 virtual void PrepareForShutdown() = 0; | 108 virtual void PrepareForShutdown() = 0; |
| 112 }; | 109 }; |
| 113 | 110 |
| 114 } // namespace aura | 111 } // namespace aura |
| 115 | 112 |
| 116 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ | 113 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ |
| OLD | NEW |