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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 274883002: Move didReceiveTitle and related stuff to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 // Old WebFrameClient implementations ---------------------------------------- 651 // Old WebFrameClient implementations ----------------------------------------
652 652
653 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the 653 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the
654 // WebFrameClient. However, many implementations of WebFrameClient methods 654 // WebFrameClient. However, many implementations of WebFrameClient methods
655 // still live here and are called from RenderFrameImpl. These implementations 655 // still live here and are called from RenderFrameImpl. These implementations
656 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. 656 // are to be moved to RenderFrameImpl <http://crbug.com/361761>.
657 657
658 void didCreateDataSource(blink::WebLocalFrame* frame, 658 void didCreateDataSource(blink::WebLocalFrame* frame,
659 blink::WebDataSource* datasource); 659 blink::WebDataSource* datasource);
660 void didClearWindowObject(blink::WebLocalFrame* frame); 660 void didClearWindowObject(blink::WebLocalFrame* frame);
661 void didReceiveTitle(blink::WebLocalFrame* frame,
662 const blink::WebString& title,
663 blink::WebTextDirection direction);
664 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); 661 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type);
665 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); 662 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame);
666 void didChangeScrollOffset(blink::WebLocalFrame* frame); 663 void didChangeScrollOffset(blink::WebLocalFrame* frame);
667 664
668 static bool IsReload(const FrameMsg_Navigate_Params& params); 665 static bool IsReload(const FrameMsg_Navigate_Params& params);
669 666
670 static Referrer GetReferrerFromRequest( 667 static Referrer GetReferrerFromRequest(
671 blink::WebFrame* frame, 668 blink::WebFrame* frame,
672 const blink::WebURLRequest& request); 669 const blink::WebURLRequest& request);
673 670
674 static WindowOpenDisposition NavigationPolicyToDisposition( 671 static WindowOpenDisposition NavigationPolicyToDisposition(
675 blink::WebNavigationPolicy policy); 672 blink::WebNavigationPolicy policy);
676 673
677 void UpdateTitle(blink::WebFrame* frame, const base::string16& title,
678 blink::WebTextDirection title_direction);
679 void UpdateSessionHistory(blink::WebFrame* frame); 674 void UpdateSessionHistory(blink::WebFrame* frame);
680 void SendUpdateState(HistoryEntry* entry); 675 void SendUpdateState(HistoryEntry* entry);
681 676
682 // Update current main frame's encoding and send it to browser window.
683 // Since we want to let users see the right encoding info from menu
684 // before finishing loading, we call the UpdateEncoding in
685 // a) function:DidCommitLoadForFrame. When this function is called,
686 // that means we have got first data. In here we try to get encoding
687 // of page if it has been specified in http header.
688 // b) function:DidReceiveTitle. When this function is called,
689 // that means we have got specified title. Because in most of webpages,
690 // title tags will follow meta tags. In here we try to get encoding of
691 // page if it has been specified in meta tag.
692 // c) function:DidFinishDocumentLoadForFrame. When this function is
693 // called, that means we have got whole html page. In here we should
694 // finally get right encoding of page.
695 void UpdateEncoding(blink::WebFrame* frame,
696 const std::string& encoding_name);
697
698 // Sends a message and runs a nested message loop. 677 // Sends a message and runs a nested message loop.
699 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); 678 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message);
700 679
701 // Called when the "pinned to left/right edge" state needs to be updated. 680 // Called when the "pinned to left/right edge" state needs to be updated.
702 void UpdateScrollState(blink::WebFrame* frame); 681 void UpdateScrollState(blink::WebFrame* frame);
703 682
704 // IPC message handlers ------------------------------------------------------ 683 // IPC message handlers ------------------------------------------------------
705 // 684 //
706 // The documentation for these functions should be in 685 // The documentation for these functions should be in
707 // content/common/*_messages.h for the message that the function is handling. 686 // content/common/*_messages.h for the message that the function is handling.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 // TODO(japhet): This state will need to move to the browser process 990 // TODO(japhet): This state will need to move to the browser process
1012 // (probably WebContents) for site isolation. 991 // (probably WebContents) for site isolation.
1013 int frames_in_progress_; 992 int frames_in_progress_;
1014 993
1015 // The list of page IDs for each history item this RenderView knows about. 994 // The list of page IDs for each history item this RenderView knows about.
1016 // Some entries may be -1 if they were rendered by other processes or were 995 // Some entries may be -1 if they were rendered by other processes or were
1017 // restored from a previous session. This lets us detect attempts to 996 // restored from a previous session. This lets us detect attempts to
1018 // navigate to stale entries that have been cropped from our history. 997 // navigate to stale entries that have been cropped from our history.
1019 std::vector<int32> history_page_ids_; 998 std::vector<int32> history_page_ids_;
1020 999
1021 // Page info -----------------------------------------------------------------
1022
1023 // The last gotten main frame's encoding.
1024 std::string last_encoding_name_;
1025
1026 // UI state ------------------------------------------------------------------ 1000 // UI state ------------------------------------------------------------------
1027 1001
1028 // The state of our target_url transmissions. When we receive a request to 1002 // The state of our target_url transmissions. When we receive a request to
1029 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK 1003 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK
1030 // comes back - if a new request comes in before the ACK, we store the new 1004 // comes back - if a new request comes in before the ACK, we store the new
1031 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an 1005 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an
1032 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and 1006 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and
1033 // revert to TARGET_INFLIGHT. 1007 // revert to TARGET_INFLIGHT.
1034 // 1008 //
1035 // We don't need a queue of URLs to send, as only the latest is useful. 1009 // We don't need a queue of URLs to send, as only the latest is useful.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 // use the Observer interface to filter IPC messages and receive frame change 1212 // use the Observer interface to filter IPC messages and receive frame change
1239 // notifications. 1213 // notifications.
1240 // --------------------------------------------------------------------------- 1214 // ---------------------------------------------------------------------------
1241 1215
1242 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1216 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1243 }; 1217 };
1244 1218
1245 } // namespace content 1219 } // namespace content
1246 1220
1247 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1221 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698