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

Unified Diff: ui/gfx/icon_util.cc

Issue 2605773002: Fix Aura can't provide accurate cursor hotspot info. (Closed)
Patch Set: restore logic in SearchTable() Created 3 years, 11 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
« no previous file with comments | « ui/gfx/icon_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util.cc
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index 2d9bc2164a527eed3fde6b202659e6d05c1cc0b3..f5b9b179f45fff9ba57724b859fbfdb1e37d726c 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -369,6 +369,14 @@ base::win::ScopedHICON IconUtil::CreateCursorFromDIB(const gfx::Size& icon_size,
return base::win::ScopedHICON(CreateIconIndirect(&ii));
}
+gfx::Point IconUtil::GetHotSpotFromHICON(HICON icon) {
+ ScopedICONINFO icon_info;
+ gfx::Point hotspot;
+ if (::GetIconInfo(icon, &icon_info))
+ hotspot = gfx::Point(icon_info.xHotspot, icon_info.yHotspot);
+
+ return hotspot;
+}
SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
const gfx::Size& s) {
DCHECK(icon);
« no previous file with comments | « ui/gfx/icon_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698