OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "webkit/glue/webcursor.h" | 11 #include "webkit/glue/webcursor.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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; | |
viettrungluu
2011/03/02 21:10:10
Maybe a NOTIMPLEMENTED(), so we don't forget?
Avi (use Gerrit)
2011/03/02 21:11:35
This is a valid code path that can be triggered by
| |
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 Loading... | |
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 } |
OLD | NEW |