OLD | NEW |
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_MANAGER_TEST_UTIL_
H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_TEST_UTIL_
H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_TEST_UTIL_
H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_TEST_UTIL_
H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 class ImageLoader : public ImageDecoder::Delegate { | 34 class ImageLoader : public ImageDecoder::Delegate { |
35 public: | 35 public: |
36 explicit ImageLoader(const base::FilePath& path); | 36 explicit ImageLoader(const base::FilePath& path); |
37 virtual ~ImageLoader(); | 37 virtual ~ImageLoader(); |
38 | 38 |
39 scoped_ptr<gfx::ImageSkia> Load(); | 39 scoped_ptr<gfx::ImageSkia> Load(); |
40 | 40 |
41 // ImageDecoder::Delegate: | 41 // ImageDecoder::Delegate: |
42 virtual void OnImageDecoded(const ImageDecoder* decoder, | 42 virtual void OnImageDecoded(const ImageDecoder* decoder, |
43 const SkBitmap& decoded_image) OVERRIDE; | 43 const SkBitmap& decoded_image) override; |
44 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE; | 44 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) override; |
45 | 45 |
46 private: | 46 private: |
47 base::FilePath path_; | 47 base::FilePath path_; |
48 base::RunLoop run_loop_; | 48 base::RunLoop run_loop_; |
49 | 49 |
50 scoped_ptr<gfx::ImageSkia> decoded_image_; | 50 scoped_ptr<gfx::ImageSkia> decoded_image_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(ImageLoader); | 52 DISALLOW_COPY_AND_ASSIGN(ImageLoader); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace test | 55 } // namespace test |
56 } // namespace chromeos | 56 } // namespace chromeos |
57 | 57 |
58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_TEST_UT
IL_H_ | 58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_TEST_UT
IL_H_ |
OLD | NEW |