| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/app_list/search/launcher_search/launcher_search_icon
_image_loader_impl.h" | 5 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon
_image_loader_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
| 10 #include "extensions/browser/image_loader.h" | 10 #include "extensions/browser/image_loader.h" |
| 11 #include "extensions/common/file_util.h" | 11 #include "extensions/common/file_util.h" |
| 12 #include "extensions/common/manifest_handlers/icons_handler.h" | 12 #include "extensions/common/manifest_handlers/icons_handler.h" |
| 13 | 13 |
| 14 namespace app_list { | 14 namespace app_list { |
| 15 | 15 |
| 16 LauncherSearchIconImageLoaderImpl::LauncherSearchIconImageLoaderImpl( | 16 LauncherSearchIconImageLoaderImpl::LauncherSearchIconImageLoaderImpl( |
| 17 const GURL& custom_icon_url, | 17 const GURL& custom_icon_url, |
| 18 Profile* profile, | 18 Profile* profile, |
| 19 const extensions::Extension* extension, | 19 const extensions::Extension* extension, |
| 20 const int icon_dimension, | 20 const int icon_dimension, |
| 21 scoped_ptr<chromeos::launcher_search_provider::ErrorReporter> | 21 std::unique_ptr<chromeos::launcher_search_provider::ErrorReporter> |
| 22 error_reporter) | 22 error_reporter) |
| 23 : LauncherSearchIconImageLoader(custom_icon_url, | 23 : LauncherSearchIconImageLoader(custom_icon_url, |
| 24 profile, | 24 profile, |
| 25 extension, | 25 extension, |
| 26 icon_dimension, | 26 icon_dimension, |
| 27 std::move(error_reporter)), | 27 std::move(error_reporter)), |
| 28 weak_ptr_factory_(this) {} | 28 weak_ptr_factory_(this) {} |
| 29 | 29 |
| 30 LauncherSearchIconImageLoaderImpl::~LauncherSearchIconImageLoaderImpl() { | 30 LauncherSearchIconImageLoaderImpl::~LauncherSearchIconImageLoaderImpl() { |
| 31 } | 31 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 62 DCHECK_EQ(extension_icon_image_.get(), image); | 62 DCHECK_EQ(extension_icon_image_.get(), image); |
| 63 OnExtensionIconChanged(extension_icon_image_->image_skia()); | 63 OnExtensionIconChanged(extension_icon_image_->image_skia()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void LauncherSearchIconImageLoaderImpl::OnCustomIconImageLoaded( | 66 void LauncherSearchIconImageLoaderImpl::OnCustomIconImageLoaded( |
| 67 const gfx::Image& image) { | 67 const gfx::Image& image) { |
| 68 OnCustomIconLoaded(image.AsImageSkia()); | 68 OnCustomIconLoaded(image.AsImageSkia()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace app_list | 71 } // namespace app_list |
| OLD | NEW |