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 ecc3642692cd6dd8563f4fedab80607d5d024526..9994aff35c2658d4f63748e9338dcb8b5fa4fac3 100644 |
--- a/chrome/browser/profiles/profile_avatar_icon_util.h |
+++ b/chrome/browser/profiles/profile_avatar_icon_util.h |
@@ -17,6 +17,8 @@ namespace gfx { |
class Image; |
} |
+class SkBitmap; |
+ |
namespace profiles { |
// Avatar access. |
@@ -63,6 +65,7 @@ bool IsDefaultAvatarIconIndex(size_t index); |
// Checks if the given URL points to one of the default avatar icons. If it |
// 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. |
@@ -85,6 +88,10 @@ gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, |
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& bitmap, int scale_factor); |
+ |
} // namespace profiles |
#endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |