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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // handler and determine whether a transfer to a different RenderFrameHost is 111 // handler and determine whether a transfer to a different RenderFrameHost is
112 // needed. 112 // needed.
113 void OnCrossSiteResponse( 113 void OnCrossSiteResponse(
114 const GlobalRequestID& global_request_id, 114 const GlobalRequestID& global_request_id,
115 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request, 115 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
116 const std::vector<GURL>& transfer_url_chain, 116 const std::vector<GURL>& transfer_url_chain,
117 const Referrer& referrer, 117 const Referrer& referrer,
118 PageTransition page_transition, 118 PageTransition page_transition,
119 bool should_replace_current_entry); 119 bool should_replace_current_entry);
120 120
121 // Called on the current RenderFrameHost when the network response is first
122 // receieved.
123 void OnDeferredAfterResponseStarted(const GlobalRequestID& global_request_id);
124
121 // Tells the renderer that this RenderFrame is being swapped out for one in a 125 // Tells the renderer that this RenderFrame is being swapped out for one in a
122 // different renderer process. It should run its unload handler, move to 126 // different renderer process. It should run its unload handler, move to
123 // a blank document and create a RenderFrameProxy to replace the RenderFrame. 127 // a blank document and create a RenderFrameProxy to replace the RenderFrame.
124 // The renderer should preserve the Proxy object until it exits, in case we 128 // The renderer should preserve the Proxy object until it exits, in case we
125 // come back. The renderer can exit if it has no other active RenderFrames, 129 // come back. The renderer can exit if it has no other active RenderFrames,
126 // but not until WasSwappedOut is called (when it is no longer visible). 130 // but not until WasSwappedOut is called (when it is no longer visible).
127 void SwapOut(RenderFrameProxyHost* proxy); 131 void SwapOut(RenderFrameProxyHost* proxy);
128 132
129 void OnSwappedOut(bool timed_out); 133 void OnSwappedOut(bool timed_out);
130 bool is_swapped_out() { return is_swapped_out_; } 134 bool is_swapped_out() { return is_swapped_out_; }
(...skipping 29 matching lines...) Expand all
160 // Notifies the RenderFrame that the JavaScript message that was shown was 164 // Notifies the RenderFrame that the JavaScript message that was shown was
161 // closed by the user. 165 // closed by the user.
162 void JavaScriptDialogClosed(IPC::Message* reply_msg, 166 void JavaScriptDialogClosed(IPC::Message* reply_msg,
163 bool success, 167 bool success,
164 const base::string16& user_input, 168 const base::string16& user_input,
165 bool dialog_was_suppressed); 169 bool dialog_was_suppressed);
166 170
167 // Called when an HTML5 notification is closed. 171 // Called when an HTML5 notification is closed.
168 void NotificationClosed(int notification_id); 172 void NotificationClosed(int notification_id);
169 173
174 // Sets whether there is an outstanding transition request. This is called at
175 // the start of a provisional load for the main frame, and cleared when we
176 // hear the response or commit.
177 void SetHasPendingTransitionRequest(bool has_pending_request);
178
170 protected: 179 protected:
171 friend class RenderFrameHostFactory; 180 friend class RenderFrameHostFactory;
172 181
173 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 182 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
174 // should be the abstraction needed here, but we need RenderViewHost to pass 183 // should be the abstraction needed here, but we need RenderViewHost to pass
175 // into WebContentsObserver::FrameDetached for now. 184 // into WebContentsObserver::FrameDetached for now.
176 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 185 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
177 RenderFrameHostDelegate* delegate, 186 RenderFrameHostDelegate* delegate,
178 FrameTree* frame_tree, 187 FrameTree* frame_tree,
179 FrameTreeNode* frame_tree_node, 188 FrameTreeNode* frame_tree_node,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 base::TimeTicks send_before_unload_start_time_; 303 base::TimeTicks send_before_unload_start_time_;
295 304
296 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 305 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
297 306
298 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 307 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
299 }; 308 };
300 309
301 } // namespace content 310 } // namespace content
302 311
303 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 312 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_delegate.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698