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

Side by Side Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 12780024: Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: caitp feedback Created 7 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/favicon/favicon_tab_helper.h" 5 #include "chrome/browser/favicon/favicon_tab_helper.h"
6 6
7 #include "chrome/browser/favicon/favicon_handler.h" 7 #include "chrome/browser/favicon/favicon_handler.h"
8 #include "chrome/browser/favicon/favicon_service_factory.h" 8 #include "chrome/browser/favicon/favicon_service_factory.h"
9 #include "chrome/browser/favicon/favicon_util.h" 9 #include "chrome/browser/favicon/favicon_util.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 service->SetFavicons(entry->GetURL(), favicon.url, history::FAVICON, 126 service->SetFavicons(entry->GetURL(), favicon.url, history::FAVICON,
127 favicon.image); 127 favicon.image);
128 } 128 }
129 129
130 NavigationEntry* FaviconTabHelper::GetActiveEntry() { 130 NavigationEntry* FaviconTabHelper::GetActiveEntry() {
131 return web_contents()->GetController().GetActiveEntry(); 131 return web_contents()->GetController().GetActiveEntry();
132 } 132 }
133 133
134 int FaviconTabHelper::StartDownload(const GURL& url, int image_size) { 134 int FaviconTabHelper::StartDownload(const GURL& url, int image_size) {
135 return web_contents()->DownloadFavicon( 135 return web_contents()->DownloadImage(
136 url, 136 url,
137 true, 137 true,
138 image_size, 138 image_size,
139 base::Bind(&FaviconTabHelper::DidDownloadFavicon,base::Unretained(this))); 139 base::Bind(&FaviconTabHelper::DidDownloadFavicon,base::Unretained(this)));
140 } 140 }
141 141
142 void FaviconTabHelper::NotifyFaviconUpdated(bool icon_url_changed) { 142 void FaviconTabHelper::NotifyFaviconUpdated(bool icon_url_changed) {
143 content::NotificationService::current()->Notify( 143 content::NotificationService::current()->Notify(
144 chrome::NOTIFICATION_FAVICON_UPDATED, 144 chrome::NOTIFICATION_FAVICON_UPDATED,
145 content::Source<WebContents>(web_contents()), 145 content::Source<WebContents>(web_contents()),
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 const GURL& image_url, 179 const GURL& image_url,
180 int requested_size, 180 int requested_size,
181 const std::vector<SkBitmap>& bitmaps) { 181 const std::vector<SkBitmap>& bitmaps) {
182 favicon_handler_->OnDidDownloadFavicon( 182 favicon_handler_->OnDidDownloadFavicon(
183 id, image_url, requested_size, bitmaps); 183 id, image_url, requested_size, bitmaps);
184 if (touch_icon_handler_.get()) { 184 if (touch_icon_handler_.get()) {
185 touch_icon_handler_->OnDidDownloadFavicon( 185 touch_icon_handler_->OnDidDownloadFavicon(
186 id, image_url, requested_size, bitmaps); 186 id, image_url, requested_size, bitmaps);
187 } 187 }
188 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_handler.h ('k') | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698