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

Unified Diff: webkit/glue/webcursor_win.cc

Issue 10916253: Support custom cursors for windowless plugins on Windows Aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: webkit/glue/webcursor_win.cc
===================================================================
--- webkit/glue/webcursor_win.cc (revision 156090)
+++ webkit/glue/webcursor_win.cc (working copy)
@@ -109,32 +109,6 @@
return cursor_id >= IDC_ARROW; // See WinUser.h
}
-static WebCursorInfo::Type ToCursorType(HCURSOR cursor) {
- static struct {
- HCURSOR cursor;
- WebCursorInfo::Type type;
- } kStandardCursors[] = {
- { LoadCursor(NULL, IDC_ARROW), WebCursorInfo::TypePointer },
- { LoadCursor(NULL, IDC_CROSS), WebCursorInfo::TypeCross },
- { LoadCursor(NULL, IDC_HAND), WebCursorInfo::TypeHand },
- { LoadCursor(NULL, IDC_IBEAM), WebCursorInfo::TypeIBeam },
- { LoadCursor(NULL, IDC_WAIT), WebCursorInfo::TypeWait },
- { LoadCursor(NULL, IDC_HELP), WebCursorInfo::TypeHelp },
- { LoadCursor(NULL, IDC_SIZENESW), WebCursorInfo::TypeNorthEastResize },
- { LoadCursor(NULL, IDC_SIZENWSE), WebCursorInfo::TypeNorthWestResize },
- { LoadCursor(NULL, IDC_SIZENS), WebCursorInfo::TypeNorthSouthResize },
- { LoadCursor(NULL, IDC_SIZEWE), WebCursorInfo::TypeEastWestResize },
- { LoadCursor(NULL, IDC_SIZEALL), WebCursorInfo::TypeMove },
- { LoadCursor(NULL, IDC_APPSTARTING), WebCursorInfo::TypeProgress },
- { LoadCursor(NULL, IDC_NO), WebCursorInfo::TypeNotAllowed },
- };
- for (int i = 0; i < arraysize(kStandardCursors); i++) {
- if (cursor == kStandardCursors[i].cursor)
- return kStandardCursors[i].type;
- }
- return WebCursorInfo::TypeCustom;
-}
-
HCURSOR WebCursor::GetCursor(HINSTANCE module_handle){
if (!IsCustom()) {
const wchar_t* cursor_id =
@@ -194,17 +168,7 @@
return GetCursor(NULL);
}
-void WebCursor::InitFromExternalCursor(HCURSOR cursor) {
- WebCursorInfo::Type cursor_type = ToCursorType(cursor);
-
- InitFromCursorInfo(WebCursorInfo(cursor_type));
-
- if (cursor_type == WebCursorInfo::TypeCustom)
- external_cursor_ = cursor;
-}
-
void WebCursor::InitPlatformData() {
- external_cursor_ = NULL;
custom_cursor_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698