| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/browser/renderer_host/render_view_host_delegate.h" | 12 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 13 #include "content/browser/site_instance_impl.h" | 13 #include "content/browser/site_instance_impl.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
| 18 | 18 |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 class InterstitialPageImpl; | 22 class InterstitialPageImpl; |
| 23 class FrameTreeNode; | |
| 24 class NavigationControllerImpl; | 23 class NavigationControllerImpl; |
| 25 class NavigationEntry; | 24 class NavigationEntry; |
| 26 class NavigationEntryImpl; | 25 class NavigationEntryImpl; |
| 27 class RenderFrameHostDelegate; | 26 class RenderFrameHostDelegate; |
| 28 class RenderFrameHostImpl; | |
| 29 class RenderFrameHostManagerTest; | 27 class RenderFrameHostManagerTest; |
| 30 class RenderViewHost; | 28 class RenderViewHost; |
| 31 class RenderViewHostImpl; | 29 class RenderViewHostImpl; |
| 32 class RenderWidgetHostDelegate; | 30 class RenderWidgetHostDelegate; |
| 33 class RenderWidgetHostView; | 31 class RenderWidgetHostView; |
| 34 class TestWebContents; | 32 class TestWebContents; |
| 35 class WebUIImpl; | 33 class WebUIImpl; |
| 36 | 34 |
| 37 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state | 35 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state |
| 38 // machine to make cross-process navigations in a frame possible. | 36 // machine to make cross-process navigations in a frame possible. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 virtual ~Delegate() {} | 107 virtual ~Delegate() {} |
| 110 }; | 108 }; |
| 111 | 109 |
| 112 // All three delegate pointers must be non-NULL and are not owned by this | 110 // All three delegate pointers must be non-NULL and are not owned by this |
| 113 // class. They must outlive this class. The RenderViewHostDelegate and | 111 // class. They must outlive this class. The RenderViewHostDelegate and |
| 114 // RenderWidgetHostDelegate are what will be installed into all | 112 // RenderWidgetHostDelegate are what will be installed into all |
| 115 // RenderViewHosts that are created. | 113 // RenderViewHosts that are created. |
| 116 // | 114 // |
| 117 // You must call Init() before using this class. | 115 // You must call Init() before using this class. |
| 118 RenderFrameHostManager( | 116 RenderFrameHostManager( |
| 119 FrameTreeNode* frame_tree_node, | |
| 120 RenderFrameHostDelegate* render_frame_delegate, | 117 RenderFrameHostDelegate* render_frame_delegate, |
| 121 RenderViewHostDelegate* render_view_delegate, | 118 RenderViewHostDelegate* render_view_delegate, |
| 122 RenderWidgetHostDelegate* render_widget_delegate, | 119 RenderWidgetHostDelegate* render_widget_delegate, |
| 123 Delegate* delegate); | 120 Delegate* delegate); |
| 124 virtual ~RenderFrameHostManager(); | 121 virtual ~RenderFrameHostManager(); |
| 125 | 122 |
| 126 // For arguments, see WebContentsImpl constructor. | 123 // For arguments, see WebContentsImpl constructor. |
| 127 void Init(BrowserContext* browser_context, | 124 void Init(BrowserContext* browser_context, |
| 128 SiteInstance* site_instance, | 125 SiteInstance* site_instance, |
| 129 int view_routing_id, | 126 int routing_id, |
| 130 int frame_routing_id); | 127 int main_frame_routing_id); |
| 131 | 128 |
| 132 // Returns the currently active RenderFrameHost. | 129 // Returns the currently active RenderViewHost. |
| 133 // | 130 // |
| 134 // This will be non-NULL between Init() and Shutdown(). You may want to NULL | 131 // This will be non-NULL between Init() and Shutdown(). You may want to NULL |
| 135 // check it in many cases, however. Windows can send us messages during the | 132 // check it in many cases, however. Windows can send us messages during the |
| 136 // destruction process after it has been shut down. | 133 // destruction process after it has been shut down. |
| 137 RenderFrameHostImpl* current_frame_host() const { | |
| 138 return render_frame_host_; | |
| 139 } | |
| 140 | |
| 141 // TODO(creis): Remove this when we no longer use RVH for navigation. | |
| 142 RenderViewHostImpl* current_host() const; | 134 RenderViewHostImpl* current_host() const; |
| 143 | 135 |
| 144 // Returns the view associated with the current RenderViewHost, or NULL if | 136 // Returns the view associated with the current RenderViewHost, or NULL if |
| 145 // there is no current one. | 137 // there is no current one. |
| 146 RenderWidgetHostView* GetRenderWidgetHostView() const; | 138 RenderWidgetHostView* GetRenderWidgetHostView() const; |
| 147 | 139 |
| 148 // Returns the pending RenderFrameHost, or NULL if there is no pending one. | 140 // Returns the pending render view host, or NULL if there is no pending one. |
| 149 RenderFrameHostImpl* pending_frame_host() const { | |
| 150 return pending_render_frame_host_; | |
| 151 } | |
| 152 | |
| 153 // TODO(creis): Remove this when we no longer use RVH for navigation. | |
| 154 RenderViewHostImpl* pending_render_view_host() const; | 141 RenderViewHostImpl* pending_render_view_host() const; |
| 155 | 142 |
| 156 // Returns the current committed Web UI or NULL if none applies. | 143 // Returns the current committed Web UI or NULL if none applies. |
| 157 WebUIImpl* web_ui() const { return web_ui_.get(); } | 144 WebUIImpl* web_ui() const { return web_ui_.get(); } |
| 158 | 145 |
| 159 // Returns the Web UI for the pending navigation, or NULL of none applies. | 146 // Returns the Web UI for the pending navigation, or NULL of none applies. |
| 160 WebUIImpl* pending_web_ui() const { | 147 WebUIImpl* pending_web_ui() const { |
| 161 return pending_web_ui_.get() ? pending_web_ui_.get() : | 148 return pending_web_ui_.get() ? pending_web_ui_.get() : |
| 162 pending_and_current_web_ui_.get(); | 149 pending_and_current_web_ui_.get(); |
| 163 } | 150 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 189 // The RenderViewHost has been swapped out, so we should resume the pending | 176 // The RenderViewHost has been swapped out, so we should resume the pending |
| 190 // network response and allow the pending RenderViewHost to commit. | 177 // network response and allow the pending RenderViewHost to commit. |
| 191 void SwappedOut(RenderViewHost* render_view_host); | 178 void SwappedOut(RenderViewHost* render_view_host); |
| 192 | 179 |
| 193 // Called when a renderer's main frame navigates. | 180 // Called when a renderer's main frame navigates. |
| 194 void DidNavigateMainFrame(RenderViewHost* render_view_host); | 181 void DidNavigateMainFrame(RenderViewHost* render_view_host); |
| 195 | 182 |
| 196 // Called when a renderer sets its opener to null. | 183 // Called when a renderer sets its opener to null. |
| 197 void DidDisownOpener(RenderViewHost* render_view_host); | 184 void DidDisownOpener(RenderViewHost* render_view_host); |
| 198 | 185 |
| 199 // Helper method to create and initialize a RenderFrameHost. If |swapped_out| | 186 // Helper method to create a RenderViewHost. If |swapped_out| is true, it |
| 200 // is true, it will be initially placed on the swapped out hosts list. | 187 // will be initially placed on the swapped out hosts list. Otherwise, it |
| 201 // Otherwise, it will be used for a pending cross-site navigation. | 188 // will be used for a pending cross-site navigation. |
| 202 int CreateRenderFrame(SiteInstance* instance, | 189 int CreateRenderView(SiteInstance* instance, |
| 203 int opener_route_id, | 190 int opener_route_id, |
| 204 bool swapped_out, | 191 bool swapped_out, |
| 205 bool hidden); | 192 bool hidden); |
| 206 | 193 |
| 207 // Called when a provisional load on the given renderer is aborted. | 194 // Called when a provisional load on the given renderer is aborted. |
| 208 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); | 195 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); |
| 209 | 196 |
| 210 // Sets the passed passed interstitial as the currently showing interstitial. | 197 // Sets the passed passed interstitial as the currently showing interstitial. |
| 211 // |interstitial_page| should be non NULL (use the remove_interstitial_page | 198 // |interstitial_page| should be non NULL (use the remove_interstitial_page |
| 212 // method to unset the interstitial) and no interstitial page should be set | 199 // method to unset the interstitial) and no interstitial page should be set |
| 213 // when there is already a non NULL interstitial page set. | 200 // when there is already a non NULL interstitial page set. |
| 214 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { | 201 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { |
| 215 DCHECK(!interstitial_page_ && interstitial_page); | 202 DCHECK(!interstitial_page_ && interstitial_page); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 242 bool should_replace_current_entry) OVERRIDE; | 229 bool should_replace_current_entry) OVERRIDE; |
| 243 | 230 |
| 244 // NotificationObserver implementation. | 231 // NotificationObserver implementation. |
| 245 virtual void Observe(int type, | 232 virtual void Observe(int type, |
| 246 const NotificationSource& source, | 233 const NotificationSource& source, |
| 247 const NotificationDetails& details) OVERRIDE; | 234 const NotificationDetails& details) OVERRIDE; |
| 248 | 235 |
| 249 // Called when a RenderViewHost is about to be deleted. | 236 // Called when a RenderViewHost is about to be deleted. |
| 250 void RenderViewDeleted(RenderViewHost* rvh); | 237 void RenderViewDeleted(RenderViewHost* rvh); |
| 251 | 238 |
| 252 // Returns whether the given RenderFrameHost (or its associated | 239 // Returns whether the given RenderViewHost is on the list of swapped out |
| 253 // RenderViewHost) is on the list of swapped out RenderFrameHosts. | 240 // RenderViewHosts. |
| 254 bool IsRVHOnSwappedOutList(RenderViewHostImpl* rvh) const; | 241 bool IsOnSwappedOutList(RenderViewHost* rvh) const; |
| 255 bool IsOnSwappedOutList(RenderFrameHostImpl* rfh) const; | |
| 256 | 242 |
| 257 // Returns the swapped out RenderViewHost or RenderFrameHost for the given | 243 // Returns the swapped out RenderViewHost for the given SiteInstance, if any. |
| 258 // SiteInstance, if any. | 244 RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance); |
| 259 RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance) const; | |
| 260 RenderFrameHostImpl* GetSwappedOutRenderFrameHost( | |
| 261 SiteInstance* instance) const; | |
| 262 | 245 |
| 263 // Runs the unload handler in the current page, when we know that a pending | 246 // Runs the unload handler in the current page, when we know that a pending |
| 264 // cross-process navigation is going to commit. We may initiate a transfer | 247 // cross-process navigation is going to commit. We may initiate a transfer |
| 265 // to a new process after this completes or times out. | 248 // to a new process after this completes or times out. |
| 266 void SwapOutOldPage(); | 249 void SwapOutOldPage(); |
| 267 | 250 |
| 268 private: | 251 private: |
| 269 friend class RenderFrameHostManagerTest; | 252 friend class RenderFrameHostManagerTest; |
| 270 friend class TestWebContents; | 253 friend class TestWebContents; |
| 271 | 254 |
| 272 // Tracks information about a navigation while a cross-process transition is | 255 // Tracks information about a navigation while a cross-process transition is |
| 273 // in progress, in case we need to transfer it to a new RenderFrameHost. | 256 // in progress, in case we need to transfer it to a new RenderViewHost. |
| 274 struct PendingNavigationParams { | 257 struct PendingNavigationParams { |
| 275 PendingNavigationParams(); | 258 PendingNavigationParams(); |
| 276 PendingNavigationParams(const GlobalRequestID& global_request_id, | 259 PendingNavigationParams(const GlobalRequestID& global_request_id, |
| 277 bool is_transfer, | 260 bool is_transfer, |
| 278 const std::vector<GURL>& transfer_url, | 261 const std::vector<GURL>& transfer_url, |
| 279 Referrer referrer, | 262 Referrer referrer, |
| 280 PageTransition page_transition, | 263 PageTransition page_transition, |
| 281 int64 frame_id, | 264 int64 frame_id, |
| 282 bool should_replace_current_entry); | 265 bool should_replace_current_entry); |
| 283 ~PendingNavigationParams(); | 266 ~PendingNavigationParams(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 305 PageTransition page_transition; | 288 PageTransition page_transition; |
| 306 | 289 |
| 307 // If |is_transfer|, this is the frame ID to use in RequestTransferURL. | 290 // If |is_transfer|, this is the frame ID to use in RequestTransferURL. |
| 308 int64 frame_id; | 291 int64 frame_id; |
| 309 | 292 |
| 310 // If |is_transfer|, this is whether the navigation should replace the | 293 // If |is_transfer|, this is whether the navigation should replace the |
| 311 // current history entry. | 294 // current history entry. |
| 312 bool should_replace_current_entry; | 295 bool should_replace_current_entry; |
| 313 }; | 296 }; |
| 314 | 297 |
| 315 // Used with FrameTree::ForEach to erase inactive RenderFrameHosts from a | |
| 316 // FrameTreeNode's RenderFrameHostManager. | |
| 317 static bool ClearSwappedOutRFHsInSiteInstance(int32 site_instance_id, | |
| 318 FrameTreeNode* node); | |
| 319 | |
| 320 // Returns whether this tab should transition to a new renderer for | 298 // Returns whether this tab should transition to a new renderer for |
| 321 // cross-site URLs. Enabled unless we see the --process-per-tab command line | 299 // cross-site URLs. Enabled unless we see the --process-per-tab command line |
| 322 // switch. Can be overridden in unit tests. | 300 // switch. Can be overridden in unit tests. |
| 323 bool ShouldTransitionCrossSite(); | 301 bool ShouldTransitionCrossSite(); |
| 324 | 302 |
| 325 // Returns true if for the navigation from |current_entry| to |new_entry|, | 303 // Returns true if for the navigation from |current_entry| to |new_entry|, |
| 326 // a new SiteInstance and BrowsingInstance should be created (even if we are | 304 // a new SiteInstance and BrowsingInstance should be created (even if we are |
| 327 // in a process model that doesn't usually swap). This forces a process swap | 305 // in a process model that doesn't usually swap). This forces a process swap |
| 328 // and severs script connections with existing tabs. Cases where this can | 306 // and severs script connections with existing tabs. Cases where this can |
| 329 // happen include transitions between WebUI and regular web pages. | 307 // happen include transitions between WebUI and regular web pages. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 340 | 318 |
| 341 // Returns an appropriate SiteInstance object for the given NavigationEntry, | 319 // Returns an appropriate SiteInstance object for the given NavigationEntry, |
| 342 // possibly reusing the current SiteInstance. If --process-per-tab is used, | 320 // possibly reusing the current SiteInstance. If --process-per-tab is used, |
| 343 // this is only called when ShouldSwapBrowsingInstancesForNavigation returns | 321 // this is only called when ShouldSwapBrowsingInstancesForNavigation returns |
| 344 // true. | 322 // true. |
| 345 SiteInstance* GetSiteInstanceForEntry( | 323 SiteInstance* GetSiteInstanceForEntry( |
| 346 const NavigationEntryImpl& entry, | 324 const NavigationEntryImpl& entry, |
| 347 SiteInstance* current_instance, | 325 SiteInstance* current_instance, |
| 348 bool force_browsing_instance_swap); | 326 bool force_browsing_instance_swap); |
| 349 | 327 |
| 350 // Creates a RenderFrameHost and corresponding RenderViewHost if necessary. | 328 // Sets up the necessary state for a new RenderViewHost with the given opener. |
| 351 RenderFrameHostImpl* CreateRenderFrameHost(SiteInstance* instance, | |
| 352 int view_routing_id, | |
| 353 int frame_routing_id, | |
| 354 bool swapped_out, | |
| 355 bool hidden); | |
| 356 | |
| 357 // Sets up the necessary state for a new RenderViewHost with the given opener, | |
| 358 // if necessary. Returns early if the RenderViewHost has already been | |
| 359 // initialized for another RenderFrameHost. | |
| 360 // TODO(creis): opener_route_id is currently for the RenderViewHost but should | |
| 361 // be for the RenderFrame, since frames can have openers. | |
| 362 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); | 329 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); |
| 363 | 330 |
| 364 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this | 331 // Sets the pending RenderViewHost/WebUI to be the active one. Note that this |
| 365 // doesn't require the pending render_frame_host_ pointer to be non-NULL, | 332 // doesn't require the pending render_view_host_ pointer to be non-NULL, since |
| 366 // since there could be Web UI switching as well. Call this for every commit. | 333 // there could be Web UI switching as well. Call this for every commit. |
| 367 void CommitPending(); | 334 void CommitPending(); |
| 368 | 335 |
| 369 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown | 336 // Shutdown all RenderViewHosts in a SiteInstance. This is called |
| 370 // frames when all the frames in a SiteInstance are confirmed to be swapped | 337 // to shutdown views when all the views in a SiteInstance are |
| 371 // out. | 338 // confirmed to be swapped out. |
| 372 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id); | 339 void ShutdownRenderViewHostsInSiteInstance(int32 site_instance_id); |
| 373 | 340 |
| 374 // Helper method to terminate the pending RenderViewHost. | 341 // Helper method to terminate the pending RenderViewHost. |
| 375 void CancelPending(); | 342 void CancelPending(); |
| 376 | 343 |
| 377 RenderFrameHostImpl* UpdateRendererStateForNavigate( | 344 RenderViewHostImpl* UpdateRendererStateForNavigate( |
| 378 const NavigationEntryImpl& entry); | 345 const NavigationEntryImpl& entry); |
| 379 | 346 |
| 380 // Called when a renderer process is starting to close. We should not | 347 // Called when a renderer process is starting to close. We should not |
| 381 // schedule new navigations in its swapped out RenderFrameHosts after this. | 348 // schedule new navigations in its swapped out RenderViewHosts after this. |
| 382 void RendererProcessClosing(RenderProcessHost* render_process_host); | 349 void RendererProcessClosing(RenderProcessHost* render_process_host); |
| 383 | 350 |
| 384 // For use in creating RenderFrameHosts. | |
| 385 FrameTreeNode* frame_tree_node_; | |
| 386 | |
| 387 // Our delegate, not owned by us. Guaranteed non-NULL. | 351 // Our delegate, not owned by us. Guaranteed non-NULL. |
| 388 Delegate* delegate_; | 352 Delegate* delegate_; |
| 389 | 353 |
| 390 // Whether a navigation requiring different RenderFrameHosts is pending. This | 354 // Whether a navigation requiring different RenderView's is pending. This is |
| 391 // is either for cross-site requests or when required for the process type | 355 // either cross-site request is (in the new process model), or when required |
| 392 // (like WebUI). | 356 // for the view type (like view source versus not). |
| 393 bool cross_navigation_pending_; | 357 bool cross_navigation_pending_; |
| 394 | 358 |
| 395 // Implemented by the owner of this class. These delegates are installed into | 359 // Implemented by the owner of this class, these delegates are installed into |
| 396 // all the RenderFrameHosts that we create. | 360 // all the RenderViewHosts that we create. |
| 397 RenderFrameHostDelegate* render_frame_delegate_; | 361 RenderFrameHostDelegate* render_frame_delegate_; |
| 398 RenderViewHostDelegate* render_view_delegate_; | 362 RenderViewHostDelegate* render_view_delegate_; |
| 399 RenderWidgetHostDelegate* render_widget_delegate_; | 363 RenderWidgetHostDelegate* render_widget_delegate_; |
| 400 | 364 |
| 401 // Our RenderFrameHost and its associated Web UI (if any, will be NULL for | 365 // Our RenderView host and its associated Web UI (if any, will be NULL for |
| 402 // non-WebUI pages). This object is responsible for all communication with | 366 // non-DOM-UI pages). This object is responsible for all communication with |
| 403 // a child RenderFrame instance. | 367 // a child RenderView instance. |
| 404 // For now, RenderFrameHost keeps a RenderViewHost in its SiteInstance alive. | 368 RenderViewHostImpl* render_view_host_; |
| 405 // Eventually, RenderViewHost will be replaced with a page context. | |
| 406 RenderFrameHostImpl* render_frame_host_; | |
| 407 scoped_ptr<WebUIImpl> web_ui_; | 369 scoped_ptr<WebUIImpl> web_ui_; |
| 408 | 370 |
| 409 // A RenderFrameHost used to load a cross-site page. This remains hidden | 371 // A RenderViewHost used to load a cross-site page. This remains hidden |
| 410 // while a cross-site request is pending until it calls DidNavigate. It may | 372 // while a cross-site request is pending until it calls DidNavigate. It may |
| 411 // have an associated Web UI, in which case the Web UI pointer will be non- | 373 // have an associated Web UI, in which case the Web UI pointer will be non- |
| 412 // NULL. | 374 // NULL. |
| 413 // | 375 // |
| 414 // The |pending_web_ui_| may be non-NULL even when the | 376 // The |pending_web_ui_| may be non-NULL even when the |
| 415 // |pending_render_frame_host_| is NULL. This will happen when we're | 377 // |pending_render_view_host_| is NULL. This will happen when we're |
| 416 // transitioning between two Web UI pages: the RFH won't be swapped, so the | 378 // transitioning between two Web UI pages: the RVH won't be swapped, so the |
| 417 // pending pointer will be unused, but there will be a pending Web UI | 379 // pending pointer will be unused, but there will be a pending Web UI |
| 418 // associated with the navigation. | 380 // associated with the navigation. |
| 419 RenderFrameHostImpl* pending_render_frame_host_; | 381 RenderViewHostImpl* pending_render_view_host_; |
| 420 | 382 |
| 421 // Tracks information about any current pending cross-process navigation. | 383 // Tracks information about any current pending cross-process navigation. |
| 422 scoped_ptr<PendingNavigationParams> pending_nav_params_; | 384 scoped_ptr<PendingNavigationParams> pending_nav_params_; |
| 423 | 385 |
| 424 // If either of these is non-NULL, the pending navigation is to a chrome: | 386 // If either of these is non-NULL, the pending navigation is to a chrome: |
| 425 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is | 387 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is |
| 426 // used for when they reference the same object. If either is non-NULL, the | 388 // used for when they reference the same object. If either is non-NULL, the |
| 427 // other should be NULL. | 389 // other should be NULL. |
| 428 scoped_ptr<WebUIImpl> pending_web_ui_; | 390 scoped_ptr<WebUIImpl> pending_web_ui_; |
| 429 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_; | 391 base::WeakPtr<WebUIImpl> pending_and_current_web_ui_; |
| 430 | 392 |
| 431 // A map of site instance ID to swapped out RenderFrameHosts. This may | 393 // A map of site instance ID to swapped out RenderViewHosts. This may include |
| 432 // include pending_render_frame_host_ for navigations to existing entries. | 394 // pending_render_view_host_ for navigations to existing entries. |
| 433 typedef base::hash_map<int32, RenderFrameHostImpl*> RenderFrameHostMap; | 395 typedef base::hash_map<int32, RenderViewHostImpl*> RenderViewHostMap; |
| 434 RenderFrameHostMap swapped_out_hosts_; | 396 RenderViewHostMap swapped_out_hosts_; |
| 435 | 397 |
| 436 // The intersitial page currently shown if any, not own by this class | 398 // The intersitial page currently shown if any, not own by this class |
| 437 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 399 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
| 438 InterstitialPageImpl* interstitial_page_; | 400 InterstitialPageImpl* interstitial_page_; |
| 439 | 401 |
| 440 NotificationRegistrar registrar_; | 402 NotificationRegistrar registrar_; |
| 441 | 403 |
| 442 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 404 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
| 443 }; | 405 }; |
| 444 | 406 |
| 445 } // namespace content | 407 } // namespace content |
| 446 | 408 |
| 447 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 409 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| OLD | NEW |