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

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

Issue 378743002: Navigation transitions: Place transition page in same process as destination page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 const std::vector<GURL>& transfer_url_chain, 220 const std::vector<GURL>& transfer_url_chain,
221 const Referrer& referrer, 221 const Referrer& referrer,
222 PageTransition page_transition, 222 PageTransition page_transition,
223 bool should_replace_current_entry); 223 bool should_replace_current_entry);
224 224
225 // Received a response from CrossSiteResourceHandler. If the navigation 225 // Received a response from CrossSiteResourceHandler. If the navigation
226 // specifies a transition, this is called and the navigation will not resume 226 // specifies a transition, this is called and the navigation will not resume
227 // until ResumeResponseDeferredAtStart. 227 // until ResumeResponseDeferredAtStart.
228 void OnDeferredAfterResponseStarted( 228 void OnDeferredAfterResponseStarted(
229 const GlobalRequestID& global_request_id, 229 const GlobalRequestID& global_request_id,
230 RenderFrameHostImpl* pending_render_frame_host); 230 RenderFrameHostImpl* pending_render_frame_host,
231 const GURL& transition_url);
231 232
232 // Resume navigation paused after receiving response headers. 233 // Resume navigation paused after receiving response headers.
233 void ResumeResponseDeferredAtStart(); 234 void ResumeResponseDeferredAtStart();
234 235
235 // The RenderFrameHost has been swapped out, so we should resume the pending 236 // The RenderFrameHost has been swapped out, so we should resume the pending
236 // network response and allow the pending RenderFrameHost to commit. 237 // network response and allow the pending RenderFrameHost to commit.
237 void SwappedOut(RenderFrameHostImpl* render_frame_host); 238 void SwappedOut(RenderFrameHostImpl* render_frame_host);
238 239
239 // Called when a renderer's frame navigates. 240 // Called when a renderer's frame navigates.
240 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); 241 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // This is the transition type for the original navigation. 343 // This is the transition type for the original navigation.
343 PageTransition page_transition; 344 PageTransition page_transition;
344 345
345 // This is the frame routing ID to use in RequestTransferURL. 346 // This is the frame routing ID to use in RequestTransferURL.
346 int render_frame_id; 347 int render_frame_id;
347 348
348 // This is whether the navigation should replace the current history entry. 349 // This is whether the navigation should replace the current history entry.
349 bool should_replace_current_entry; 350 bool should_replace_current_entry;
350 }; 351 };
351 352
353 struct TransitionParams {
354 TransitionParams(const GlobalRequestID& global_request_id,
355 const GURL& transition_url);
356 ~TransitionParams();
357
358 // The child ID and request ID for the pending navigation. Present whether
359 // |request_transfer| is NULL or not.
360 GlobalRequestID global_request_id;
361
362 // This is the transition url used to store/lookup the current process id.
363 GURL transition_url;
364 };
365
352 // Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a 366 // Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a
353 // FrameTreeNode's RenderFrameHostManager. 367 // FrameTreeNode's RenderFrameHostManager.
354 static bool ClearProxiesInSiteInstance(int32 site_instance_id, 368 static bool ClearProxiesInSiteInstance(int32 site_instance_id,
355 FrameTreeNode* node); 369 FrameTreeNode* node);
356 370
357 // Returns whether this tab should transition to a new renderer for 371 // Returns whether this tab should transition to a new renderer for
358 // cross-site URLs. Enabled unless we see the --process-per-tab command line 372 // cross-site URLs. Enabled unless we see the --process-per-tab command line
359 // switch. Can be overridden in unit tests. 373 // switch. Can be overridden in unit tests.
360 bool ShouldTransitionCrossSite(); 374 bool ShouldTransitionCrossSite();
361 375
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 // transitioning between two Web UI pages: the RFH won't be swapped, so the 477 // transitioning between two Web UI pages: the RFH won't be swapped, so the
464 // pending pointer will be unused, but there will be a pending Web UI 478 // pending pointer will be unused, but there will be a pending Web UI
465 // associated with the navigation. 479 // associated with the navigation.
466 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_; 480 scoped_ptr<RenderFrameHostImpl> pending_render_frame_host_;
467 481
468 // Tracks information about any current pending cross-process navigation. 482 // Tracks information about any current pending cross-process navigation.
469 scoped_ptr<PendingNavigationParams> pending_nav_params_; 483 scoped_ptr<PendingNavigationParams> pending_nav_params_;
470 484
471 // Tracks information about any navigation paused after receiving response 485 // Tracks information about any navigation paused after receiving response
472 // headers. 486 // headers.
473 scoped_ptr<GlobalRequestID> response_started_id_; 487 scoped_ptr<TransitionParams> response_started_params_;
474 488
475 // If either of these is non-NULL, the pending navigation is to a chrome: 489 // If either of these is non-NULL, the pending navigation is to a chrome:
476 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is 490 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is
477 // used for when they reference the same object. If either is non-NULL, the 491 // used for when they reference the same object. If either is non-NULL, the
478 // other should be NULL. 492 // other should be NULL.
479 scoped_ptr<WebUIImpl> pending_web_ui_; 493 scoped_ptr<WebUIImpl> pending_web_ui_;
480 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_; 494 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_;
481 495
482 // A map of site instance ID to RenderFrameProxyHosts. 496 // A map of site instance ID to RenderFrameProxyHosts.
483 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap; 497 typedef base::hash_map<int32, RenderFrameProxyHost*> RenderFrameProxyHostMap;
(...skipping 11 matching lines...) Expand all
495 NotificationRegistrar registrar_; 509 NotificationRegistrar registrar_;
496 510
497 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 511 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
498 512
499 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 513 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
500 }; 514 };
501 515
502 } // namespace content 516 } // namespace content
503 517
504 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 518 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698