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

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 // Received a response from CrossSiteResourceHandler. If the navigation
222 // specifies a transition, this is called and the navigation will not resume
223 // 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
221 // The RenderFrameHost has been swapped out, so we should resume the pending 231 // The RenderFrameHost has been swapped out, so we should resume the pending
222 // network response and allow the pending RenderFrameHost to commit. 232 // network response and allow the pending RenderFrameHost to commit.
223 void SwappedOut(RenderFrameHostImpl* render_frame_host); 233 void SwappedOut(RenderFrameHostImpl* render_frame_host);
224 234
225 // Called when a renderer's frame navigates. 235 // Called when a renderer's frame navigates.
226 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); 236 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host);
227 237
228 // Called when a renderer sets its opener to null. 238 // Called when a renderer sets its opener to null.
229 void DidDisownOpener(RenderViewHost* render_view_host); 239 void DidDisownOpener(RenderViewHost* render_view_host);
230 240
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // The |pending_web_ui_| may be non-NULL even when the 452 // The |pending_web_ui_| may be non-NULL even when the
443 // |pending_render_frame_host_| is NULL. This will happen when we're 453 // |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 454 // 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 455 // pending pointer will be unused, but there will be a pending Web UI
446 // associated with the navigation. 456 // associated with the navigation.
447 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_; 457 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_;
448 458
449 // Tracks information about any current pending cross-process navigation. 459 // Tracks information about any current pending cross-process navigation.
450 scoped_ptr<PendingNavigationParams> pending_nav_params_; 460 scoped_ptr<PendingNavigationParams> pending_nav_params_;
451 461
462 // Tracks information about any navigation paused after receiving response
463 // headers.
464 scoped_ptr<GlobalRequestID> response_started_id_;
465
452 // If either of these is non-NULL, the pending navigation is to a chrome: 466 // 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 467 // 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 468 // used for when they reference the same object. If either is non-NULL, the
455 // other should be NULL. 469 // other should be NULL.
456 scoped_ptr<WebUIImpl> pending_web_ui_; 470 scoped_ptr<WebUIImpl> pending_web_ui_;
457 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_; 471 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_;
458 472
459 // A map of site instance ID to RenderFrameProxyHosts. 473 // A map of site instance ID to RenderFrameProxyHosts.
460 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap; 474 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap;
461 RenderFrameProxyHostMap proxy_hosts_; 475 RenderFrameProxyHostMap proxy_hosts_;
(...skipping 17 matching lines...) Expand all
479 CrossProcessFrameConnector* cross_process_frame_connector_; 493 CrossProcessFrameConnector* cross_process_frame_connector_;
480 494
481 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 495 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
482 496
483 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 497 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
484 }; 498 };
485 499
486 } // namespace content 500 } // namespace content
487 501
488 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 502 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698