[content] Take RFH as a parameter for DidUpdateFavicon/ManifestURL

This CL changes WebContentsObserver API DidUpdateFaviconURL and
DidUpdateManifestURL to take a RenderFrameHost as a parameter.

These APIs concern only the main frame, not the whole WebContents.
Making them pass a RenderFrameHost parameter is a prerequisite or making
some class per-(main)-RenderFrameHost instead of per-WebContents, which
enables correct bfcache support and simplifies the code by removing the
need to listen to the navigation events to reset the states.

Bug: 1061899
Change-Id: I686c41b41d20cc25087a3846615ca72c51cd6b32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224745
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Commit-Queue: Yuzu Saijo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#775929}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8a77eaf..e5575bae 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1287,9 +1287,10 @@
 }
 
 void WebContentsImpl::NotifyManifestUrlChanged(
+    RenderFrameHost* rfh,
     const base::Optional<GURL>& manifest_url) {
   for (auto& observer : observers_)
-    observer.DidUpdateWebManifestURL(manifest_url);
+    observer.DidUpdateWebManifestURL(rfh, manifest_url);
 }
 
 WebUI* WebContentsImpl::GetWebUI() {
@@ -5132,7 +5133,7 @@
   favicon_urls_ = std::move(candidates);
 
   for (auto& observer : observers_)
-    observer.DidUpdateFaviconURL(favicon_urls_);
+    observer.DidUpdateFaviconURL(source, favicon_urls_);
 }
 
 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) {