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

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

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_data.h ('k') | ui/base/cursor/cursor_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/cursor_data.cc
diff --git a/ui/base/cursor/cursor_data.cc b/ui/base/cursor/cursor_data.cc
index 20a6896f76a23bb28df107ed20fa81331493eea9..c49400e3a2c537d941b3a19bbfda68be16208d19 100644
--- a/ui/base/cursor/cursor_data.cc
+++ b/ui/base/cursor/cursor_data.cc
@@ -9,15 +9,17 @@
namespace ui {
-CursorData::CursorData() : cursor_type_(0), scale_factor_(0.0f) {}
+CursorData::CursorData()
+ : cursor_type_(CursorType::kNull), scale_factor_(0.0f) {}
-CursorData::CursorData(int type) : cursor_type_(type), scale_factor_(0.0f) {}
+CursorData::CursorData(CursorType type)
+ : cursor_type_(type), scale_factor_(0.0f) {}
CursorData::CursorData(const gfx::Point& hotspot_point,
const std::vector<SkBitmap>& cursor_frames,
float scale_factor,
const base::TimeDelta& frame_delay)
- : cursor_type_(kCursorCustom),
+ : cursor_type_(CursorType::kCustom),
frame_delay_(frame_delay),
scale_factor_(scale_factor),
hotspot_(hotspot_point),
@@ -32,7 +34,7 @@ CursorData::~CursorData() {}
CursorData& CursorData::operator=(const CursorData& cursor) = default;
-bool CursorData::IsType(int cursor_type) const {
+bool CursorData::IsType(CursorType cursor_type) const {
return cursor_type_ == cursor_type;
}
« no previous file with comments | « ui/base/cursor/cursor_data.h ('k') | ui/base/cursor/cursor_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698