Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class FilePath; | 13 class FilePath; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class Image; | 17 class Image; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class SkBitmap; | |
| 21 | |
| 20 namespace profiles { | 22 namespace profiles { |
| 21 | 23 |
| 22 // Avatar access. | 24 // Avatar access. |
| 23 extern const char kGAIAPictureFileName[]; | 25 extern const char kGAIAPictureFileName[]; |
| 24 extern const char kHighResAvatarFolderName[]; | 26 extern const char kHighResAvatarFolderName[]; |
| 25 | 27 |
| 26 // Avatar formatting. | 28 // Avatar formatting. |
| 27 extern const int kAvatarIconWidth; | 29 extern const int kAvatarIconWidth; |
| 28 extern const int kAvatarIconHeight; | 30 extern const int kAvatarIconHeight; |
| 29 extern const SkColor kAvatarTutorialBackgroundColor; | 31 extern const SkColor kAvatarTutorialBackgroundColor; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 // Returns a version of |image| suitable for use in WebUI. | 79 // Returns a version of |image| suitable for use in WebUI. |
| 78 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, | 80 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, |
| 79 bool is_rectangle); | 81 bool is_rectangle); |
| 80 | 82 |
| 81 // Returns a version of |image| suitable for use in title bars. The returned | 83 // Returns a version of |image| suitable for use in title bars. The returned |
| 82 // image is scaled to fit |dst_width| and |dst_height|. | 84 // image is scaled to fit |dst_width| and |dst_height|. |
| 83 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, | 85 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, |
| 84 bool is_rectangle, | 86 bool is_rectangle, |
| 85 int dst_width, | 87 int dst_width, |
| 86 int dst_height); | 88 int dst_height); |
| 89 // Returns a bitmap with a couple of columns shaved off so it is more square, | |
|
noms (inactive)
2014/05/06 15:32:31
nit: newline between functions.
| |
| 90 // so that when resized to a square aspect ratio it looks pretty. | |
| 91 SkBitmap GetAvatarIconAsSquare(const SkBitmap& bitmap, int scale_factor); | |
| 87 | 92 |
| 88 } // namespace profiles | 93 } // namespace profiles |
| 89 | 94 |
| 90 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 95 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
| OLD | NEW |