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

Unified Diff: chrome/browser/ui/metro_pin_tab_helper_win.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
« no previous file with comments | « chrome/browser/ui/metro_pin_tab_helper_win.h ('k') | chrome/browser/ui/views/ash/balloon_view_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/metro_pin_tab_helper_win.cc
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc
index 195b8cc10ac095f70e647b9174ca02cceb8f706a..5d5c22adda730a8367e404f2b68e54acaf4cd4be 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.cc
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc
@@ -18,12 +18,10 @@
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/win/metro.h"
-#include "chrome/browser/favicon/favicon_download_helper.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/favicon/favicon_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/icon_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "crypto/sha2.h"
@@ -368,9 +366,7 @@ void MetroPinTabHelper::FaviconChooser::AddPendingRequest(int request_id) {
}
MetroPinTabHelper::MetroPinTabHelper(content::WebContents* web_contents)
- : content::WebContentsObserver(web_contents),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- favicon_download_helper_(web_contents, this)) {
+ : content::WebContentsObserver(web_contents) {
}
MetroPinTabHelper::~MetroPinTabHelper() {}
@@ -425,12 +421,14 @@ void MetroPinTabHelper::TogglePinnedToStartScreen() {
// Request all the candidates.
int image_size = 0; // Request the full sized image.
- for (std::vector<FaviconURL>::const_iterator iter =
+ for (std::vector<content::FaviconURL>::const_iterator iter =
favicon_url_candidates_.begin();
iter != favicon_url_candidates_.end();
++iter) {
favicon_chooser_->AddPendingRequest(
- favicon_download_helper_.DownloadFavicon(iter->icon_url, image_size));
+ web_contents()->DownloadFavicon(iter->icon_url, image_size,
+ base::Bind(&MetroPinTabHelper::DidDownloadFavicon,
+ base::Unretained(this))));
}
}
@@ -446,13 +444,13 @@ void MetroPinTabHelper::DidNavigateMainFrame(
favicon_url_candidates_.clear();
}
-void MetroPinTabHelper::OnUpdateFaviconURL(
+void MetroPinTabHelper::DidUpdateFaviconURL(
int32 page_id,
- const std::vector<FaviconURL>& candidates) {
+ const std::vector<content::FaviconURL>& candidates) {
favicon_url_candidates_ = candidates;
}
-void MetroPinTabHelper::OnDidDownloadFavicon(
+void MetroPinTabHelper::DidDownloadFavicon(
int id,
const GURL& image_url,
bool errored,
« no previous file with comments | « chrome/browser/ui/metro_pin_tab_helper_win.h ('k') | chrome/browser/ui/views/ash/balloon_view_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698