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

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

Issue 10807090: Add a hand grab and grabbing cursor (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « webkit/glue/resources/hand_grabbing.cur ('k') | webkit/glue/webkit_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MAKEINTRESOURCE(IDC_CURSOR_NONE); 92 return MAKEINTRESOURCE(IDC_CURSOR_NONE);
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: 99 case WebCursorInfo::TypeGrab:
100 return MAKEINTRESOURCE(IDC_HAND_GRAB);
102 case WebCursorInfo::TypeGrabbing: 101 case WebCursorInfo::TypeGrabbing:
103 return IDC_ARROW; 102 return MAKEINTRESOURCE(IDC_HAND_GRABBING);
104 } 103 }
105 NOTREACHED(); 104 NOTREACHED();
106 return NULL; 105 return NULL;
107 } 106 }
108 107
109 static bool IsSystemCursorID(LPCWSTR cursor_id) { 108 static bool IsSystemCursorID(LPCWSTR cursor_id) {
110 return cursor_id >= IDC_ARROW; // See WinUser.h 109 return cursor_id >= IDC_ARROW; // See WinUser.h
111 } 110 }
112 111
113 static WebCursorInfo::Type ToCursorType(HCURSOR cursor) { 112 static WebCursorInfo::Type ToCursorType(HCURSOR cursor) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 235 }
237 236
238 void WebCursor::CleanupPlatformData() { 237 void WebCursor::CleanupPlatformData() {
239 external_cursor_ = NULL; 238 external_cursor_ = NULL;
240 239
241 if (custom_cursor_) { 240 if (custom_cursor_) {
242 DestroyIcon(custom_cursor_); 241 DestroyIcon(custom_cursor_);
243 custom_cursor_ = NULL; 242 custom_cursor_ = NULL;
244 } 243 }
245 } 244 }
OLDNEW
« no previous file with comments | « webkit/glue/resources/hand_grabbing.cur ('k') | webkit/glue/webkit_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698