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

Side by Side Diff: chrome/browser/chromeos/login/user_image.h

Issue 10448105: Revert "Added support for animated/nonanimated user image. There are no" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_image.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "ui/gfx/image/image_skia.h"
12
13 namespace chromeos {
14
15 // Wrapper class for bitmaps and raw images when it's necessary. Could
16 // be used for storing profile images (including animated profile
17 // images) and user wallpapers.
18 class UserImage {
19 public:
20 typedef std::vector<unsigned char> RawImage;
21
22 // Constructs UserImage from bitmap. Should be used where only
23 // static image is needed (e.g. wallpapers).
24 explicit UserImage(const gfx::ImageSkia& image);
25
26 // Constructs UserImage from raw image and bitmap that should
27 // represent single frame from that one. Can be used for wrapping
28 // animated images.
29 UserImage(const gfx::ImageSkia& image, const RawImage& raw_image);
30
31 virtual ~UserImage();
32
33 // Replaces already stored image to new |image|. Note, that
34 // |raw_image| will be reset after that operation.
35 void SetImage(const gfx::ImageSkia& image);
36 const gfx::ImageSkia& image() const { return image_; }
37 bool has_raw_image() const { return has_raw_image_; }
38 bool has_animated_image() const { return has_animated_image_; }
39 const RawImage& raw_image() const { return raw_image_; }
40
41 private:
42 gfx::ImageSkia image_;
43 bool has_raw_image_;
44 bool has_animated_image_;
45 RawImage raw_image_;
46 };
47
48 } // namespace chromeos
49
50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698