Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: ui/base/cursor/image_cursors.h

Issue 2961403002: WIP fix for Ozone cursor woes in Mushrome: Numéro deux
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/cursor/cursor_loader_ozone.cc ('k') | ui/base/cursor/image_cursors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ui/base/cursor/cursor_loader_ozone.cc ('k') | ui/base/cursor/image_cursors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698