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

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: Added check for guest button Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 30
31 // Avatar formatting. 31 // Avatar formatting.
32 extern const int kAvatarIconWidth; 32 extern const int kAvatarIconWidth;
33 extern const int kAvatarIconHeight; 33 extern const int kAvatarIconHeight;
34 extern const SkColor kAvatarTutorialBackgroundColor; 34 extern const SkColor kAvatarTutorialBackgroundColor;
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 // Avatar shape.
41 enum AvatarShape {
42 SHAPE_CIRCLE,
Roger Tawa OOO till Jul 10th 2016/06/17 14:35:57 You should remove the enum value here with an #ifd
Jane 2016/06/20 13:10:24 I tried putting the enum definition under #ifdef (
Roger Tawa OOO till Jul 10th 2016/06/20 14:04:44 Not sure about ambiguity.
43 SHAPE_SQUARE,
44 };
45
40 // Returns a version of |image| of a specific size. Note that no checks are 46 // 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 47 // done on the width/height so make sure they're reasonable values; in the
42 // range of 16-256 is probably best. 48 // range of 16-256 is probably best.
43 gfx::Image GetSizedAvatarIcon(const gfx::Image& image, 49 gfx::Image GetSizedAvatarIcon(const gfx::Image& image,
44 bool is_rectangle, 50 bool is_rectangle,
45 int width, int height); 51 int width, int height,
52 AvatarShape shape=SHAPE_SQUARE);
46 53
47 // Returns a version of |image| suitable for use in menus. 54 // Returns a version of |image| suitable for use in menus.
48 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, 55 gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
49 bool is_rectangle); 56 bool is_rectangle);
50 57
51 // Returns a version of |image| suitable for use in WebUI. 58 // Returns a version of |image| suitable for use in WebUI.
52 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, 59 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
53 bool is_rectangle); 60 bool is_rectangle);
54 61
55 // Returns a version of |image| suitable for use in title bars. The returned 62 // 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
103 // or 110 // or
104 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg 111 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s64-c/photo.jpg
105 // then return value in |new_url| would be: 112 // then return value in |new_url| would be:
106 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg 113 // https://example.com/--Abc/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s256-c/photo.jpg
107 bool GetImageURLWithThumbnailSize( 114 bool GetImageURLWithThumbnailSize(
108 const GURL& old_url, int thumbnail_size, GURL* new_url); 115 const GURL& old_url, int thumbnail_size, GURL* new_url);
109 116
110 } // namespace profiles 117 } // namespace profiles
111 118
112 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 119 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698