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

Unified Diff: content/renderer/render_frame_impl.h

Issue 274883002: Move didReceiveTitle and related stuff to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index a13caa67c460a2a52eef0c19ff28f6a98c0ddeef..d94d3f01970543dafd34625b705797ba08111014 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -460,6 +460,22 @@ class CONTENT_EXPORT RenderFrameImpl
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

Powered by Google App Engine
This is Rietveld 408576698