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

Side by Side Diff: components/user_manager/avatar/user_image.h

Issue 376193002: Move UserImage to user_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add ui/gfx dep Created 6 years, 5 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 | « components/user_manager/DEPS ('k') | components/user_manager/avatar/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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_H_ 5 #ifndef COMPONENTS_USER_MANAGER_AVATAR_USER_IMAGE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_H_ 6 #define COMPONENTS_USER_MANAGER_AVATAR_USER_IMAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "components/user_manager/user_manager_export.h"
11 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
12 #include "url/gurl.h" 13 #include "url/gurl.h"
blundell 2014/07/09 14:22:22 you should also have a url dependency.
Nikita (slow) 2014/07/09 14:44:37 Done.
13 14
14 namespace chromeos { 15 namespace user_manager {
15 16
16 // Wrapper class storing a still image and it's raw representation. Could be 17 // Wrapper class storing a still image and it's raw representation. Could be
17 // used for storing profile images (including animated profile images) and user 18 // used for storing profile images (including animated profile images) and user
18 // wallpapers. 19 // wallpapers.
19 class UserImage { 20 class USER_MANAGER_EXPORT UserImage {
20 public: 21 public:
21 // TODO(ivankr): replace with RefCountedMemory to prevent copying. 22 // TODO(ivankr): replace with RefCountedMemory to prevent copying.
22 typedef std::vector<unsigned char> RawImage; 23 typedef std::vector<unsigned char> RawImage;
23 24
24 // Creates a new instance from a given still frame and tries to encode raw 25 // Creates a new instance from a given still frame and tries to encode raw
25 // representation for it. 26 // representation for it.
26 // TODO(ivankr): remove eventually. 27 // TODO(ivankr): remove eventually.
27 static UserImage CreateAndEncode(const gfx::ImageSkia& image); 28 static UserImage CreateAndEncode(const gfx::ImageSkia& image);
28 29
29 // Create instance with an empty still frame and no raw data. 30 // Create instance with an empty still frame and no raw data.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 RawImage raw_image_; 72 RawImage raw_image_;
72 bool has_animated_image_; 73 bool has_animated_image_;
73 RawImage animated_image_; 74 RawImage animated_image_;
74 GURL url_; 75 GURL url_;
75 76
76 // If image was loaded from the local file, file path is stored here. 77 // If image was loaded from the local file, file path is stored here.
77 std::string file_path_; 78 std::string file_path_;
78 bool is_safe_format_; 79 bool is_safe_format_;
79 }; 80 };
80 81
81 } // namespace chromeos 82 } // namespace user_manager
82 83
83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_H_ 84 #endif // COMPONENTS_USER_MANAGER_AVATAR_USER_IMAGE_H_
OLDNEW
« no previous file with comments | « components/user_manager/DEPS ('k') | components/user_manager/avatar/user_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698