OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GFX_ICON_UTIL_H_ | 5 #ifndef UI_GFX_ICON_UTIL_H_ |
6 #define UI_GFX_ICON_UTIL_H_ | 6 #define UI_GFX_ICON_UTIL_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // } | 50 // } |
51 // | 51 // |
52 // // Use the icon with a WM_SETICON message | 52 // // Use the icon with a WM_SETICON message |
53 // ::SendMessage(hwnd, WM_SETICON, static_cast<WPARAM>(ICON_BIG), | 53 // ::SendMessage(hwnd, WM_SETICON, static_cast<WPARAM>(ICON_BIG), |
54 // reinterpret_cast<LPARAM>(icon)); | 54 // reinterpret_cast<LPARAM>(icon)); |
55 // | 55 // |
56 // // Destroy the icon when we are done | 56 // // Destroy the icon when we are done |
57 // ::DestroyIcon(icon); | 57 // ::DestroyIcon(icon); |
58 // | 58 // |
59 /////////////////////////////////////////////////////////////////////////////// | 59 /////////////////////////////////////////////////////////////////////////////// |
60 class UI_EXPORT IconUtil { | 60 class GFX_EXPORT IconUtil { |
61 public: | 61 public: |
62 // The size of the large icon entries in .ico files on Windows Vista+. | 62 // The size of the large icon entries in .ico files on Windows Vista+. |
63 static const int kLargeIconSize = 256; | 63 static const int kLargeIconSize = 256; |
64 // The size of icons in the medium icons view on Windows Vista+. This is the | 64 // The size of icons in the medium icons view on Windows Vista+. This is the |
65 // maximum size Windows will display an icon that does not have a 256x256 | 65 // maximum size Windows will display an icon that does not have a 256x256 |
66 // image, even at the large or extra large icons views. | 66 // image, even at the large or extra large icons views. |
67 static const int kMediumIconSize = 48; | 67 static const int kMediumIconSize = 48; |
68 | 68 |
69 // The dimensions for icon images in Windows icon files. All sizes are square; | 69 // The dimensions for icon images in Windows icon files. All sizes are square; |
70 // that is, the value 48 means a 48x48 pixel image. Sizes are listed in | 70 // that is, the value 48 means a 48x48 pixel image. Sizes are listed in |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // A helper function of CreateSkBitmapFromHICON. | 264 // A helper function of CreateSkBitmapFromHICON. |
265 static SkBitmap CreateSkBitmapFromHICONHelper(HICON icon, | 265 static SkBitmap CreateSkBitmapFromHICONHelper(HICON icon, |
266 const gfx::Size& s); | 266 const gfx::Size& s); |
267 | 267 |
268 // Prevent clients from instantiating objects of that class by declaring the | 268 // Prevent clients from instantiating objects of that class by declaring the |
269 // ctor/dtor as private. | 269 // ctor/dtor as private. |
270 DISALLOW_IMPLICIT_CONSTRUCTORS(IconUtil); | 270 DISALLOW_IMPLICIT_CONSTRUCTORS(IconUtil); |
271 }; | 271 }; |
272 | 272 |
273 #endif // UI_GFX_ICON_UTIL_H_ | 273 #endif // UI_GFX_ICON_UTIL_H_ |
OLD | NEW |