Index: chrome/browser/ui/web_applications/web_app_ui.cc |
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc |
index 4346059658a4afc98e81cfb7e7e522a50629a2f8..b95ce3c7b1c043f6407f73e86bba0ddc4b20f341 100644 |
--- a/chrome/browser/ui/web_applications/web_app_ui.cc |
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc |
@@ -11,14 +11,13 @@ |
#include "base/string16.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/extensions/tab_helper.h" |
-#include "chrome/browser/favicon/favicon_download_helper.h" |
-#include "chrome/browser/favicon/favicon_download_helper_delegate.h" |
#include "chrome/browser/favicon/favicon_tab_helper.h" |
#include "chrome/browser/favicon/favicon_util.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/web_applications/web_app.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/favicon_download_delegate.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/notification_source.h" |
@@ -46,7 +45,7 @@ namespace { |
// update them when icons are downloaded. It observes TAB_CLOSING notification |
// and cancels all the work when the underlying tab is closing. |
class UpdateShortcutWorker : public content::NotificationObserver, |
- public FaviconDownloadHelperDelegate { |
+ public content::FaviconDownloadDelegate { |
public: |
explicit UpdateShortcutWorker(WebContents* web_contents); |
@@ -61,8 +60,8 @@ class UpdateShortcutWorker : public content::NotificationObserver, |
// Downloads icon via the FaviconTabHelper. |
void DownloadIcon(); |
- // FaviconDownloadHelperDelegate override. |
- virtual void OnDidDownloadFavicon( |
+ // content::WebContentsDelegate override. |
jam
2012/11/27 01:16:31
nit: content::FaviconDownloadDelegate
Cait (Slow)
2012/11/28 00:11:45
Done.
|
+ virtual void DidDownloadFavicon( |
int id, |
const GURL& image_url, |
bool errored, |
@@ -121,6 +120,7 @@ UpdateShortcutWorker::UpdateShortcutWorker(WebContents* web_contents) |
this, |
chrome::NOTIFICATION_TAB_CLOSING, |
content::Source<NavigationController>(&web_contents->GetController())); |
+ web_contents_->RegisterFaviconDelegate(this); |
} |
void UpdateShortcutWorker::Run() { |
@@ -156,16 +156,13 @@ void UpdateShortcutWorker::DownloadIcon() { |
return; |
} |
- scoped_ptr<FaviconDownloadHelper> download_helper( |
- new FaviconDownloadHelper(web_contents_, this)); |
- |
- download_helper->DownloadFavicon(unprocessed_icons_.back().url, |
- std::max(unprocessed_icons_.back().width, |
- unprocessed_icons_.back().height)); |
+ web_contents_->DownloadFavicon(unprocessed_icons_.back().url, |
+ std::max(unprocessed_icons_.back().width, |
+ unprocessed_icons_.back().height)); |
unprocessed_icons_.pop_back(); |
} |
-void UpdateShortcutWorker::OnDidDownloadFavicon( |
+void UpdateShortcutWorker::DidDownloadFavicon( |
int id, |
const GURL& image_url, |
bool errored, |