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

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

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 years, 8 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.cc ('k') | ui/base/cursor/cursor_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/cursor_data.h
diff --git a/ui/base/cursor/cursor_data.h b/ui/base/cursor/cursor_data.h
index 7cc019c8a396411b79ad91f68dd0036eb40fa340..c3879692d63e76ddf3ff9b7b17e47e46abca297c 100644
--- a/ui/base/cursor/cursor_data.h
+++ b/ui/base/cursor/cursor_data.h
@@ -15,6 +15,7 @@
class SkBitmap;
namespace ui {
+enum class CursorType;
// The new Cursor class. (aka, Cursor2)
//
@@ -38,7 +39,7 @@ namespace ui {
class UI_BASE_EXPORT CursorData {
public:
CursorData();
- explicit CursorData(int type);
+ explicit CursorData(CursorType type);
CursorData(const gfx::Point& hostpot_point,
const std::vector<SkBitmap>& cursor_frames,
float scale_factor,
@@ -48,14 +49,14 @@ class UI_BASE_EXPORT CursorData {
CursorData& operator=(const CursorData& cursor);
- int cursor_type() const { return cursor_type_; }
+ CursorType cursor_type() const { return cursor_type_; }
const base::TimeDelta& frame_delay() const { return frame_delay_; }
float scale_factor() const { return scale_factor_; }
const gfx::Point& hotspot_in_pixels() const { return hotspot_; }
const std::vector<SkBitmap>& cursor_frames() const { return cursor_frames_; }
// Returns true if this CursorData instance is of |cursor_type|.
- bool IsType(int cursor_type) const;
+ bool IsType(CursorType cursor_type) const;
// Checks if the data in |rhs| was created from the same input data.
//
@@ -71,7 +72,7 @@ class UI_BASE_EXPORT CursorData {
private:
// A native type constant from cursor.h.
- int cursor_type_;
+ CursorType cursor_type_;
// The delay between cursor frames.
base::TimeDelta frame_delay_;
« no previous file with comments | « ui/base/cursor/cursor.cc ('k') | ui/base/cursor/cursor_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698