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

Side by Side Diff: chrome/browser/app_icon_win.cc

Issue 772533002: Fix icon on Windows XP taskbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some doc + git cl format Created 6 years 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
« no previous file with comments | « chrome/browser/app_icon_win.h ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('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) 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
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), MAKEINTRESOURCE(icon_id),
40 IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
41 LR_DEFAULTCOLOR));
42 }
43
36 scoped_ptr<SkBitmap> GetAppIconForSize(int size) { 44 scoped_ptr<SkBitmap> GetAppIconForSize(int size) {
37 const int icon_id = GetAppIconResourceId(); 45 const int icon_id = GetAppIconResourceId();
38 return IconUtil::CreateSkBitmapFromIconResource( 46 return IconUtil::CreateSkBitmapFromIconResource(
39 GetModuleHandle(chrome::kBrowserResourcesDll), icon_id, size); 47 GetModuleHandle(chrome::kBrowserResourcesDll), icon_id, size);
40 } 48 }
OLDNEW
« no previous file with comments | « chrome/browser/app_icon_win.h ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698