OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "chrome/browser/chromeos/login/user_image_loader.h" | 5 #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "chrome/browser/chromeos/login/helper.h" | 14 #include "chrome/browser/chromeos/login/helper.h" |
15 #include "chrome/browser/chromeos/login/user_image.h" | 15 #include "chrome/browser/chromeos/login/users/avatar/user_image.h" |
16 #include "skia/ext/image_operations.h" | 16 #include "skia/ext/image_operations.h" |
17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
18 #include "ui/gfx/codec/png_codec.h" | 18 #include "ui/gfx/codec/png_codec.h" |
19 #include "ui/gfx/skbitmap_operations.h" | 19 #include "ui/gfx/skbitmap_operations.h" |
20 | 20 |
21 namespace chromeos { | 21 namespace chromeos { |
22 | 22 |
23 UserImageLoader::ImageInfo::ImageInfo(const std::string& file_path, | 23 UserImageLoader::ImageInfo::ImageInfo(const std::string& file_path, |
24 int pixels_per_side, | 24 int pixels_per_side, |
25 const LoadedCallback& loaded_cb) | 25 const LoadedCallback& loaded_cb) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return; | 143 return; |
144 } | 144 } |
145 const LoadedCallback loaded_cb = it->second.loaded_cb; | 145 const LoadedCallback loaded_cb = it->second.loaded_cb; |
146 image_info_map_.erase(it); | 146 image_info_map_.erase(it); |
147 | 147 |
148 foreground_task_runner_->PostTask(FROM_HERE, | 148 foreground_task_runner_->PostTask(FROM_HERE, |
149 base::Bind(loaded_cb, UserImage())); | 149 base::Bind(loaded_cb, UserImage())); |
150 } | 150 } |
151 | 151 |
152 } // namespace chromeos | 152 } // namespace chromeos |
OLD | NEW |