Convert FrameHostMsg_UpdateFaviconURL to mojo
This CL converts FrameHostMsg_UpdateFaviconURL to mojo and removes
WebLocalFrameClient::DidChangeIcon and WebLocalFrame::IconURLs and
WebIconURL class and content::FaviconURL class.
Bug: 1040099
Change-Id: I109b0dc165d2a268dacf1c38b26341eafc128382
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2043181
Commit-Queue: Miyoung Shin <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Dave Tapuska <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/master@{#742507}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7ff28906..4adbf46d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -906,7 +906,6 @@
OnDidDisplayContentWithCertificateErrors)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunContentWithCertificateErrors,
OnDidRunContentWithCertificateErrors)
- IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
#if BUILDFLAG(ENABLE_PLUGINS)
IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated,
OnPepperInstanceCreated)
@@ -5160,9 +5159,9 @@
}
#endif // BUILDFLAG(ENABLE_PLUGINS)
-void WebContentsImpl::OnUpdateFaviconURL(
- RenderFrameHostImpl* source,
- const std::vector<FaviconURL>& candidates) {
+void WebContentsImpl::UpdateFaviconURL(
+ RenderFrameHost* source,
+ std::vector<blink::mojom::FaviconURLPtr> candidates) {
// Ignore favicons for non-main frame.
if (source->GetParent()) {
NOTREACHED();
@@ -5176,10 +5175,10 @@
if (!source->IsCurrent())
return;
- favicon_urls_ = candidates;
+ favicon_urls_ = std::move(candidates);
for (auto& observer : observers_)
- observer.DidUpdateFaviconURL(candidates);
+ observer.DidUpdateFaviconURL(favicon_urls_);
}
void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) {
@@ -6822,7 +6821,8 @@
return last_committed_source_id_;
}
-std::vector<FaviconURL> WebContentsImpl::GetFaviconURLs() {
+const std::vector<blink::mojom::FaviconURLPtr>&
+WebContentsImpl::GetFaviconURLs() {
return favicon_urls_;
}