| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 // Releases OS capture of the root window. | 69 // Releases OS capture of the root window. |
| 70 virtual void ReleaseCapture() = 0; | 70 virtual void ReleaseCapture() = 0; |
| 71 | 71 |
| 72 // Sets the currently displayed cursor. | 72 // Sets the currently displayed cursor. |
| 73 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 73 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
| 74 | 74 |
| 75 // Queries the mouse's current position relative to the host window and sets | 75 // Queries the mouse's current position relative to the host window and sets |
| 76 // it in |location_return|. Returns true if the cursor is within the host | 76 // it in |location_return|. Returns true if the cursor is within the host |
| 77 // window. The position set to |location_return| is constrained within the | 77 // window. The position set to |location_return| is constrained within the |
| 78 // host window. | 78 // host window. If the cursor is disabled, returns false and (0, 0) is set to |
| 79 // |location_return|. |
| 79 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint(). | 80 // This method is expensive, instead use gfx::Screen::GetCursorScreenPoint(). |
| 80 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0; | 81 virtual bool QueryMouseLocation(gfx::Point* location_return) = 0; |
| 81 | 82 |
| 82 // 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(). |
| 83 virtual bool ConfineCursorToRootWindow() = 0; | 84 virtual bool ConfineCursorToRootWindow() = 0; |
| 84 virtual void UnConfineCursor() = 0; | 85 virtual void UnConfineCursor() = 0; |
| 85 | 86 |
| 86 // Called when the cursor visibility has changed. | 87 // Called when the cursor visibility has changed. |
| 87 virtual void OnCursorVisibilityChanged(bool show) = 0; | 88 virtual void OnCursorVisibilityChanged(bool show) = 0; |
| 88 | 89 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 113 // Called when the device scale factor of the root window has chagned. | 114 // Called when the device scale factor of the root window has chagned. |
| 114 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; | 115 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; |
| 115 | 116 |
| 116 // Stop listening events in preparation for shutdown. | 117 // Stop listening events in preparation for shutdown. |
| 117 virtual void PrepareForShutdown() = 0; | 118 virtual void PrepareForShutdown() = 0; |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 } // namespace aura | 121 } // namespace aura |
| 121 | 122 |
| 122 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ | 123 #endif // UI_AURA_ROOT_WINDOW_HOST_H_ |
| OLD | NEW |