| 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/webui/fileicon_source.h" | 5 #include "chrome/browser/ui/webui/fileicon_source.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 else if (scale_factor && iter->first == kScaleFactor) | 75 else if (scale_factor && iter->first == kScaleFactor) |
| 76 webui::ParseScaleFactor(iter->second, scale_factor); | 76 webui::ParseScaleFactor(iter->second, scale_factor); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 FileIconSource::IconRequestDetails::IconRequestDetails() : scale_factor(1.0f) { | 82 FileIconSource::IconRequestDetails::IconRequestDetails() : scale_factor(1.0f) { |
| 83 } | 83 } |
| 84 | 84 |
| 85 FileIconSource::IconRequestDetails::IconRequestDetails( |
| 86 const IconRequestDetails& other) = default; |
| 87 |
| 85 FileIconSource::IconRequestDetails::~IconRequestDetails() { | 88 FileIconSource::IconRequestDetails::~IconRequestDetails() { |
| 86 } | 89 } |
| 87 | 90 |
| 88 FileIconSource::FileIconSource() {} | 91 FileIconSource::FileIconSource() {} |
| 89 | 92 |
| 90 FileIconSource::~FileIconSource() {} | 93 FileIconSource::~FileIconSource() {} |
| 91 | 94 |
| 92 void FileIconSource::FetchFileIcon( | 95 void FileIconSource::FetchFileIcon( |
| 93 const base::FilePath& path, | 96 const base::FilePath& path, |
| 94 float scale_factor, | 97 float scale_factor, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 details.scale_factor).sk_bitmap(), | 155 details.scale_factor).sk_bitmap(), |
| 153 false, | 156 false, |
| 154 &icon_data->data()); | 157 &icon_data->data()); |
| 155 | 158 |
| 156 details.callback.Run(icon_data.get()); | 159 details.callback.Run(icon_data.get()); |
| 157 } else { | 160 } else { |
| 158 // TODO(glen): send a dummy icon. | 161 // TODO(glen): send a dummy icon. |
| 159 details.callback.Run(NULL); | 162 details.callback.Run(NULL); |
| 160 } | 163 } |
| 161 } | 164 } |
| OLD | NEW |