Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_WM_IMAGE_CURSORS_H_ | |
| 6 #define ASH_WM_IMAGE_CURSORS_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/gfx/native_widget_types.h" | |
| 11 | |
| 12 namespace ui { | |
| 13 class CursorLoader; | |
| 14 } | |
| 15 | |
| 16 namespace ash { | |
| 17 | |
| 18 // A utility class that provides cursors for NativeCursors for which we have | |
| 19 // image resources. | |
| 20 class ASH_EXPORT ImageCursors { | |
| 21 public: | |
| 22 ImageCursors(); | |
| 23 ~ImageCursors(); | |
| 24 | |
| 25 // Returns the device scale factor of cursors. | |
| 26 float GetDeviceScaleFactor() const; | |
| 27 | |
| 28 // Reloads the cursors with |device_scale_factor|. | |
| 29 void Reload(float device_scale_factor); | |
|
Daniel Erat
2012/09/06 23:47:15
nit: Would a name like SetDeviceScaleFactor() be b
mazda
2012/09/07 02:20:57
Done.
| |
| 30 | |
| 31 // Sets the platform cursor based on the native type of |cursor|. | |
| 32 void SetPlatformCursor(gfx::NativeCursor* cursor); | |
| 33 | |
| 34 // Hides the cursor outside of the Aura root window. The cursor will be drawn | |
| 35 // within the Aura root window, and it'll remain hidden after the Aura window | |
| 36 // is closed. | |
| 37 void HideHostCursor(); | |
| 38 | |
| 39 private: | |
| 40 scoped_ptr<ui::CursorLoader> cursor_loader_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(ImageCursors); | |
| 43 }; | |
| 44 | |
| 45 } // namespace ash | |
| 46 | |
| 47 #endif // ASH_WM_IMAGE_CURSORS_H_ | |
| OLD | NEW |