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

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: Comment is fixed. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.h ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user.h
diff --git a/chrome/browser/chromeos/login/user.h b/chrome/browser/chromeos/login/user.h
index 18290a2d37a8589c793b4095f8e8479df83a9945..df3aab8032cf608bb07ea5e2eca9bfad805da8a4 100644
--- a/chrome/browser/chromeos/login/user.h
+++ b/chrome/browser/chromeos/login/user.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
+#include "chrome/browser/chromeos/login/user_image.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia.h"
@@ -59,8 +60,12 @@ class User {
std::string GetAccountName(bool use_display_email) const;
// The image for this user.
- const gfx::ImageSkia& image() const { return image_; }
+ const gfx::ImageSkia& 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 +95,8 @@ class User {
~User();
// Setters are private so only UserManager can call them.
- void SetImage(const gfx::ImageSkia& 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);
@@ -114,7 +120,7 @@ class User {
string16 display_name_;
// The displayed user email, defaults to |email_|.
std::string display_email_;
- gfx::ImageSkia image_;
+ UserImage user_image_;
OAuthTokenStatus oauth_token_status_;
SkBitmap wallpaper_thumbnail_;
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.h ('k') | chrome/browser/chromeos/login/user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698