Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: chrome/browser/profiles/profile_avatar_icon_util.h

Issue 2057203002: Bringing back fast user switching on desktop user menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky's comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698