Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "third_party/skia/include/core/SkBitmap.h" | |
| 12 | |
| 13 namespace chromeos { | |
| 14 | |
| 15 // Wrapper class, that always contains SkBitmap and constains raw | |
|
Ivan Korotkov
2012/05/29 10:50:23
Please expand what "when possible" means :)
ygorshenin1
2012/05/30 12:17:34
Done.
| |
| 16 // representation of image when possible. | |
| 17 class UserImage { | |
| 18 public: | |
| 19 typedef std::vector<unsigned char> RawImage; | |
| 20 | |
| 21 explicit UserImage(const SkBitmap& image); | |
|
Ivan Korotkov
2012/05/29 10:50:23
Please document the purpose of overloaded construc
ygorshenin1
2012/05/30 12:17:34
Done.
| |
| 22 UserImage(const SkBitmap& image, const RawImage& raw_image); | |
| 23 virtual ~UserImage(); | |
| 24 | |
| 25 const SkBitmap& image() const; | |
|
Ivan Korotkov
2012/05/29 10:50:23
unix_style getters/setters should be inline.
ygorshenin1
2012/05/30 12:17:34
Done.
| |
| 26 bool has_raw_image() const; | |
| 27 const RawImage& raw_image() const; | |
| 28 | |
| 29 private: | |
| 30 SkBitmap image_; | |
| 31 bool has_raw_image_; | |
| 32 RawImage raw_image_; | |
| 33 }; | |
| 34 | |
| 35 } // namespace chromeos | |
| 36 | |
| 37 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_ | |
| OLD | NEW |