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

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

Issue 148083013: Move browser initiated navigation from RenderViewHost to RenderFrameHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another one bites the dust. Created 6 years, 10 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_view_browsertest.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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the 68 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the
69 // root. VS warns when we inherit the WebWidgetClient method implementations 69 // root. VS warns when we inherit the WebWidgetClient method implementations
70 // from RenderWidget. It's safe to ignore that warning. 70 // from RenderWidget. It's safe to ignore that warning.
71 #pragma warning(disable: 4250) 71 #pragma warning(disable: 4250)
72 #endif 72 #endif
73 73
74 class CommandLine; 74 class CommandLine;
75 class PepperDeviceTest; 75 class PepperDeviceTest;
76 class SkBitmap; 76 class SkBitmap;
77 struct PP_NetAddress_Private; 77 struct PP_NetAddress_Private;
78 struct ViewMsg_Navigate_Params; 78 struct FrameMsg_Navigate_Params;
79 struct ViewMsg_PostMessage_Params; 79 struct ViewMsg_PostMessage_Params;
80 struct ViewMsg_StopFinding_Params; 80 struct ViewMsg_StopFinding_Params;
81 81
82 namespace ui { 82 namespace ui {
83 struct SelectedFileInfo; 83 struct SelectedFileInfo;
84 } // namespace ui 84 } // namespace ui
85 85
86 namespace blink { 86 namespace blink {
87 class WebApplicationCacheHost; 87 class WebApplicationCacheHost;
88 class WebApplicationCacheHostClient; 88 class WebApplicationCacheHostClient;
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 FRIEND_TEST_ALL_PREFIXES(SuppressErrorPageTest, DoesNotSuppress); 800 FRIEND_TEST_ALL_PREFIXES(SuppressErrorPageTest, DoesNotSuppress);
801 801
802 typedef std::map<GURL, double> HostZoomLevels; 802 typedef std::map<GURL, double> HostZoomLevels;
803 803
804 enum ErrorPageType { 804 enum ErrorPageType {
805 DNS_ERROR, 805 DNS_ERROR,
806 HTTP_404, 806 HTTP_404,
807 CONNECTION_ERROR, 807 CONNECTION_ERROR,
808 }; 808 };
809 809
810 static blink::WebReferrerPolicy GetReferrerPolicyFromRequest( 810 static bool IsReload(const FrameMsg_Navigate_Params& params);
811 blink::WebFrame* frame,
812 const blink::WebURLRequest& request);
813 811
814 static Referrer GetReferrerFromRequest( 812 static Referrer GetReferrerFromRequest(
815 blink::WebFrame* frame, 813 blink::WebFrame* frame,
816 const blink::WebURLRequest& request); 814 const blink::WebURLRequest& request);
817 815
816 static void NotifyTimezoneChange(blink::WebFrame* frame);
817
818 void UpdateTitle(blink::WebFrame* frame, const base::string16& title, 818 void UpdateTitle(blink::WebFrame* frame, const base::string16& title,
819 blink::WebTextDirection title_direction); 819 blink::WebTextDirection title_direction);
820 void UpdateSessionHistory(blink::WebFrame* frame); 820 void UpdateSessionHistory(blink::WebFrame* frame);
821 void SendUpdateState(const blink::WebHistoryItem& item); 821 void SendUpdateState(const blink::WebHistoryItem& item);
822 822
823 // Update current main frame's encoding and send it to browser window. 823 // Update current main frame's encoding and send it to browser window.
824 // Since we want to let users see the right encoding info from menu 824 // Since we want to let users see the right encoding info from menu
825 // before finishing loading, we call the UpdateEncoding in 825 // before finishing loading, we call the UpdateEncoding in
826 // a) function:DidCommitLoadForFrame. When this function is called, 826 // a) function:DidCommitLoadForFrame. When this function is called,
827 // that means we have got first data. In here we try to get encoding 827 // that means we have got first data. In here we try to get encoding
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( 920 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks(
921 const std::vector<GURL>& links, 921 const std::vector<GURL>& links,
922 const std::vector<base::FilePath>& local_paths, 922 const std::vector<base::FilePath>& local_paths,
923 const base::FilePath& local_directory_name); 923 const base::FilePath& local_directory_name);
924 void OnMediaPlayerActionAt(const gfx::Point& location, 924 void OnMediaPlayerActionAt(const gfx::Point& location,
925 const blink::WebMediaPlayerAction& action); 925 const blink::WebMediaPlayerAction& action);
926 void OnOrientationChangeEvent(int orientation); 926 void OnOrientationChangeEvent(int orientation);
927 void OnPluginActionAt(const gfx::Point& location, 927 void OnPluginActionAt(const gfx::Point& location,
928 const blink::WebPluginAction& action); 928 const blink::WebPluginAction& action);
929 void OnMoveOrResizeStarted(); 929 void OnMoveOrResizeStarted();
930 void OnNavigate(const ViewMsg_Navigate_Params& params);
931 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); 930 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params);
932 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle); 931 void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle);
933 void OnReloadFrame(); 932 void OnReloadFrame();
934 void OnResetPageEncodingToDefault(); 933 void OnResetPageEncodingToDefault();
935 void OnScriptEvalRequest(const base::string16& frame_xpath, 934 void OnScriptEvalRequest(const base::string16& frame_xpath,
936 const base::string16& jscript, 935 const base::string16& jscript,
937 int id, 936 int id,
938 bool notify_result); 937 bool notify_result);
939 void OnSetAccessibilityMode(unsigned int new_mode); 938 void OnSetAccessibilityMode(unsigned int new_mode);
940 void OnSetActive(bool active); 939 void OnSetActive(bool active);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 blink::WebFrame* GetChildFrame(const base::string16& frame_xpath) const; 1020 blink::WebFrame* GetChildFrame(const base::string16& frame_xpath) const;
1022 1021
1023 // Returns the URL being loaded by the given frame's request. 1022 // Returns the URL being loaded by the given frame's request.
1024 GURL GetLoadingUrl(blink::WebFrame* frame) const; 1023 GURL GetLoadingUrl(blink::WebFrame* frame) const;
1025 1024
1026 // Should only be called if this object wraps a PluginDocument. 1025 // Should only be called if this object wraps a PluginDocument.
1027 blink::WebPlugin* GetWebPluginFromPluginDocument(); 1026 blink::WebPlugin* GetWebPluginFromPluginDocument();
1028 1027
1029 // Returns true if the |params| navigation is to an entry that has been 1028 // Returns true if the |params| navigation is to an entry that has been
1030 // cropped due to a recent navigation the browser did not know about. 1029 // cropped due to a recent navigation the browser did not know about.
1031 bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, 1030 bool IsBackForwardToStaleEntry(const FrameMsg_Navigate_Params& params,
1032 bool is_reload); 1031 bool is_reload);
1033 1032
1033 // TODO(nasko): Remove this method when code is migrated to use
1034 // RenderFrameObserver.
1035 void OnNavigate(const FrameMsg_Navigate_Params& params);
1036
1034 // Make this RenderView show an empty, unscriptable page. 1037 // Make this RenderView show an empty, unscriptable page.
1035 void NavigateToSwappedOutURL(blink::WebFrame* frame); 1038 void NavigateToSwappedOutURL(blink::WebFrame* frame);
1036 1039
1037 // If we initiated a navigation, this function will populate |document_state| 1040 // If we initiated a navigation, this function will populate |document_state|
1038 // with the navigation information saved in OnNavigate(). 1041 // with the navigation information saved in OnNavigate().
1039 void PopulateDocumentStateFromPending(DocumentState* document_state); 1042 void PopulateDocumentStateFromPending(DocumentState* document_state);
1040 1043
1041 // Returns a new NavigationState populated with the navigation information 1044 // Returns a new NavigationState populated with the navigation information
1042 // saved in OnNavigate(). 1045 // saved in OnNavigate().
1043 NavigationState* CreateNavigationStateFromPending(); 1046 NavigationState* CreateNavigationStateFromPending();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 // because if the view grows beyond a size known to the browser, scroll bars 1158 // because if the view grows beyond a size known to the browser, scroll bars
1156 // should be drawn. 1159 // should be drawn.
1157 gfx::Size disable_scrollbars_size_limit_; 1160 gfx::Size disable_scrollbars_size_limit_;
1158 1161
1159 // Loading state ------------------------------------------------------------- 1162 // Loading state -------------------------------------------------------------
1160 1163
1161 // True if the top level frame is currently being loaded. 1164 // True if the top level frame is currently being loaded.
1162 bool is_loading_; 1165 bool is_loading_;
1163 1166
1164 // The gesture that initiated the current navigation. 1167 // The gesture that initiated the current navigation.
1168 // TODO(nasko): Move to RenderFrame, as this is per-frame state.
1165 NavigationGesture navigation_gesture_; 1169 NavigationGesture navigation_gesture_;
1166 1170
1167 // Used for popups. 1171 // Used for popups.
1168 bool opened_by_user_gesture_; 1172 bool opened_by_user_gesture_;
1169 1173
1170 // Whether this RenderView was created by a frame that was suppressing its 1174 // Whether this RenderView was created by a frame that was suppressing its
1171 // opener. If so, we may want to load pages in a separate process. See 1175 // opener. If so, we may want to load pages in a separate process. See
1172 // decidePolicyForNavigation for details. 1176 // decidePolicyForNavigation for details.
1173 bool opener_suppressed_; 1177 bool opener_suppressed_;
1174 1178
1175 // Whether we must stop creating nested message loops for modal dialogs until 1179 // Whether we must stop creating nested message loops for modal dialogs until
1176 // OnSwapOut is called. This is necessary because modal dialogs have a 1180 // OnSwapOut is called. This is necessary because modal dialogs have a
1177 // PageGroupLoadDeferrer on the stack that interferes with swapping out. 1181 // PageGroupLoadDeferrer on the stack that interferes with swapping out.
1178 bool suppress_dialogs_until_swap_out_; 1182 bool suppress_dialogs_until_swap_out_;
1179 1183
1180 // Holds state pertaining to a navigation that we initiated. This is held by 1184 // Holds state pertaining to a navigation that we initiated. This is held by
1181 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_ 1185 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_
1182 // as a temporary holder for the state until the WebDataSource corresponding 1186 // as a temporary holder for the state until the WebDataSource corresponding
1183 // to the new navigation is created. See DidCreateDataSource. 1187 // to the new navigation is created. See DidCreateDataSource.
1184 scoped_ptr<ViewMsg_Navigate_Params> pending_navigation_params_; 1188 // TODO(nasko): Move to RenderFrame, as this is per-frame state.
1189 scoped_ptr<FrameMsg_Navigate_Params> pending_navigation_params_;
1185 1190
1186 // Timer used to delay the updating of nav state (see SyncNavigationState). 1191 // Timer used to delay the updating of nav state (see SyncNavigationState).
1187 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; 1192 base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_;
1188 1193
1189 // Page IDs ------------------------------------------------------------------ 1194 // Page IDs ------------------------------------------------------------------
1190 // See documentation in RenderView. 1195 // See documentation in RenderView.
1191 int32 page_id_; 1196 int32 page_id_;
1192 1197
1193 // Indicates the ID of the last page that we sent a FrameNavigate to the 1198 // Indicates the ID of the last page that we sent a FrameNavigate to the
1194 // browser for. This is used to determine if the most recent transition 1199 // browser for. This is used to determine if the most recent transition
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 // use the Observer interface to filter IPC messages and receive frame change 1467 // use the Observer interface to filter IPC messages and receive frame change
1463 // notifications. 1468 // notifications.
1464 // --------------------------------------------------------------------------- 1469 // ---------------------------------------------------------------------------
1465 1470
1466 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1471 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1467 }; 1472 };
1468 1473
1469 } // namespace content 1474 } // namespace content
1470 1475
1471 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1476 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698