| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/icon_loader.h" | 5 #include "chrome/browser/icon_loader.h" |
| 6 | 6 |
| 7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 NOTREACHED(); | 46 NOTREACHED(); |
| 47 } | 47 } |
| 48 gfx::ImageSkia image_skia(gfx::ImageSkiaFromResizedNSImage(icon, size)); | 48 gfx::ImageSkia image_skia(gfx::ImageSkiaFromResizedNSImage(icon, size)); |
| 49 if (!image_skia.isNull()) { | 49 if (!image_skia.isNull()) { |
| 50 image_skia.MakeThreadSafe(); | 50 image_skia.MakeThreadSafe(); |
| 51 image_.reset(new gfx::Image(image_skia)); | 51 image_.reset(new gfx::Image(image_skia)); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 target_task_runner_->PostTask(FROM_HERE, | 55 target_task_runner_->PostTask(FROM_HERE, |
| 56 base::Bind(&IconLoader::NotifyDelegate, this)); | 56 base::Bind(callback_, base::Unretained(this), |
| 57 base::Passed(&image_), group_)); |
| 57 } | 58 } |
| OLD | NEW |