Index: ui/gfx/icon_util.cc |
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc |
index 2d9bc2164a527eed3fde6b202659e6d05c1cc0b3..f3ef07a7dce44d5ef970f282f304f9156314abf2 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)) { |
sadrul
2017/01/03 17:18:09
Don't need {}
braveyao
2017/01/03 17:30:51
Done.
|
+ hotspot = gfx::Point(icon_info.xHotspot, icon_info.yHotspot); |
+ } |
+ return hotspot; |
+} |
SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon, |
const gfx::Size& s) { |
DCHECK(icon); |