Move didReceiveTitle and related stuff to RenderFrame.
BUG=361761
TEST=no visible change
Review URL: https://codereview.chromium.org/274883002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269641 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index d46c0cd..af42b7b 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -460,6 +460,22 @@
const Referrer& referrer,
blink::WebNavigationPolicy policy);
+ // Update current main frame's encoding and send it to browser window.
+ // Since we want to let users see the right encoding info from menu
+ // before finishing loading, we call the UpdateEncoding in
+ // a) function:DidCommitLoadForFrame. When this function is called,
+ // that means we have got first data. In here we try to get encoding
+ // of page if it has been specified in http header.
+ // b) function:DidReceiveTitle. When this function is called,
+ // that means we have got specified title. Because in most of webpages,
+ // title tags will follow meta tags. In here we try to get encoding of
+ // page if it has been specified in meta tag.
+ // c) function:DidFinishDocumentLoadForFrame. When this function is
+ // called, that means we have got whole html page. In here we should
+ // finally get right encoding of page.
+ void UpdateEncoding(blink::WebFrame* frame,
+ const std::string& encoding_name);
+
// Dispatches the current state of selection on the webpage to the browser if
// it has changed.
// TODO(varunjain): delete this method once we figure out how to keep