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

Unified Diff: chrome/browser/fav_icon_helper.cc

Issue 6374009: Get rid of a few more interfaces from RenderViewHostDelegate that aren't need... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/fav_icon_helper.h ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/fav_icon_helper.cc
===================================================================
--- chrome/browser/fav_icon_helper.cc (revision 72441)
+++ chrome/browser/fav_icon_helper.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/render_messages.h"
#include "gfx/codec/png_codec.h"
#include "gfx/favicon_size.h"
#include "skia/ext/image_operations.h"
@@ -111,9 +112,7 @@
tab_contents_->NotifyNavigationStateChanged(TabContents::INVALIDATE_TAB);
}
-void FavIconHelper::UpdateFavIconURL(RenderViewHost* render_view_host,
- int32 page_id,
- const GURL& icon_url) {
+void FavIconHelper::OnUpdateFavIconURL(int32 page_id, const GURL& icon_url) {
// TODO(davemoore) Should clear on empty url. Currently we ignore it.
// This appears to be what FF does as well.
if (icon_url.is_empty())
@@ -140,11 +139,20 @@
DownloadFavIconOrAskHistory(entry);
}
-void FavIconHelper::DidDownloadFavIcon(RenderViewHost* render_view_host,
- int id,
- const GURL& image_url,
- bool errored,
- const SkBitmap& image) {
+bool FavIconHelper::OnMessageReceived(const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(FavIconHelper, message)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnUpdateFavIconURL)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadFavIcon, OnDidDownloadFavIcon)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void FavIconHelper::OnDidDownloadFavIcon(int id,
+ const GURL& image_url,
+ bool errored,
+ const SkBitmap& image) {
DownloadRequests::iterator i = download_requests_.find(id);
if (i == download_requests_.end()) {
// Currently TabContents notifies us of ANY downloads so that it is
« no previous file with comments | « chrome/browser/fav_icon_helper.h ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698