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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.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: Changes from review. 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_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // transferred between renderers. 211 // transferred between renderers.
212 void OnCrossSiteResponse( 212 void OnCrossSiteResponse(
213 RenderFrameHostImpl* pending_render_frame_host, 213 RenderFrameHostImpl* pending_render_frame_host,
214 const GlobalRequestID& global_request_id, 214 const GlobalRequestID& global_request_id,
215 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request, 215 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request,
216 const std::vector<GURL>& transfer_url_chain, 216 const std::vector<GURL>& transfer_url_chain,
217 const Referrer& referrer, 217 const Referrer& referrer,
218 PageTransition page_transition, 218 PageTransition page_transition,
219 bool should_replace_current_entry); 219 bool should_replace_current_entry);
220 220
221 // Recieved a response from cross site resource handler. If the navigation
222 // is not a navigation transition, this is not called. If this is called,
nasko 2014/06/02 21:59:33 nit: "does not require navigation transition". The
shatch 2014/06/02 23:40:40 Reworded it a bit, ptal.
223 // the navigation will not resume until ResumeResponseDeferredAtStart.
224 void OnDeferredAfterResponseStarted(
225 const GlobalRequestID& global_request_id,
226 RenderFrameHostImpl* pending_render_frame_host);
227
228 // Resume navigation paused after receiving response headers.
229 void ResumeResponseDeferredAtStart();
230
231 // Sets whether or not the navigation should pause on first response.
232 void SetHasPendingTransitionRequest(bool has_pending_transition);
233
221 // The RenderFrameHost has been swapped out, so we should resume the pending 234 // The RenderFrameHost has been swapped out, so we should resume the pending
222 // network response and allow the pending RenderFrameHost to commit. 235 // network response and allow the pending RenderFrameHost to commit.
223 void SwappedOut(RenderFrameHostImpl* render_frame_host); 236 void SwappedOut(RenderFrameHostImpl* render_frame_host);
224 237
225 // Called when a renderer's frame navigates. 238 // Called when a renderer's frame navigates.
226 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); 239 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host);
227 240
228 // Called when a renderer sets its opener to null. 241 // Called when a renderer sets its opener to null.
229 void DidDisownOpener(RenderViewHost* render_view_host); 242 void DidDisownOpener(RenderViewHost* render_view_host);
230 243
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // The |pending_web_ui_| may be non-NULL even when the 455 // The |pending_web_ui_| may be non-NULL even when the
443 // |pending_render_frame_host_| is NULL. This will happen when we're 456 // |pending_render_frame_host_| is NULL. This will happen when we're
444 // transitioning between two Web UI pages: the RFH won't be swapped, so the 457 // transitioning between two Web UI pages: the RFH won't be swapped, so the
445 // pending pointer will be unused, but there will be a pending Web UI 458 // pending pointer will be unused, but there will be a pending Web UI
446 // associated with the navigation. 459 // associated with the navigation.
447 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_; 460 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_;
448 461
449 // Tracks information about any current pending cross-process navigation. 462 // Tracks information about any current pending cross-process navigation.
450 scoped_ptr<PendingNavigationParams> pending_nav_params_; 463 scoped_ptr<PendingNavigationParams> pending_nav_params_;
451 464
465 // Tracks information about any navigation paused after receiving response
466 // headers.
467 scoped_ptr<GlobalRequestID> response_started_id_;
468
452 // If either of these is non-NULL, the pending navigation is to a chrome: 469 // If either of these is non-NULL, the pending navigation is to a chrome:
453 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is 470 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is
454 // used for when they reference the same object. If either is non-NULL, the 471 // used for when they reference the same object. If either is non-NULL, the
455 // other should be NULL. 472 // other should be NULL.
456 scoped_ptr<WebUIImpl> pending_web_ui_; 473 scoped_ptr<WebUIImpl> pending_web_ui_;
457 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_; 474 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_;
458 475
459 // A map of site instance ID to RenderFrameProxyHosts. 476 // A map of site instance ID to RenderFrameProxyHosts.
460 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap; 477 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap;
461 RenderFrameProxyHostMap proxy_hosts_; 478 RenderFrameProxyHostMap proxy_hosts_;
(...skipping 17 matching lines...) Expand all
479 CrossProcessFrameConnector* cross_process_frame_connector_; 496 CrossProcessFrameConnector* cross_process_frame_connector_;
480 497
481 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 498 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
482 499
483 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 500 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
484 }; 501 };
485 502
486 } // namespace content 503 } // namespace content
487 504
488 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 505 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698