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

Unified Diff: ui/ozone/platform/x11/x11_cursor_factory_ozone.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/ozone/platform/x11/x11_cursor_factory_ozone.h ('k') | ui/ozone/public/cursor_factory_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/x11/x11_cursor_factory_ozone.cc
diff --git a/ui/ozone/platform/x11/x11_cursor_factory_ozone.cc b/ui/ozone/platform/x11/x11_cursor_factory_ozone.cc
index 97106f1c9551bed5518cf3004a357d07fd2c564d..0354647f975ea3f486528f9dbad2ae288806d69d 100644
--- a/ui/ozone/platform/x11/x11_cursor_factory_ozone.cc
+++ b/ui/ozone/platform/x11/x11_cursor_factory_ozone.cc
@@ -21,7 +21,7 @@ PlatformCursor ToPlatformCursor(X11CursorOzone* cursor) {
}
// Gets default aura cursor bitmap/hotspot and creates a X11CursorOzone with it.
-scoped_refptr<X11CursorOzone> CreateAuraX11Cursor(int type) {
+scoped_refptr<X11CursorOzone> CreateAuraX11Cursor(CursorType type) {
SkBitmap bitmap;
gfx::Point hotspot;
if (GetCursorBitmap(type, &bitmap, &hotspot)) {
@@ -37,7 +37,7 @@ X11CursorFactoryOzone::X11CursorFactoryOzone()
X11CursorFactoryOzone::~X11CursorFactoryOzone() {}
-PlatformCursor X11CursorFactoryOzone::GetDefaultCursor(int type) {
+PlatformCursor X11CursorFactoryOzone::GetDefaultCursor(CursorType type) {
return ToPlatformCursor(GetDefaultCursorInternal(type).get());
}
@@ -76,8 +76,8 @@ void X11CursorFactoryOzone::UnrefImageCursor(PlatformCursor cursor) {
}
scoped_refptr<X11CursorOzone> X11CursorFactoryOzone::GetDefaultCursorInternal(
- int type) {
- if (type == kCursorNone)
+ CursorType type) {
+ if (type == CursorType::kNone)
return invisible_cursor_;
// TODO(kylechar): Use predefined X cursors here instead.
@@ -86,8 +86,8 @@ scoped_refptr<X11CursorOzone> X11CursorFactoryOzone::GetDefaultCursorInternal(
// pointer cursor then invisible cursor if this fails.
scoped_refptr<X11CursorOzone> cursor = CreateAuraX11Cursor(type);
if (!cursor.get()) {
- if (type != kCursorPointer) {
- cursor = GetDefaultCursorInternal(kCursorPointer);
+ if (type != CursorType::kPointer) {
+ cursor = GetDefaultCursorInternal(CursorType::kPointer);
} else {
NOTREACHED() << "Failed to load default cursor bitmap";
}
« no previous file with comments | « ui/ozone/platform/x11/x11_cursor_factory_ozone.h ('k') | ui/ozone/public/cursor_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698