| 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_CLIENT_CURSOR_CLIENT_H_ | 5 #ifndef UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
| 6 #define UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 6 #define UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 virtual void LockCursor() = 0; | 55 virtual void LockCursor() = 0; |
| 56 | 56 |
| 57 // Unlocks the cursor change. If all the locks are released, the cursor type, | 57 // Unlocks the cursor change. If all the locks are released, the cursor type, |
| 58 // cursor visibility, and mouse events enable state are restored to the ones | 58 // cursor visibility, and mouse events enable state are restored to the ones |
| 59 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and | 59 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and |
| 60 // EnableMouseEvents/DisableMouseEvents. | 60 // EnableMouseEvents/DisableMouseEvents. |
| 61 virtual void UnlockCursor() = 0; | 61 virtual void UnlockCursor() = 0; |
| 62 | 62 |
| 63 // Used to pass the cursor resource module name to the cursor loader. This is | 63 // Used to pass the cursor resource module name to the cursor loader. This is |
| 64 // typically used to load non system cursors. | 64 // typically used to load non system cursors. |
| 65 virtual void SetCursorResourceModule(const string16& module_name) = 0; | 65 virtual void SetCursorResourceModule(const base::string16& module_name) = 0; |
| 66 | 66 |
| 67 // Used to add or remove a CursorClientObserver. | 67 // Used to add or remove a CursorClientObserver. |
| 68 virtual void AddObserver(CursorClientObserver* observer) = 0; | 68 virtual void AddObserver(CursorClientObserver* observer) = 0; |
| 69 virtual void RemoveObserver(CursorClientObserver* observer) = 0; | 69 virtual void RemoveObserver(CursorClientObserver* observer) = 0; |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 virtual ~CursorClient() {} | 72 virtual ~CursorClient() {} |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 // Sets/Gets the activation client for the specified window. | 75 // Sets/Gets the activation client for the specified window. |
| 76 AURA_EXPORT void SetCursorClient(Window* window, | 76 AURA_EXPORT void SetCursorClient(Window* window, |
| 77 CursorClient* client); | 77 CursorClient* client); |
| 78 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 78 AURA_EXPORT CursorClient* GetCursorClient(Window* window); |
| 79 | 79 |
| 80 } // namespace client | 80 } // namespace client |
| 81 } // namespace aura | 81 } // namespace aura |
| 82 | 82 |
| 83 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 83 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
| OLD | NEW |