Index: chrome/browser/ui/views/create_application_shortcut_view.cc |
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc |
index 368261a1c3d753b56b9d95f980475399f2a2d475..e218603dd77f40c122ea5704860b3d71c3507b2b 100644 |
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc |
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc |
@@ -11,7 +11,6 @@ |
#include "base/utf_string_conversions.h" |
#include "base/win/windows_version.h" |
#include "chrome/browser/extensions/tab_helper.h" |
-#include "chrome/browser/favicon/favicon_download_helper.h" |
#include "chrome/browser/favicon/favicon_util.h" |
#include "chrome/browser/history/select_favicon_frames.h" |
#include "chrome/browser/prefs/pref_service.h" |
@@ -25,10 +24,10 @@ |
#include "chrome/common/extensions/extension.h" |
#include "chrome/common/extensions/extension_resource.h" |
#include "chrome/common/pref_names.h" |
+#include "content/public/browser/favicon_download_delegate.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/render_widget_host_view.h" |
#include "content/public/browser/web_contents.h" |
-#include "content/public/browser/web_contents_delegate.h" |
#include "grit/generated_resources.h" |
#include "grit/locale_settings.h" |
#include "grit/theme_resources.h" |
@@ -410,6 +409,7 @@ CreateUrlApplicationShortcutView::CreateUrlApplicationShortcutView( |
web_contents_(web_contents), |
pending_download_id_(-1) { |
+ web_contents_->RegisterFaviconDelegate(this); |
web_app::GetShortcutInfoForTab(web_contents_, &shortcut_info_); |
const WebApplicationInfo& app_info = |
extensions::TabHelper::FromWebContents(web_contents_)->web_app_info(); |
@@ -445,10 +445,7 @@ void CreateUrlApplicationShortcutView::FetchIcon() { |
if (unprocessed_icons_.empty()) // No icons to fetch. |
return; |
- if (!download_helper_.get()) |
- download_helper_.reset(new FaviconDownloadHelper(web_contents_, this)); |
- |
- pending_download_id_ = download_helper_->DownloadFavicon( |
+ pending_download_id_ = web_contents_->DownloadFavicon( |
unprocessed_icons_.back().url, |
std::max(unprocessed_icons_.back().width, |
unprocessed_icons_.back().height)); |
@@ -456,7 +453,7 @@ void CreateUrlApplicationShortcutView::FetchIcon() { |
unprocessed_icons_.pop_back(); |
} |
-void CreateUrlApplicationShortcutView::OnDidDownloadFavicon( |
+void CreateUrlApplicationShortcutView::DidDownloadFavicon( |
int id, |
const GURL& image_url, |
bool errored, |