Index: ash/wm/image_cursors.h |
diff --git a/ash/wm/image_cursors.h b/ash/wm/image_cursors.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e3358290503de9ac1b066049765d16ef86277dc2 |
--- /dev/null |
+++ b/ash/wm/image_cursors.h |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_WM_IMAGE_CURSORS_H_ |
+#define ASH_WM_IMAGE_CURSORS_H_ |
+ |
+#include "ash/ash_export.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/gfx/native_widget_types.h" |
+ |
+namespace ui { |
+class CursorLoader; |
+} |
+ |
+namespace ash { |
+ |
+// A utility class that provides cursors for NativeCursors for which we have |
+// image resources. |
+class ASH_EXPORT ImageCursors { |
+ public: |
+ ImageCursors(); |
+ ~ImageCursors(); |
+ |
+ // Returns the device scale factor of cursors. |
+ float GetDeviceScaleFactor() const; |
+ |
+ // Reloads the cursors with |device_scale_factor|. |
+ 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.
|
+ |
+ // Sets the platform cursor based on the native type of |cursor|. |
+ void SetPlatformCursor(gfx::NativeCursor* cursor); |
+ |
+ // Hides the cursor outside of the Aura root window. The cursor will be drawn |
+ // within the Aura root window, and it'll remain hidden after the Aura window |
+ // is closed. |
+ void HideHostCursor(); |
+ |
+ private: |
+ scoped_ptr<ui::CursorLoader> cursor_loader_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ImageCursors); |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_WM_IMAGE_CURSORS_H_ |