OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_USER_IMAGE_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_LOADER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "chrome/browser/chromeos/login/image_decoder.h" | 14 #include "chrome/browser/image_decoder.h" |
15 | 15 |
16 class MessageLoop; | 16 class MessageLoop; |
17 class SkBitmap; | 17 class SkBitmap; |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 // A facility to read a file containing user image asynchronously in the IO | 21 // A facility to read a file containing user image asynchronously in the IO |
22 // thread. Returns the image in the form of an SkBitmap. | 22 // thread. Returns the image in the form of an SkBitmap. |
23 class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>, | 23 class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>, |
24 public ImageDecoder::Delegate { | 24 public ImageDecoder::Delegate { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Holds info structures about all images we're trying to decode. | 65 // Holds info structures about all images we're trying to decode. |
66 // Accessed only on FILE thread. | 66 // Accessed only on FILE thread. |
67 ImageInfoMap image_info_map_; | 67 ImageInfoMap image_info_map_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(UserImageLoader); | 69 DISALLOW_COPY_AND_ASSIGN(UserImageLoader); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace chromeos | 72 } // namespace chromeos |
73 | 73 |
74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_LOADER_H_ | 74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_LOADER_H_ |
OLD | NEW |