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=SHAPE_SQUARE); | |
anthonyvd
2016/06/28 14:50:46
nit: I think you want spaces around = here
We als
Jane
2016/06/28 16:32:53
Thanks! Good to learn. I modified both functions t
| |
48 | 56 |
49 // Returns a version of |image| suitable for use in menus. | 57 // Returns a version of |image| suitable for use in menus. |
50 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, | 58 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, |
51 bool is_rectangle); | 59 bool is_rectangle); |
52 | 60 |
53 // Returns a version of |image| suitable for use in WebUI. | 61 // Returns a version of |image| suitable for use in WebUI. |
54 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, | 62 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, |
55 bool is_rectangle); | 63 bool is_rectangle); |
56 | 64 |
57 // Returns a version of |image| suitable for use in title bars. The returned | 65 // 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); | 118 const GURL& old_url, int thumbnail_size, GURL* new_url); |
111 | 119 |
112 // Returns a list of dictionaries containing the default profile avatar icons as | 120 // 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 | 121 // well as avatar labels used for accessibility purposes. The list is ordered |
114 // according to the avatars' default order. | 122 // according to the avatars' default order. |
115 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels(); | 123 std::unique_ptr<base::ListValue> GetDefaultProfileAvatarIconsAndLabels(); |
116 | 124 |
117 } // namespace profiles | 125 } // namespace profiles |
118 | 126 |
119 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 127 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
OLD | NEW |