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

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

Issue 234583008: Revert 263262 "Newly created profiles should have the grey silho..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/image/image.h" 9 #include "ui/gfx/image/image.h"
10 10
11 namespace profiles { 11 namespace profiles {
12 12
13 // Avatar access. 13 // Avatar access.
14 extern const char kGAIAPictureFileName[]; 14 extern const char kGAIAPictureFileName[];
15 extern const char kHighResAvatarFolderName[]; 15 extern const char kHighResAvatarFolderName[];
16 16
17 // Avatar formatting. 17 // Avatar formatting.
18 extern const int kAvatarIconWidth; 18 extern const int kAvatarIconWidth;
19 extern const int kAvatarIconHeight; 19 extern const int kAvatarIconHeight;
20 extern const int kAvatarIconPadding; 20 extern const int kAvatarIconPadding;
21 extern const SkColor kAvatarTutorialBackgroundColor; 21 extern const SkColor kAvatarTutorialBackgroundColor;
22 extern const SkColor kAvatarTutorialContentTextColor; 22 extern const SkColor kAvatarTutorialContentTextColor;
23 23
24 // Gets the number of default avatar icons that exist. 24 // Gets the number of default avatar icons that exist.
25 size_t GetDefaultAvatarIconCount(); 25 size_t GetDefaultAvatarIconCount();
26 26
27 // Gets the index for the (grey silhouette) avatar used as a placeholder.
28 int GetPlaceholderAvatarIndex();
29
30 // Gets the resource ID of the placeholder avatar icon.
31 int GetPlaceholderAvatarIconResourceID();
32
33 // Gets the number of generic avatar icons that exist. 27 // Gets the number of generic avatar icons that exist.
34 size_t GetGenericAvatarIconCount(); 28 size_t GetGenericAvatarIconCount();
35 29
36 // Gets the resource ID of the default avatar icon at |index|. 30 // Gets the resource ID of the default avatar icon at |index|.
37 int GetDefaultAvatarIconResourceIDAtIndex(size_t index); 31 int GetDefaultAvatarIconResourceIDAtIndex(size_t index);
38 32
39 // Gets the resource filename of the default avatar icon at |index|. 33 // Gets the resource filename of the default avatar icon at |index|.
40 const char* GetDefaultAvatarIconFileNameAtIndex(size_t index); 34 const char* GetDefaultAvatarIconFileNameAtIndex(size_t index);
41 35
42 // Gets the file name of an avatar that has no high res version.
43 const char* GetNoHighResAvatarFileName();
44
45 // Returns a URL for the default avatar icon with specified index. 36 // Returns a URL for the default avatar icon with specified index.
46 std::string GetDefaultAvatarIconUrl(size_t index); 37 std::string GetDefaultAvatarIconUrl(size_t index);
47 38
48 // Checks if |index| is a valid avatar icon index 39 // Checks if |index| is a valid avatar icon index
49 bool IsDefaultAvatarIconIndex(size_t index); 40 bool IsDefaultAvatarIconIndex(size_t index);
50 41
51 // Checks if the given URL points to one of the default avatar icons. If it 42 // Checks if the given URL points to one of the default avatar icons. If it
52 // is, returns true and its index through |icon_index|. If not, returns false. 43 // is, returns true and its index through |icon_index|. If not, returns false.
53 bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index); 44 bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index);
54 // Returns a version of |image| of a specific size and with a grey border. 45 // Returns a version of |image| of a specific size and with a grey border.
(...skipping 14 matching lines...) Expand all
69 // Returns a version of |image| suitable for use in title bars. The returned 60 // Returns a version of |image| suitable for use in title bars. The returned
70 // image is scaled to fit |dst_width| and |dst_height|. 61 // image is scaled to fit |dst_width| and |dst_height|.
71 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, 62 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
72 bool is_rectangle, 63 bool is_rectangle,
73 int dst_width, 64 int dst_width,
74 int dst_height); 65 int dst_height);
75 66
76 } // namespace profiles 67 } // namespace profiles
77 68
78 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ 69 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/app/theme/theme_resources.grd ('k') | trunk/src/chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698