| OLD | NEW |
| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 // Called when a renderer's frame navigates. | 223 // Called when a renderer's frame navigates. |
| 224 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); | 224 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); |
| 225 | 225 |
| 226 // Called when a renderer sets its opener to null. | 226 // Called when a renderer sets its opener to null. |
| 227 void DidDisownOpener(RenderViewHost* render_view_host); | 227 void DidDisownOpener(RenderViewHost* render_view_host); |
| 228 | 228 |
| 229 // Helper method to create and initialize a RenderFrameHost. If |swapped_out| | 229 // Helper method to create and initialize a RenderFrameHost. If |swapped_out| |
| 230 // is true, it will be initially placed on the swapped out hosts list. | 230 // is true, it will be initially placed on the swapped out hosts list. |
| 231 // Otherwise, it will be used for a pending cross-site navigation. | 231 // Otherwise, it will be used for a pending cross-site navigation. |
| 232 // Returns the routing id of the *view* associated with the frame. |
| 232 int CreateRenderFrame(SiteInstance* instance, | 233 int CreateRenderFrame(SiteInstance* instance, |
| 233 int opener_route_id, | 234 int opener_route_id, |
| 234 bool swapped_out, | 235 bool swapped_out, |
| 235 bool hidden); | 236 bool hidden); |
| 236 | 237 |
| 237 // Sets the passed passed interstitial as the currently showing interstitial. | 238 // Sets the passed passed interstitial as the currently showing interstitial. |
| 238 // |interstitial_page| should be non NULL (use the remove_interstitial_page | 239 // |interstitial_page| should be non NULL (use the remove_interstitial_page |
| 239 // method to unset the interstitial) and no interstitial page should be set | 240 // method to unset the interstitial) and no interstitial page should be set |
| 240 // when there is already a non NULL interstitial page set. | 241 // when there is already a non NULL interstitial page set. |
| 241 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { | 242 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 272 | 273 |
| 273 // Runs the unload handler in the current page, when we know that a pending | 274 // Runs the unload handler in the current page, when we know that a pending |
| 274 // cross-process navigation is going to commit. We may initiate a transfer | 275 // cross-process navigation is going to commit. We may initiate a transfer |
| 275 // to a new process after this completes or times out. | 276 // to a new process after this completes or times out. |
| 276 void SwapOutOldPage(); | 277 void SwapOutOldPage(); |
| 277 | 278 |
| 278 // Deletes a RenderFrameHost that was pending shutdown. | 279 // Deletes a RenderFrameHost that was pending shutdown. |
| 279 void ClearPendingShutdownRFHForSiteInstance(int32 site_instance_id, | 280 void ClearPendingShutdownRFHForSiteInstance(int32 site_instance_id, |
| 280 RenderFrameHostImpl* rfh); | 281 RenderFrameHostImpl* rfh); |
| 281 | 282 |
| 283 // Deletes any proxy hosts associated with this node. Used during destruction |
| 284 // of WebContentsImpl. |
| 285 void ResetProxyHosts(); |
| 286 |
| 282 private: | 287 private: |
| 283 friend class RenderFrameHostManagerTest; | 288 friend class RenderFrameHostManagerTest; |
| 284 friend class TestWebContents; | 289 friend class TestWebContents; |
| 285 | 290 |
| 286 // Tracks information about a navigation while a cross-process transition is | 291 // Tracks information about a navigation while a cross-process transition is |
| 287 // in progress, in case we need to transfer it to a new RenderFrameHost. | 292 // in progress, in case we need to transfer it to a new RenderFrameHost. |
| 288 // When a request is being transferred, deleting the PendingNavigationParams, | 293 // When a request is being transferred, deleting the PendingNavigationParams, |
| 289 // and thus |cross_site_transferring_request|, will cancel the request being | 294 // and thus |cross_site_transferring_request|, will cancel the request being |
| 290 // transferred, unless its ReleaseRequest method has been called. | 295 // transferred, unless its ReleaseRequest method has been called. |
| 291 struct PendingNavigationParams { | 296 struct PendingNavigationParams { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 CrossProcessFrameConnector* cross_process_frame_connector_; | 481 CrossProcessFrameConnector* cross_process_frame_connector_; |
| 477 | 482 |
| 478 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 483 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
| 479 | 484 |
| 480 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 485 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
| 481 }; | 486 }; |
| 482 | 487 |
| 483 } // namespace content | 488 } // namespace content |
| 484 | 489 |
| 485 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 490 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| OLD | NEW |