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

Unified Diff: ui/ozone/platform/x11/x11_cursor_factory_ozone.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/gfx/native_widget_types.h ('k') | ui/ozone/platform/x11/x11_cursor_factory_ozone.cc » ('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.h
diff --git a/ui/ozone/platform/x11/x11_cursor_factory_ozone.h b/ui/ozone/platform/x11/x11_cursor_factory_ozone.h
index a186a8211e42cb770dd8af6e1ae0fce539183b19..7b7ac6425051a3cc7a97cdea3c5043dd14ddea4f 100644
--- a/ui/ozone/platform/x11/x11_cursor_factory_ozone.h
+++ b/ui/ozone/platform/x11/x11_cursor_factory_ozone.h
@@ -7,8 +7,8 @@
#include <X11/X.h>
+#include <map>
#include <memory>
-#include <unordered_map>
#include <vector>
#include "base/macros.h"
@@ -25,7 +25,7 @@ class X11CursorFactoryOzone : public CursorFactoryOzone {
~X11CursorFactoryOzone() override;
// CursorFactoryOzone:
- PlatformCursor GetDefaultCursor(int type) override;
+ PlatformCursor GetDefaultCursor(CursorType type) override;
PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
const gfx::Point& hotspot,
float bitmap_dpi) override;
@@ -38,13 +38,13 @@ class X11CursorFactoryOzone : public CursorFactoryOzone {
private:
// Loads/caches default cursor or returns cached version.
- scoped_refptr<X11CursorOzone> GetDefaultCursorInternal(int type);
+ scoped_refptr<X11CursorOzone> GetDefaultCursorInternal(CursorType type);
// Holds a single instance of the invisible cursor. X11 has no way to hide
// the cursor so an invisible cursor mimics that.
scoped_refptr<X11CursorOzone> invisible_cursor_;
- std::unordered_map<int, scoped_refptr<X11CursorOzone>> default_cursors_;
+ std::map<CursorType, scoped_refptr<X11CursorOzone>> default_cursors_;
DISALLOW_COPY_AND_ASSIGN(X11CursorFactoryOzone);
};
« no previous file with comments | « ui/gfx/native_widget_types.h ('k') | ui/ozone/platform/x11/x11_cursor_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698