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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Avatar formatting. | 33 // Avatar formatting. |
34 extern const int kAvatarIconWidth; | 34 extern const int kAvatarIconWidth; |
35 extern const int kAvatarIconHeight; | 35 extern const int kAvatarIconHeight; |
36 extern const SkColor kAvatarTutorialBackgroundColor; | 36 extern const SkColor kAvatarTutorialBackgroundColor; |
37 extern const SkColor kAvatarTutorialContentTextColor; | 37 extern const SkColor kAvatarTutorialContentTextColor; |
38 extern const SkColor kAvatarBubbleAccountsBackgroundColor; | 38 extern const SkColor kAvatarBubbleAccountsBackgroundColor; |
39 extern const SkColor kAvatarBubbleGaiaBackgroundColor; | 39 extern const SkColor kAvatarBubbleGaiaBackgroundColor; |
40 extern const SkColor kUserManagerBackgroundColor; | 40 extern const SkColor kUserManagerBackgroundColor; |
41 | 41 |
| 42 // Avatar shape. |
| 43 enum AvatarShape { |
| 44 SHAPE_CIRCLE, // Only available for desktop platforms |
| 45 SHAPE_SQUARE, |
| 46 }; |
| 47 |
42 // Returns a version of |image| of a specific size. Note that no checks are | 48 // Returns a version of |image| of a specific size. Note that no checks are |
43 // done on the width/height so make sure they're reasonable values; in the | 49 // done on the width/height so make sure they're reasonable values; in the |
44 // range of 16-256 is probably best. | 50 // range of 16-256 is probably best. |
45 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, | 51 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, |
46 bool is_rectangle, | 52 bool is_rectangle, |
47 int width, int height); | 53 int width, |
| 54 int height, |
| 55 AvatarShape shape); |
| 56 |
| 57 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, |
| 58 bool is_rectangle, |
| 59 int width, |
| 60 int height); |
48 | 61 |
49 // Returns a version of |image| suitable for use in menus. | 62 // Returns a version of |image| suitable for use in menus. |
50 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, | 63 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, |
51 bool is_rectangle); | 64 bool is_rectangle); |
52 | 65 |
53 // Returns a version of |image| suitable for use in WebUI. | 66 // Returns a version of |image| suitable for use in WebUI. |
54 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, | 67 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, |
55 bool is_rectangle); | 68 bool is_rectangle); |
56 | 69 |
57 // Returns a version of |image| suitable for use in title bars. The returned | 70 // Returns a version of |image| suitable for use in title bars. The returned |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 const GURL& old_url, int thumbnail_size, GURL* new_url); | 123 const GURL& old_url, int thumbnail_size, GURL* new_url); |
111 | 124 |
112 // Returns a list of dictionaries containing the default profile avatar icons as | 125 // Returns a list of dictionaries containing the default profile avatar icons as |
113 // well as avatar labels used for accessibility purposes. The list is ordered | 126 // well as avatar labels used for accessibility purposes. The list is ordered |
114 // according to the avatars' default order. | 127 // according to the avatars' default order. |
115 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels(); | 128 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels(); |
116 | 129 |
117 } // namespace profiles | 130 } // namespace profiles |
118 | 131 |
119 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 132 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
OLD | NEW |