Index: ui/base/cursor/image_cursors.h |
diff --git a/ui/base/cursor/image_cursors.h b/ui/base/cursor/image_cursors.h |
index 5831293fb46838683b046e22b2c1c6de4fe7ac6b..45565d548be1118274b60f89f650ff8edb1af009 100644 |
--- a/ui/base/cursor/image_cursors.h |
+++ b/ui/base/cursor/image_cursors.h |
@@ -26,6 +26,8 @@ class UI_BASE_EXPORT ImageCursors { |
ImageCursors(); |
~ImageCursors(); |
+ void Initialize(); |
+ |
// Returns the scale and rotation of the currently loaded cursor. |
float GetScale() const; |
display::Display::Rotation GetRotation() const; |
@@ -53,6 +55,25 @@ class UI_BASE_EXPORT ImageCursors { |
DISALLOW_COPY_AND_ASSIGN(ImageCursors); |
}; |
+// Helper class that holds an ImageCursors unique pointer. |
+class UI_BASE_EXPORT ImageCursorsHolder { |
+ public: |
+ ImageCursorsHolder(); |
+ ~ImageCursorsHolder(); |
+ |
+ ImageCursors* GetImageCursors(); |
+ |
+ void SetImageCursors(std::unique_ptr<ImageCursors> image_cursors); |
+ |
+ base::WeakPtr<ImageCursorsHolder> GetWeakPtr(); |
+ |
+ private: |
+ std::unique_ptr<ImageCursors> image_cursors_; |
+ base::WeakPtrFactory<ImageCursorsHolder> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ImageCursorsHolder); |
+}; |
+ |
} // namespace ui |
#endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ |