Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 11411180: move favicon download code from chrome/ into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix order Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6b63f217ab4d79b9baaf51a3e698bc6cab8eff8e..df9eb50e491ccc88d4a536e0096e8ec91d91a47d 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"
@@ -28,7 +27,7 @@
#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 "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
@@ -445,18 +444,17 @@ 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));
+ unprocessed_icons_.back().height),
+ base::Bind(&CreateUrlApplicationShortcutView::DidDownloadFavicon,
+ base::Unretained(this)));
unprocessed_icons_.pop_back();
}
-void CreateUrlApplicationShortcutView::OnDidDownloadFavicon(
+void CreateUrlApplicationShortcutView::DidDownloadFavicon(
int id,
const GURL& image_url,
bool errored,
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.h ('k') | chrome/browser/ui/web_applications/web_app_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698