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

Unified Diff: third_party/WebKit/public/platform/WebCursorInfo.h

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Support setting pointer icon in Android N Created 3 years, 7 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
Index: third_party/WebKit/public/platform/WebCursorInfo.h
diff --git a/third_party/WebKit/public/platform/WebCursorInfo.h b/third_party/WebKit/public/platform/WebCursorInfo.h
index 0d0933821349e609fa40a38c32b04ec1d7a5de67..0bba96989de834d9b1b057fe8ae89434e44736b5 100644
--- a/third_party/WebKit/public/platform/WebCursorInfo.h
+++ b/third_party/WebKit/public/platform/WebCursorInfo.h
@@ -114,6 +114,62 @@ struct WebCursorInfo {
#if INSIDE_BLINK
BLINK_PLATFORM_EXPORT explicit WebCursorInfo(const Cursor&);
#endif
+
+ static const char* GetName(WebCursorInfo::Type type) {
Jinsuk Kim 2017/05/17 04:49:50 This function is used only for warning message. I'
jaebaek 2017/05/18 01:44:28 Done.
+#define CASE_TYPE(t) \
+ case WebCursorInfo::k##t: \
Jinsuk Kim 2017/05/17 04:49:50 Indentation looks wrong.
jaebaek 2017/05/18 01:44:28 Done.
+ return #t
+ switch (type) {
+ CASE_TYPE(TypePointer);
+ CASE_TYPE(TypeCross);
+ CASE_TYPE(TypeHand);
+ CASE_TYPE(TypeIBeam);
+ CASE_TYPE(TypeWait);
+ CASE_TYPE(TypeHelp);
+ CASE_TYPE(TypeEastResize);
+ CASE_TYPE(TypeNorthResize);
+ CASE_TYPE(TypeNorthEastResize);
+ CASE_TYPE(TypeNorthWestResize);
+ CASE_TYPE(TypeSouthResize);
+ CASE_TYPE(TypeSouthEastResize);
+ CASE_TYPE(TypeSouthWestResize);
+ CASE_TYPE(TypeWestResize);
+ CASE_TYPE(TypeNorthSouthResize);
+ CASE_TYPE(TypeEastWestResize);
+ CASE_TYPE(TypeNorthEastSouthWestResize);
+ CASE_TYPE(TypeNorthWestSouthEastResize);
+ CASE_TYPE(TypeColumnResize);
+ CASE_TYPE(TypeRowResize);
+ CASE_TYPE(TypeMiddlePanning);
+ CASE_TYPE(TypeEastPanning);
+ CASE_TYPE(TypeNorthPanning);
+ CASE_TYPE(TypeNorthEastPanning);
+ CASE_TYPE(TypeNorthWestPanning);
+ CASE_TYPE(TypeSouthPanning);
+ CASE_TYPE(TypeSouthEastPanning);
+ CASE_TYPE(TypeSouthWestPanning);
+ CASE_TYPE(TypeWestPanning);
+ CASE_TYPE(TypeMove);
+ CASE_TYPE(TypeVerticalText);
+ CASE_TYPE(TypeCell);
+ CASE_TYPE(TypeContextMenu);
+ CASE_TYPE(TypeAlias);
+ CASE_TYPE(TypeProgress);
+ CASE_TYPE(TypeNoDrop);
+ CASE_TYPE(TypeCopy);
+ CASE_TYPE(TypeNone);
+ CASE_TYPE(TypeNotAllowed);
+ CASE_TYPE(TypeZoomIn);
+ CASE_TYPE(TypeZoomOut);
+ CASE_TYPE(TypeGrab);
+ CASE_TYPE(TypeGrabbing);
+ CASE_TYPE(TypeCustom);
+ default:
+ NOTREACHED();
+ return "(Not defined)";
+ }
+#undef CASE_TYPE
+ }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698