Chromium Code Reviews| Index: chrome/browser/chromeos/login/user_image.h |
| diff --git a/chrome/browser/chromeos/login/user_image.h b/chrome/browser/chromeos/login/user_image.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..08270f721abd7b9523ac6a9c99786cd9fef88103 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/user_image.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_ |
| +#define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_ |
| +#pragma once |
| + |
| +#include <vector> |
| + |
| +#include "third_party/skia/include/core/SkBitmap.h" |
| + |
| +namespace chromeos { |
| + |
| +// 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.
|
| +// representation of image when possible. |
| +class UserImage { |
| + public: |
| + typedef std::vector<unsigned char> RawImage; |
| + |
| + 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.
|
| + UserImage(const SkBitmap& image, const RawImage& raw_image); |
| + virtual ~UserImage(); |
| + |
| + 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.
|
| + bool has_raw_image() const; |
| + const RawImage& raw_image() const; |
| + |
| + private: |
| + SkBitmap image_; |
| + bool has_raw_image_; |
| + RawImage raw_image_; |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_H_ |