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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2918903002: Move IconURLs method from WebFrame to WebLocalFrame (Closed)
Patch Set: s/kFavIcon/kFavicon/g (as suggested in CR feedback from pkotwicz@). Created 3 years, 6 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 | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d96814515a88d7f2fa6fec2e54d0288d5af9c00f..19c4e0198433ff2d1dfdf55105b52bc7c61cdc0d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -774,7 +774,6 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHostImpl* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
#endif
- IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowValidationMessage,
OnShowValidationMessage)
IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage,
@@ -829,6 +828,7 @@ bool WebContentsImpl::OnMessageReceived(RenderFrameHostImpl* render_frame_host,
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
OnUpdatePageImportanceSignals)
IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
#if BUILDFLAG(ENABLE_PLUGINS)
IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated,
OnPepperInstanceCreated)
@@ -4144,13 +4144,19 @@ void WebContentsImpl::OnBrowserPluginMessage(RenderFrameHost* render_frame_host,
#endif // BUILDFLAG(ENABLE_PLUGINS)
void WebContentsImpl::OnUpdateFaviconURL(
- RenderViewHostImpl* source,
+ RenderFrameHostImpl* source,
const std::vector<FaviconURL>& candidates) {
+ // Ignore favicons for non-main frame.
+ if (source->GetParent()) {
+ NOTREACHED();
+ return;
+ }
+
// We get updated favicon URLs after the page stops loading. If a cross-site
// navigation occurs while a page is still loading, the initial page
// may stop loading and send us updated favicon URLs after the navigation
// for the new page has committed.
- if (!source->is_active())
+ if (!source->IsCurrent())
return;
for (auto& observer : observers_)
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698