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

Side by Side Diff: webkit/glue/webcursor_win.cc

Issue 6591105: Implement the grab/grabbing cursors (for Mac/GTK).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "base/pickle.h" 6 #include "base/pickle.h"
7 #include "grit/webkit_resources.h" 7 #include "grit/webkit_resources.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
10 #include "ui/gfx/gdi_util.h" 10 #include "ui/gfx/gdi_util.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 case WebCursorInfo::TypeCopy: 89 case WebCursorInfo::TypeCopy:
90 return MAKEINTRESOURCE(IDC_COPYCUR); 90 return MAKEINTRESOURCE(IDC_COPYCUR);
91 case WebCursorInfo::TypeNone: 91 case WebCursorInfo::TypeNone:
92 return IDC_ARROW; 92 return IDC_ARROW;
93 case WebCursorInfo::TypeNotAllowed: 93 case WebCursorInfo::TypeNotAllowed:
94 return IDC_NO; 94 return IDC_NO;
95 case WebCursorInfo::TypeZoomIn: 95 case WebCursorInfo::TypeZoomIn:
96 return MAKEINTRESOURCE(IDC_ZOOMIN); 96 return MAKEINTRESOURCE(IDC_ZOOMIN);
97 case WebCursorInfo::TypeZoomOut: 97 case WebCursorInfo::TypeZoomOut:
98 return MAKEINTRESOURCE(IDC_ZOOMOUT); 98 return MAKEINTRESOURCE(IDC_ZOOMOUT);
99 // TODO(avi): get cursor images for grab/grabbing
100 // http://crbug.com/74699
101 case WebCursorInfo::TypeGrab:
102 case WebCursorInfo::TypeGrabbing:
103 return IDC_ARROW;
99 } 104 }
100 NOTREACHED(); 105 NOTREACHED();
101 return NULL; 106 return NULL;
102 } 107 }
103 108
104 static bool IsSystemCursorID(LPCWSTR cursor_id) { 109 static bool IsSystemCursorID(LPCWSTR cursor_id) {
105 return cursor_id >= IDC_ARROW; // See WinUser.h 110 return cursor_id >= IDC_ARROW; // See WinUser.h
106 } 111 }
107 112
108 static WebCursorInfo::Type ToCursorType(HCURSOR cursor) { 113 static WebCursorInfo::Type ToCursorType(HCURSOR cursor) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 236 }
232 237
233 void WebCursor::CleanupPlatformData() { 238 void WebCursor::CleanupPlatformData() {
234 external_cursor_ = NULL; 239 external_cursor_ = NULL;
235 240
236 if (custom_cursor_) { 241 if (custom_cursor_) {
237 DestroyIcon(custom_cursor_); 242 DestroyIcon(custom_cursor_);
238 custom_cursor_ = NULL; 243 custom_cursor_ = NULL;
239 } 244 }
240 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698