Index: content/browser/frame_host/render_frame_host_manager.h |
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h |
index 043b0a982d3d73542d4116bd91e45ba2648ad43b..61a6b82b41a6d3fa5cd132542be3d65d5abe0dea 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.h |
+++ b/content/browser/frame_host/render_frame_host_manager.h |
@@ -420,26 +420,32 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
const GURL& new_url) const; |
// Returns the SiteInstance to use for the navigation. |
- SiteInstance* GetSiteInstanceForNavigation( |
- const GURL& dest_url, |
- SiteInstance* dest_instance, |
- ui::PageTransition dest_transition, |
- bool dest_is_restore, |
- bool dest_is_view_source_mode); |
+ SiteInstance* GetSiteInstanceForNavigation(const GURL& dest_url, |
+ SiteInstance* source_instance, |
+ SiteInstance* dest_instance, |
+ ui::PageTransition transition, |
+ bool dest_is_restore, |
+ bool dest_is_view_source_mode); |
// Returns an appropriate SiteInstance object for the given |dest_url|, |
// possibly reusing the current SiteInstance. If --process-per-tab is used, |
// this is only called when ShouldSwapBrowsingInstancesForNavigation returns |
- // true. |dest_instance| will be used if it is not null. |
+ // true. |source_instance| is the SiteInstance of the frame that initiated the |
+ // navigation. |current_instance| is the SiteInstance of the frame that is |
+ // currently navigating. |dest_instance|, is a predetermined SiteInstance |
+ // that'll be used if not null. |
+ // For example, if you have a parent frame A, which has a child frame B, and |
+ // A is trying to change the src attribute of B, this will cause a navigation |
+ // where the source SiteInstance is A and B is the current SiteInstance. |
// This is a helper function for GetSiteInstanceForNavigation. |
- SiteInstance* GetSiteInstanceForURL( |
- const GURL& dest_url, |
- SiteInstance* dest_instance, |
- ui::PageTransition dest_transition, |
- bool dest_is_restore, |
- bool dest_is_view_source_mode, |
- SiteInstance* current_instance, |
- bool force_browsing_instance_swap); |
+ SiteInstance* GetSiteInstanceForURL(const GURL& dest_url, |
+ SiteInstance* source_instance, |
+ SiteInstance* current_instance, |
+ SiteInstance* dest_instance, |
+ ui::PageTransition transition, |
+ bool dest_is_restore, |
+ bool dest_is_view_source_mode, |
+ bool force_browsing_instance_swap); |
// Determines the appropriate url to use as the current url for SiteInstance |
// selection. |
@@ -520,11 +526,12 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
scoped_ptr<RenderFrameHostImpl> render_frame_host); |
RenderFrameHostImpl* UpdateStateForNavigate( |
- const GURL& url, |
- SiteInstance* instance, |
+ const GURL& dest_url, |
+ SiteInstance* source_instance, |
+ SiteInstance* dest_instance, |
ui::PageTransition transition, |
- bool is_restore, |
- bool is_view_source_mode, |
+ bool dest_is_restore, |
+ bool dest_is_view_source_mode, |
const GlobalRequestID& transferred_request_id, |
int bindings); |