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

Unified Diff: chrome/browser/profiles/profile_avatar_icon_util.h

Issue 660813002: [Win] Add a fast profile switcher to the Windows taskbar item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: commas. commas are important Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/avatar_menu_desktop.cc ('k') | chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_avatar_icon_util.h
diff --git a/chrome/browser/profiles/profile_avatar_icon_util.h b/chrome/browser/profiles/profile_avatar_icon_util.h
index 8e272121fb71448f1af131fde489ab035db019b8..721559858a3db0a97d3f533e59e1ca44bf9ca6ee 100644
--- a/chrome/browser/profiles/profile_avatar_icon_util.h
+++ b/chrome/browser/profiles/profile_avatar_icon_util.h
@@ -34,18 +34,51 @@ extern const SkColor kAvatarBubbleAccountsBackgroundColor;
extern const SkColor kAvatarBubbleGaiaBackgroundColor;
extern const SkColor kUserManagerBackgroundColor;
+// Returns a version of |image| of a specific size. Note that no checks are
+// done on the width/height so make sure they're reasonable values; in the
+// range of 16-256 is probably best.
+gfx::Image GetSizedAvatarIcon(const gfx::Image& image,
+ bool is_rectangle,
+ int width, int height);
+
+// Returns a version of |image| suitable for use in menus.
+gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
+ bool is_rectangle);
+
+// Returns a version of |image| suitable for use in WebUI.
+gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
+ bool is_rectangle);
+
+// Returns a version of |image| suitable for use in title bars. The returned
+// image is scaled to fit |dst_width| and |dst_height|.
+gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
+ bool is_rectangle,
+ int dst_width,
+ int dst_height);
+
+// Returns a bitmap with a couple of columns shaved off so it is more square,
+// so that when resized to a square aspect ratio it looks pretty.
+SkBitmap GetAvatarIconAsSquare(const SkBitmap& source_bitmap, int scale_factor);
+
+// Sets |image| to the avatar corresponding to the profile at |profile_path| and
+// sets |is_rectangle| to true unless |image| is a built-in profile avatar. For
+// built-in profile avatars, always return the non-high res version.
+void GetTransparentBackgroundProfileAvatar(const base::FilePath& profile_path,
+ gfx::Image* image,
+ bool* is_rectangle);
+
// Gets the number of default avatar icons that exist.
size_t GetDefaultAvatarIconCount();
+// Gets the number of generic avatar icons that exist.
+size_t GetGenericAvatarIconCount();
+
// Gets the index for the (grey silhouette) avatar used as a placeholder.
int GetPlaceholderAvatarIndex();
// Gets the resource ID of the placeholder avatar icon.
int GetPlaceholderAvatarIconResourceID();
-// Gets the number of generic avatar icons that exist.
-size_t GetGenericAvatarIconCount();
-
// Gets the resource ID of the default avatar icon at |index|.
int GetDefaultAvatarIconResourceIDAtIndex(size_t index);
@@ -68,32 +101,6 @@ bool IsDefaultAvatarIconIndex(size_t index);
// is, returns true and its index through |icon_index|. If not, returns false.
bool IsDefaultAvatarIconUrl(const std::string& icon_url, size_t *icon_index);
-// Returns a version of |image| of a specific size. Note that no checks are
-// done on the width/height so make sure they're reasonable values; in the
-// range of 16-256 is probably best.
-gfx::Image GetSizedAvatarIcon(const gfx::Image& image,
- bool is_rectangle,
- int width, int height);
-
-// Returns a version of |image| suitable for use in menus.
-gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
- bool is_rectangle);
-
-// Returns a version of |image| suitable for use in WebUI.
-gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
- bool is_rectangle);
-
-// Returns a version of |image| suitable for use in title bars. The returned
-// image is scaled to fit |dst_width| and |dst_height|.
-gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
- bool is_rectangle,
- int dst_width,
- int dst_height);
-
-// Returns a bitmap with a couple of columns shaved off so it is more square,
-// so that when resized to a square aspect ratio it looks pretty.
-SkBitmap GetAvatarIconAsSquare(const SkBitmap& source_bitmap, int scale_factor);
-
} // namespace profiles
#endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_
« no previous file with comments | « chrome/browser/profiles/avatar_menu_desktop.cc ('k') | chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698