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

Unified Diff: chrome/browser/chromeos/login/user.h

Issue 10454044: Added support for animated/nonanimated user image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Deleted useless inclusions. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 24a926b6b8aa539e646f5d9da0f0502be8720cc6..8b3f7dcdb45a73e9a03ed840a2f51a19e1ebb53c 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "chrome/browser/chromeos/login/user_image.h"
#include "third_party/skia/include/core/SkBitmap.h"
// The demo user is represented by a domainless username.
@@ -62,8 +63,11 @@ class User {
bool NeedsNameTooltip() const;
// The image for this user.
- const SkBitmap& image() const { return image_; }
+ const SkBitmap& image() const { return user_image_.image(); }
int image_index() const { return image_index_; }
+ bool has_animated_image() const { return user_image_.has_animated_image(); }
+
+ bool GetAnimatedImage(UserImage::RawImage* raw_image) const;
// The thumbnail of user custom wallpaper.
const SkBitmap& wallpaper_thumbnail() const { return wallpaper_thumbnail_; }
@@ -90,7 +94,8 @@ class User {
~User();
// Setters are private so only UserManager can call them.
- void SetImage(const SkBitmap& image, int image_index);
+ void SetImage(const UserImage& user_image, int image_index);
+
// Sets a stub image until the next |SetImage| call. |image_index| may be
// one of |kExternalImageIndex| or |kProfileImageIndex|.
void SetStubImage(int image_index);
@@ -109,7 +114,7 @@ class User {
std::string email_;
// The displayed user email, defaults to |email_|.
std::string display_email_;
- SkBitmap image_;
+ UserImage user_image_;
OAuthTokenStatus oauth_token_status_;
SkBitmap wallpaper_thumbnail_;

Powered by Google App Engine
This is Rietveld 408576698