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 <string> | 10 #include <string> |
(...skipping 24 matching lines...) Expand all Loading... |
35 extern const SkColor kAvatarTutorialContentTextColor; | 35 extern const SkColor kAvatarTutorialContentTextColor; |
36 extern const SkColor kAvatarBubbleAccountsBackgroundColor; | 36 extern const SkColor kAvatarBubbleAccountsBackgroundColor; |
37 extern const SkColor kAvatarBubbleGaiaBackgroundColor; | 37 extern const SkColor kAvatarBubbleGaiaBackgroundColor; |
38 extern const SkColor kUserManagerBackgroundColor; | 38 extern const SkColor kUserManagerBackgroundColor; |
39 | 39 |
40 // Returns a version of |image| of a specific size. Note that no checks are | 40 // Returns a version of |image| of a specific size. Note that no checks are |
41 // done on the width/height so make sure they're reasonable values; in the | 41 // done on the width/height so make sure they're reasonable values; in the |
42 // range of 16-256 is probably best. | 42 // range of 16-256 is probably best. |
43 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, | 43 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, |
44 bool is_rectangle, | 44 bool is_rectangle, |
45 int width, int height); | 45 int width, int height, |
| 46 bool is_circular = false); |
46 | 47 |
47 // Returns a version of |image| suitable for use in menus. | 48 // Returns a version of |image| suitable for use in menus. |
48 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, | 49 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, |
49 bool is_rectangle); | 50 bool is_rectangle); |
50 | 51 |
51 // Returns a version of |image| suitable for use in WebUI. | 52 // Returns a version of |image| suitable for use in WebUI. |
52 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, | 53 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, |
53 bool is_rectangle); | 54 bool is_rectangle); |
54 | 55 |
55 // Returns a version of |image| suitable for use in title bars. The returned | 56 // Returns a version of |image| suitable for use in title bars. The returned |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // or | 104 // or |
104 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg | 105 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg |
105 // then return value in |new_url| would be: | 106 // then return value in |new_url| would be: |
106 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg | 107 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg |
107 bool GetImageURLWithThumbnailSize( | 108 bool GetImageURLWithThumbnailSize( |
108 const GURL& old_url, int thumbnail_size, GURL* new_url); | 109 const GURL& old_url, int thumbnail_size, GURL* new_url); |
109 | 110 |
110 } // namespace profiles | 111 } // namespace profiles |
111 | 112 |
112 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 113 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
OLD | NEW |