| 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/ui/cocoa/download/download_item_mac.h" | 5 #include "chrome/browser/ui/cocoa/download/download_item_mac.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 7 #include "base/callback.h" | 8 #include "base/callback.h" |
| 8 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/download/download_item_model.h" | 10 #include "chrome/browser/download/download_item_model.h" |
| 10 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" | 11 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" |
| 11 #include "content/public/browser/download_item.h" | 12 #include "content/public/browser/download_item.h" |
| 12 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 13 | 14 |
| 14 using content::DownloadItem; | 15 using content::DownloadItem; |
| 15 | 16 |
| 16 // DownloadItemMac ------------------------------------------------------------- | 17 // DownloadItemMac ------------------------------------------------------------- |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 base::Bind(&DownloadItemMac::OnExtractIconComplete, | 94 base::Bind(&DownloadItemMac::OnExtractIconComplete, |
| 94 base::Unretained(this)), | 95 base::Unretained(this)), |
| 95 &cancelable_task_tracker_); | 96 &cancelable_task_tracker_); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void DownloadItemMac::OnExtractIconComplete(gfx::Image* icon) { | 99 void DownloadItemMac::OnExtractIconComplete(gfx::Image* icon) { |
| 99 if (!icon) | 100 if (!icon) |
| 100 return; | 101 return; |
| 101 [item_controller_ setIcon:icon->ToNSImage()]; | 102 [item_controller_ setIcon:icon->ToNSImage()]; |
| 102 } | 103 } |
| OLD | NEW |