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

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: 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
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // Old WebFrameClient implementations ---------------------------------------- 647 // Old WebFrameClient implementations ----------------------------------------
648 648
649 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the 649 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the
650 // WebFrameClient. However, many implementations of WebFrameClient methods 650 // WebFrameClient. However, many implementations of WebFrameClient methods
651 // still live here and are called from RenderFrameImpl. These implementations 651 // still live here and are called from RenderFrameImpl. These implementations
652 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. 652 // are to be moved to RenderFrameImpl <http://crbug.com/361761>.
653 653
654 void didCreateDataSource(blink::WebLocalFrame* frame, 654 void didCreateDataSource(blink::WebLocalFrame* frame,
655 blink::WebDataSource* datasource); 655 blink::WebDataSource* datasource);
656 void didClearWindowObject(blink::WebLocalFrame* frame, int world_id); 656 void didClearWindowObject(blink::WebLocalFrame* frame, int world_id);
657 void didReceiveTitle(blink::WebLocalFrame* frame,
658 const blink::WebString& title,
659 blink::WebTextDirection direction);
660 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); 657 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type);
661 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); 658 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame);
662 void didChangeScrollOffset(blink::WebLocalFrame* frame); 659 void didChangeScrollOffset(blink::WebLocalFrame* frame);
663 660
664 static bool IsReload(const FrameMsg_Navigate_Params& params); 661 static bool IsReload(const FrameMsg_Navigate_Params& params);
665 662
666 static Referrer GetReferrerFromRequest( 663 static Referrer GetReferrerFromRequest(
667 blink::WebFrame* frame, 664 blink::WebFrame* frame,
668 const blink::WebURLRequest& request); 665 const blink::WebURLRequest& request);
669 666
670 static WindowOpenDisposition NavigationPolicyToDisposition( 667 static WindowOpenDisposition NavigationPolicyToDisposition(
671 blink::WebNavigationPolicy policy); 668 blink::WebNavigationPolicy policy);
672 669
673 void UpdateTitle(blink::WebFrame* frame, const base::string16& title,
674 blink::WebTextDirection title_direction);
675 void UpdateSessionHistory(blink::WebFrame* frame); 670 void UpdateSessionHistory(blink::WebFrame* frame);
676 void SendUpdateState(HistoryEntry* entry); 671 void SendUpdateState(HistoryEntry* entry);
677 672
678 // Update current main frame's encoding and send it to browser window.
679 // Since we want to let users see the right encoding info from menu
680 // before finishing loading, we call the UpdateEncoding in
681 // a) function:DidCommitLoadForFrame. When this function is called,
682 // that means we have got first data. In here we try to get encoding
683 // of page if it has been specified in http header.
684 // b) function:DidReceiveTitle. When this function is called,
685 // that means we have got specified title. Because in most of webpages,
686 // title tags will follow meta tags. In here we try to get encoding of
687 // page if it has been specified in meta tag.
688 // c) function:DidFinishDocumentLoadForFrame. When this function is
689 // called, that means we have got whole html page. In here we should
690 // finally get right encoding of page.
691 void UpdateEncoding(blink::WebFrame* frame,
692 const std::string& encoding_name);
693
694 // Sends a message and runs a nested message loop. 673 // Sends a message and runs a nested message loop.
695 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); 674 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message);
696 675
697 // Called when the "pinned to left/right edge" state needs to be updated. 676 // Called when the "pinned to left/right edge" state needs to be updated.
698 void UpdateScrollState(blink::WebFrame* frame); 677 void UpdateScrollState(blink::WebFrame* frame);
699 678
700 // IPC message handlers ------------------------------------------------------ 679 // IPC message handlers ------------------------------------------------------
701 // 680 //
702 // The documentation for these functions should be in 681 // The documentation for these functions should be in
703 // content/common/*_messages.h for the message that the function is handling. 682 // content/common/*_messages.h for the message that the function is handling.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 // TODO(japhet): This state will need to move to the browser process 986 // TODO(japhet): This state will need to move to the browser process
1008 // (probably WebContents) for site isolation. 987 // (probably WebContents) for site isolation.
1009 int frames_in_progress_; 988 int frames_in_progress_;
1010 989
1011 // The list of page IDs for each history item this RenderView knows about. 990 // The list of page IDs for each history item this RenderView knows about.
1012 // Some entries may be -1 if they were rendered by other processes or were 991 // Some entries may be -1 if they were rendered by other processes or were
1013 // restored from a previous session. This lets us detect attempts to 992 // restored from a previous session. This lets us detect attempts to
1014 // navigate to stale entries that have been cropped from our history. 993 // navigate to stale entries that have been cropped from our history.
1015 std::vector<int32> history_page_ids_; 994 std::vector<int32> history_page_ids_;
1016 995
1017 // Page info -----------------------------------------------------------------
1018
1019 // The last gotten main frame's encoding.
1020 std::string last_encoding_name_;
1021
1022 // UI state ------------------------------------------------------------------ 996 // UI state ------------------------------------------------------------------
1023 997
1024 // The state of our target_url transmissions. When we receive a request to 998 // The state of our target_url transmissions. When we receive a request to
1025 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK 999 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK
1026 // comes back - if a new request comes in before the ACK, we store the new 1000 // comes back - if a new request comes in before the ACK, we store the new
1027 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an 1001 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an
1028 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and 1002 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and
1029 // revert to TARGET_INFLIGHT. 1003 // revert to TARGET_INFLIGHT.
1030 // 1004 //
1031 // We don't need a queue of URLs to send, as only the latest is useful. 1005 // 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
1234 // use the Observer interface to filter IPC messages and receive frame change 1208 // use the Observer interface to filter IPC messages and receive frame change
1235 // notifications. 1209 // notifications.
1236 // --------------------------------------------------------------------------- 1210 // ---------------------------------------------------------------------------
1237 1211
1238 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1212 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1239 }; 1213 };
1240 1214
1241 } // namespace content 1215 } // namespace content
1242 1216
1243 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1217 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698