OLD | NEW |
1 // Copyright (c) 2011 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 "chrome/browser/app_icon_win.h" | 5 #include "chrome/browser/app_icon_win.h" |
6 | 6 |
7 #include "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "ui/gfx/icon_util.h" | 10 #include "ui/gfx/icon_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 HICON GetAppIcon() { | 30 HICON GetAppIcon() { |
31 const int icon_id = GetAppIconResourceId(); | 31 const int icon_id = GetAppIconResourceId(); |
32 return LoadIcon(GetModuleHandle(chrome::kBrowserResourcesDll), | 32 return LoadIcon(GetModuleHandle(chrome::kBrowserResourcesDll), |
33 MAKEINTRESOURCE(icon_id)); | 33 MAKEINTRESOURCE(icon_id)); |
34 } | 34 } |
35 | 35 |
| 36 HICON GetSmallAppIcon() { |
| 37 const int icon_id = GetAppIconResourceId(); |
| 38 return static_cast<HICON>(LoadImage( |
| 39 GetModuleHandle(chrome::kBrowserResourcesDll), |
| 40 MAKEINTRESOURCE(icon_id), |
| 41 IMAGE_ICON, |
| 42 GetSystemMetrics(SM_CXSMICON), |
| 43 GetSystemMetrics(SM_CYSMICON), |
| 44 LR_DEFAULTCOLOR)); |
| 45 } |
| 46 |
36 scoped_ptr<SkBitmap> GetAppIconForSize(int size) { | 47 scoped_ptr<SkBitmap> GetAppIconForSize(int size) { |
37 const int icon_id = GetAppIconResourceId(); | 48 const int icon_id = GetAppIconResourceId(); |
38 return IconUtil::CreateSkBitmapFromIconResource( | 49 return IconUtil::CreateSkBitmapFromIconResource( |
39 GetModuleHandle(chrome::kBrowserResourcesDll), icon_id, size); | 50 GetModuleHandle(chrome::kBrowserResourcesDll), icon_id, size); |
40 } | 51 } |
OLD | NEW |