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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
10 #include "base/basictypes.h"
11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h"
14 #include "content/browser/renderer_host/render_view_host_delegate.h"
15 #include "content/browser/site_instance_impl.h"
16 #include "content/common/content_export.h"
17 #include "content/public/browser/global_request_id.h"
18 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/common/referrer.h"
21 #include "ui/base/page_transition_types.h"
23 struct FrameMsg_Navigate_Params
;
27 class CrossProcessFrameConnector
;
28 class CrossSiteTransferringRequest
;
29 class InterstitialPageImpl
;
31 class NavigationControllerImpl
;
32 class NavigationEntry
;
33 class NavigationEntryImpl
;
34 class RenderFrameHost
;
35 class RenderFrameHostDelegate
;
36 class RenderFrameHost
;
37 class RenderFrameHostImpl
;
38 class RenderFrameHostManagerTest
;
39 class RenderFrameProxyHost
;
41 class RenderViewHostImpl
;
42 class RenderWidgetHostDelegate
;
43 class RenderWidgetHostView
;
44 class TestWebContents
;
47 // Manages RenderFrameHosts for a FrameTreeNode. It maintains a
48 // current_frame_host() which is the content currently visible to the user. When
49 // a frame is told to navigate to a different web site (as determined by
50 // SiteInstance), it will replace its current RenderFrameHost with a new
51 // RenderFrameHost dedicated to the new SiteInstance, possibly in a new process.
53 // Cross-process navigation works like this:
55 // - RFHM::Navigate determines whether the destination is cross-site, and if so,
56 // it creates a pending_render_frame_host_.
58 // - The pending RFH is created in the "navigations suspended" state, meaning no
59 // navigation messages are sent to its renderer until the beforeunload handler
60 // has a chance to run in the current RFH.
62 // - The current RFH runs its beforeunload handler. If it returns false, we
63 // cancel all the pending logic. Otherwise we allow the pending RFH to send
64 // the navigation request to its renderer.
66 // - ResourceDispatcherHost receives a ResourceRequest on the IO thread for the
67 // main resource load from the pending RFH. It creates a
68 // CrossSiteResourceHandler to check whether a process transfer is needed when
69 // the request is ready to commit.
71 // - When RDH receives a response, the BufferedResourceHandler determines
72 // whether it is a navigation type that doesn't commit (e.g. download, 204 or
73 // error page). If so, it sends a message to the new renderer causing it to
74 // cancel the request, and the request (e.g. the download) proceeds. In this
75 // case, the pending RFH will never become the current RFH, but it remains
76 // until the next DidNavigate event for this WebContentsImpl.
78 // - After RDH receives a response and determines that it is safe and not a
79 // download, the CrossSiteResourceHandler checks whether a transfer for a
80 // redirect is needed. If so, it pauses the network response and starts an
81 // identical navigation in a new pending RFH. When the identical request is
82 // later received by RDH, the response is transferred and unpaused.
84 // - Otherwise, the network response commits in the pending RFH's renderer,
85 // which sends a DidCommitProvisionalLoad message back to the browser process.
87 // - RFHM::CommitPending makes visible the new RFH, and initiates the unload
88 // handler in the old RFH. The unload handler will complete in the background.
90 // - RenderFrameHostManager may keep the previous RFH alive as a
91 // RenderFrameProxyHost, to be used (for example) if the user goes back. The
92 // process only stays live if another tab is using it, but if so, the existing
93 // frame relationships will be maintained.
94 class CONTENT_EXPORT RenderFrameHostManager
: public NotificationObserver
{
96 // Functions implemented by our owner that we need.
98 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl
99 // that are required to run this class. The design should probably be better
100 // such that these are more clear.
102 // There is additional complexity that some of the functions we need in
103 // WebContentsImpl are inherited and non-virtual. These are named with
104 // "RenderManager" so that the duplicate implementation of them will be clear.
106 // Functions and parameters whose description are prefixed by PlzNavigate are
107 // part of a navigation refactoring project, currently behind the
108 // enable-browser-side-navigation flag. The idea is to move the logic behind
109 // driving navigations from the renderer to the browser.
110 class CONTENT_EXPORT Delegate
{
112 // Initializes the given renderer if necessary and creates the view ID
113 // corresponding to this view host. If this method is not called and the
114 // process is not shared, then the WebContentsImpl will act as though the
115 // renderer is not running (i.e., it will render "sad tab"). This method is
116 // automatically called from LoadURL. |for_main_frame_navigation| indicates
117 // whether this RenderViewHost is used to render a top-level frame, so the
118 // appropriate RenderWidgetHostView type is used.
119 virtual bool CreateRenderViewForRenderManager(
120 RenderViewHost
* render_view_host
,
122 int proxy_routing_id
,
123 bool for_main_frame_navigation
) = 0;
124 virtual bool CreateRenderFrameForRenderManager(
125 RenderFrameHost
* render_frame_host
,
126 int parent_routing_id
,
127 int proxy_routing_id
) = 0;
128 virtual void BeforeUnloadFiredFromRenderManager(
129 bool proceed
, const base::TimeTicks
& proceed_time
,
130 bool* proceed_to_fire_unload
) = 0;
131 virtual void RenderProcessGoneFromRenderManager(
132 RenderViewHost
* render_view_host
) = 0;
133 virtual void UpdateRenderViewSizeForRenderManager() = 0;
134 virtual void CancelModalDialogsForRenderManager() = 0;
135 virtual void NotifySwappedFromRenderManager(RenderFrameHost
* old_host
,
136 RenderFrameHost
* new_host
,
137 bool is_main_frame
) = 0;
138 virtual NavigationControllerImpl
&
139 GetControllerForRenderManager() = 0;
141 // Create swapped out RenderViews in the given SiteInstance for each tab in
142 // the opener chain of this tab, if any. This allows the current tab to
143 // make cross-process script calls to its opener(s). Returns the route ID
144 // of the immediate opener, if one exists (otherwise MSG_ROUTING_NONE).
145 virtual int CreateOpenerRenderViewsForRenderManager(
146 SiteInstance
* instance
) = 0;
148 // Creates a WebUI object for the given URL if one applies. Ownership of the
149 // returned pointer will be passed to the caller. If no WebUI applies,
151 virtual WebUIImpl
* CreateWebUIForRenderManager(const GURL
& url
) = 0;
153 // Returns the navigation entry of the current navigation, or NULL if there
155 virtual NavigationEntry
*
156 GetLastCommittedNavigationEntryForRenderManager() = 0;
158 // Returns true if the location bar should be focused by default rather than
159 // the page contents. The view calls this function when the tab is focused
160 // to see what it should do.
161 virtual bool FocusLocationBarByDefault() = 0;
163 // Focuses the location bar.
164 virtual void SetFocusToLocationBar(bool select_all
) = 0;
166 // Returns true if views created for this delegate should be created in a
168 virtual bool IsHidden() = 0;
171 virtual ~Delegate() {}
174 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown
175 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of
177 static bool ClearRFHsPendingShutdown(FrameTreeNode
* node
);
179 // All three delegate pointers must be non-NULL and are not owned by this
180 // class. They must outlive this class. The RenderViewHostDelegate and
181 // RenderWidgetHostDelegate are what will be installed into all
182 // RenderViewHosts that are created.
184 // You must call Init() before using this class.
185 RenderFrameHostManager(
186 FrameTreeNode
* frame_tree_node
,
187 RenderFrameHostDelegate
* render_frame_delegate
,
188 RenderViewHostDelegate
* render_view_delegate
,
189 RenderWidgetHostDelegate
* render_widget_delegate
,
191 ~RenderFrameHostManager() override
;
193 // For arguments, see WebContentsImpl constructor.
194 void Init(BrowserContext
* browser_context
,
195 SiteInstance
* site_instance
,
197 int frame_routing_id
);
199 // Returns the currently active RenderFrameHost.
201 // This will be non-NULL between Init() and Shutdown(). You may want to NULL
202 // check it in many cases, however. Windows can send us messages during the
203 // destruction process after it has been shut down.
204 RenderFrameHostImpl
* current_frame_host() const {
205 return render_frame_host_
.get();
208 // TODO(creis): Remove this when we no longer use RVH for navigation.
209 RenderViewHostImpl
* current_host() const;
211 // Returns the view associated with the current RenderViewHost, or NULL if
212 // there is no current one.
213 RenderWidgetHostView
* GetRenderWidgetHostView() const;
215 RenderFrameProxyHost
* GetProxyToParent();
217 // Returns the pending RenderFrameHost, or NULL if there is no pending one.
218 RenderFrameHostImpl
* pending_frame_host() const {
219 return pending_render_frame_host_
.get();
222 // TODO(creis): Remove this when we no longer use RVH for navigation.
223 RenderViewHostImpl
* pending_render_view_host() const;
225 // Returns the current committed Web UI or NULL if none applies.
226 WebUIImpl
* web_ui() const { return web_ui_
.get(); }
228 // Returns the Web UI for the pending navigation, or NULL of none applies.
229 WebUIImpl
* pending_web_ui() const {
230 return pending_web_ui_
.get() ? pending_web_ui_
.get() :
231 pending_and_current_web_ui_
.get();
234 // Sets the pending Web UI for the pending navigation, ensuring that the
235 // bindings are appropriate compared to |bindings|.
236 void SetPendingWebUI(const GURL
& url
, int bindings
);
238 // Called when we want to instruct the renderer to navigate to the given
239 // navigation entry. It may create a new RenderFrameHost or re-use an existing
240 // one. The RenderFrameHost to navigate will be returned. Returns NULL if one
241 // could not be created.
242 RenderFrameHostImpl
* Navigate(const NavigationEntryImpl
& entry
);
244 // Instructs the various live views to stop. Called when the user directed the
245 // page to stop loading.
248 // Notifies the regular and pending RenderViewHosts that a load is or is not
249 // happening. Even though the message is only for one of them, we don't know
250 // which one so we tell both.
251 void SetIsLoading(bool is_loading
);
253 // Whether to close the tab or not when there is a hang during an unload
254 // handler. If we are mid-crosssite navigation, then we should proceed
255 // with the navigation instead of closing the tab.
256 bool ShouldCloseTabOnUnresponsiveRenderer();
258 // Confirms whether we should close the page or navigate away. This is called
259 // before a cross-site request or before a tab/window is closed (as indicated
260 // by the first parameter) to allow the appropriate renderer to approve or
261 // deny the request. |proceed| indicates whether the user chose to proceed.
262 // |proceed_time| is the time when the request was allowed to proceed.
263 void OnBeforeUnloadACK(bool for_cross_site_transition
,
265 const base::TimeTicks
& proceed_time
);
267 // The |pending_render_frame_host| is ready to commit a page. We should
268 // ensure that the old RenderFrameHost runs its unload handler first and
269 // determine whether a RenderFrameHost transfer is needed.
270 // |cross_site_transferring_request| is NULL if a request is not being
271 // transferred between renderers.
272 void OnCrossSiteResponse(
273 RenderFrameHostImpl
* pending_render_frame_host
,
274 const GlobalRequestID
& global_request_id
,
275 scoped_ptr
<CrossSiteTransferringRequest
> cross_site_transferring_request
,
276 const std::vector
<GURL
>& transfer_url_chain
,
277 const Referrer
& referrer
,
278 ui::PageTransition page_transition
,
279 bool should_replace_current_entry
);
281 // Received a response from CrossSiteResourceHandler. If the navigation
282 // specifies a transition, this is called and the navigation will not resume
283 // until ResumeResponseDeferredAtStart.
284 void OnDeferredAfterResponseStarted(
285 const GlobalRequestID
& global_request_id
,
286 RenderFrameHostImpl
* pending_render_frame_host
);
288 // Resume navigation paused after receiving response headers.
289 void ResumeResponseDeferredAtStart();
291 // Clear navigation transition data.
292 void ClearNavigationTransitionData();
294 // Called when a renderer's frame navigates.
295 void DidNavigateFrame(RenderFrameHostImpl
* render_frame_host
);
297 // Called when a renderer sets its opener to null.
298 void DidDisownOpener(RenderFrameHost
* render_frame_host
);
300 // Helper method to create and initialize a RenderFrameHost. If |swapped_out|
301 // is true, it will be initially placed on the swapped out hosts list.
302 // Returns the routing id of the *view* associated with the frame.
303 int CreateRenderFrame(SiteInstance
* instance
,
306 bool for_main_frame_navigation
,
309 // Helper method to create and initialize a RenderFrameProxyHost and return
311 int CreateRenderFrameProxy(SiteInstance
* instance
);
313 // Sets the passed passed interstitial as the currently showing interstitial.
314 // |interstitial_page| should be non NULL (use the remove_interstitial_page
315 // method to unset the interstitial) and no interstitial page should be set
316 // when there is already a non NULL interstitial page set.
317 void set_interstitial_page(InterstitialPageImpl
* interstitial_page
) {
318 DCHECK(!interstitial_page_
&& interstitial_page
);
319 interstitial_page_
= interstitial_page
;
322 // Unsets the currently showing interstitial.
323 void remove_interstitial_page() {
324 DCHECK(interstitial_page_
);
325 interstitial_page_
= NULL
;
328 // Returns the currently showing interstitial, NULL if no interstitial is
330 InterstitialPageImpl
* interstitial_page() const { return interstitial_page_
; }
332 // NotificationObserver implementation.
333 void Observe(int type
,
334 const NotificationSource
& source
,
335 const NotificationDetails
& details
) override
;
337 // Returns whether the given RenderFrameHost (or its associated
338 // RenderViewHost) is on the list of swapped out RenderFrameHosts.
339 bool IsRVHOnSwappedOutList(RenderViewHostImpl
* rvh
) const;
340 bool IsOnSwappedOutList(RenderFrameHostImpl
* rfh
) const;
342 // Returns the swapped out RenderViewHost or RenderFrameHost for the given
343 // SiteInstance, if any. This method is *deprecated* and
344 // GetRenderFrameProxyHost should be used.
345 RenderViewHostImpl
* GetSwappedOutRenderViewHost(SiteInstance
* instance
) const;
346 RenderFrameProxyHost
* GetRenderFrameProxyHost(
347 SiteInstance
* instance
) const;
349 // Returns whether |render_frame_host| is on the pending deletion list.
350 bool IsPendingDeletion(RenderFrameHostImpl
* render_frame_host
);
352 // If |render_frame_host| is on the pending deletion list, this deletes it.
353 // Returns whether it was deleted.
354 bool DeleteFromPendingList(RenderFrameHostImpl
* render_frame_host
);
356 // Deletes any proxy hosts associated with this node. Used during destruction
357 // of WebContentsImpl.
358 void ResetProxyHosts();
360 // Returns the routing id for a RenderFrameHost or RenderFrameHostProxy
361 // that has the given SiteInstance and is associated with this
362 // RenderFrameHostManager. Returns MSG_ROUTING_NONE if none is found.
363 int GetRoutingIdForSiteInstance(SiteInstance
* site_instance
);
365 // PlzNavigate: Called when a navigation is ready to commit, to select the
366 // renderer that will commit it.
367 RenderFrameHostImpl
* GetFrameHostForNavigation(const GURL
& url
,
368 ui::PageTransition transition
);
371 friend class RenderFrameHostManagerTest
;
372 friend class TestWebContents
;
374 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest
,
375 CreateCrossProcessSubframeProxies
);
377 // Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a
378 // FrameTreeNode's RenderFrameHostManager.
379 static bool ClearProxiesInSiteInstance(int32 site_instance_id
,
380 FrameTreeNode
* node
);
382 // Returns whether this tab should transition to a new renderer for
383 // cross-site URLs. Enabled unless we see the --process-per-tab command line
384 // switch. Can be overridden in unit tests.
385 bool ShouldTransitionCrossSite();
387 // Returns true if for the navigation from |current_effective_url| to
388 // |new_effective_url|, a new SiteInstance and BrowsingInstance should be
389 // created (even if we are in a process model that doesn't usually swap).
390 // This forces a process swap and severs script connections with existing
391 // tabs. Cases where this can happen include transitions between WebUI and
392 // regular web pages. |new_site_instance| may be null.
393 // If there is no current NavigationEntry, then |current_is_view_source_mode|
394 // should be the same as |new_is_view_source_mode|.
396 // We use the effective URL here, since that's what is used in the
397 // SiteInstance's site and when we later call IsSameWebSite. If there is no
398 // current NavigationEntry, check the current SiteInstance's site, which might
399 // already be committed to a Web UI URL (such as the NTP).
400 bool ShouldSwapBrowsingInstancesForNavigation(
401 const GURL
& current_effective_url
,
402 bool current_is_view_source_mode
,
403 SiteInstance
* new_site_instance
,
404 const GURL
& new_effective_url
,
405 bool new_is_view_source_mode
) const;
407 // Returns true if it is safe to reuse the current WebUI when navigating from
408 // |current_entry| to |new_url|.
409 bool ShouldReuseWebUI(
410 const NavigationEntry
* current_entry
,
411 const GURL
& new_url
) const;
413 // Returns the SiteInstance to use for the navigation.
414 SiteInstance
* GetSiteInstanceForNavigation(
415 const GURL
& dest_url
,
416 SiteInstance
* dest_instance
,
417 ui::PageTransition dest_transition
,
418 bool dest_is_restore
,
419 bool dest_is_view_source_mode
);
421 // Returns an appropriate SiteInstance object for the given |dest_url|,
422 // possibly reusing the current SiteInstance. If --process-per-tab is used,
423 // this is only called when ShouldSwapBrowsingInstancesForNavigation returns
424 // true. |dest_instance| will be used if it is not null.
425 // This is a helper function for GetSiteInstanceForNavigation.
426 SiteInstance
* GetSiteInstanceForURL(
427 const GURL
& dest_url
,
428 SiteInstance
* dest_instance
,
429 ui::PageTransition dest_transition
,
430 bool dest_is_restore
,
431 bool dest_is_view_source_mode
,
432 SiteInstance
* current_instance
,
433 bool force_browsing_instance_swap
);
435 // Determines the appropriate url to use as the current url for SiteInstance
437 const GURL
& GetCurrentURLForSiteInstance(
438 SiteInstance
* current_instance
,
439 NavigationEntry
* current_entry
);
441 // Creates a new RenderFrameHostImpl for the |new_instance| while respecting
442 // the opener route if needed and stores it in pending_render_frame_host_.
443 void CreateRenderFrameHostForNewSiteInstance(
444 SiteInstance
* old_instance
,
445 SiteInstance
* new_instance
,
448 // Creates a RenderFrameHost and corresponding RenderViewHost if necessary.
449 scoped_ptr
<RenderFrameHostImpl
> CreateRenderFrameHost(SiteInstance
* instance
,
451 int frame_routing_id
,
455 // Sets up the necessary state for a new RenderViewHost with the given opener,
456 // if necessary. It creates a RenderFrameProxy in the target renderer process
457 // with the given |proxy_routing_id|, which is used to route IPC messages when
458 // in swapped out state. Returns early if the RenderViewHost has already been
459 // initialized for another RenderFrameHost.
460 // TODO(creis): opener_route_id is currently for the RenderViewHost but should
461 // be for the RenderFrame, since frames can have openers.
462 bool InitRenderView(RenderViewHostImpl
* render_view_host
,
464 int proxy_routing_id
,
465 bool for_main_frame_navigation
);
467 // Initialization for RenderFrameHost uses the same sequence as InitRenderView
469 bool InitRenderFrame(RenderFrameHostImpl
* render_frame_host
);
471 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
472 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
473 // since there could be Web UI switching as well. Call this for every commit.
474 void CommitPending();
476 // Runs the unload handler in the old RenderFrameHost, after the new
477 // RenderFrameHost has committed. |old_render_frame_host| will either be
478 // deleted or put on the pending delete list during this call.
479 void SwapOutOldFrame(scoped_ptr
<RenderFrameHostImpl
> old_render_frame_host
);
481 // Holds |render_frame_host| until it can be deleted when its swap out ACK
483 void MoveToPendingDeleteHosts(
484 scoped_ptr
<RenderFrameHostImpl
> render_frame_host
);
486 // Shutdown all RenderFrameProxyHosts in a SiteInstance. This is called to
487 // shutdown frames when all the frames in a SiteInstance are confirmed to be
489 void ShutdownRenderFrameProxyHostsInSiteInstance(int32 site_instance_id
);
491 // Helper method to terminate the pending RenderViewHost.
492 void CancelPending();
494 // Helper method to set the active RenderFrameHost. Returns the old
495 // RenderFrameHost and updates counts.
496 scoped_ptr
<RenderFrameHostImpl
> SetRenderFrameHost(
497 scoped_ptr
<RenderFrameHostImpl
> render_frame_host
);
499 RenderFrameHostImpl
* UpdateStateForNavigate(
501 SiteInstance
* instance
,
502 ui::PageTransition transition
,
504 bool is_view_source_mode
,
505 const GlobalRequestID
& transferred_request_id
,
508 // Called when a renderer process is starting to close. We should not
509 // schedule new navigations in its swapped out RenderFrameHosts after this.
510 void RendererProcessClosing(RenderProcessHost
* render_process_host
);
512 // Helper method to delete a RenderFrameProxyHost from the list, if one exists
513 // for the given |instance|.
514 void DeleteRenderFrameProxyHost(SiteInstance
* instance
);
516 // For use in creating RenderFrameHosts.
517 FrameTreeNode
* frame_tree_node_
;
519 // Our delegate, not owned by us. Guaranteed non-NULL.
522 // Whether a navigation requiring different RenderFrameHosts is pending. This
523 // is either for cross-site requests or when required for the process type
525 bool cross_navigation_pending_
;
527 // Implemented by the owner of this class. These delegates are installed into
528 // all the RenderFrameHosts that we create.
529 RenderFrameHostDelegate
* render_frame_delegate_
;
530 RenderViewHostDelegate
* render_view_delegate_
;
531 RenderWidgetHostDelegate
* render_widget_delegate_
;
533 // Our RenderFrameHost and its associated Web UI (if any, will be NULL for
534 // non-WebUI pages). This object is responsible for all communication with
535 // a child RenderFrame instance.
536 // For now, RenderFrameHost keeps a RenderViewHost in its SiteInstance alive.
537 // Eventually, RenderViewHost will be replaced with a page context.
538 scoped_ptr
<RenderFrameHostImpl
> render_frame_host_
;
539 scoped_ptr
<WebUIImpl
> web_ui_
;
541 // A RenderFrameHost used to load a cross-site page. This remains hidden
542 // while a cross-site request is pending until it calls DidNavigate. It may
543 // have an associated Web UI, in which case the Web UI pointer will be non-
546 // The |pending_web_ui_| may be non-NULL even when the
547 // |pending_render_frame_host_| is NULL. This will happen when we're
548 // transitioning between two Web UI pages: the RFH won't be swapped, so the
549 // pending pointer will be unused, but there will be a pending Web UI
550 // associated with the navigation.
551 scoped_ptr
<RenderFrameHostImpl
> pending_render_frame_host_
;
553 // If a pending request needs to be transferred to another process, this
554 // owns the request until it's transferred to the new process, so it will be
555 // cleaned up if the navigation is cancelled. Otherwise, this is NULL.
556 scoped_ptr
<CrossSiteTransferringRequest
> cross_site_transferring_request_
;
558 // Tracks information about any navigation paused after receiving response
560 scoped_ptr
<GlobalRequestID
> response_started_id_
;
562 // If either of these is non-NULL, the pending navigation is to a chrome:
563 // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is
564 // used for when they reference the same object. If either is non-NULL, the
565 // other should be NULL.
566 scoped_ptr
<WebUIImpl
> pending_web_ui_
;
567 base::WeakPtr
<WebUIImpl
> pending_and_current_web_ui_
;
569 // A map of site instance ID to RenderFrameProxyHosts.
570 typedef base::hash_map
<int32
, RenderFrameProxyHost
*> RenderFrameProxyHostMap
;
571 RenderFrameProxyHostMap proxy_hosts_
;
573 // A list of RenderFrameHosts waiting to shut down after swapping out. We use
574 // a linked list since we expect frequent deletes and no indexed access, and
575 // because sets don't appear to support linked_ptrs.
576 typedef std::list
<linked_ptr
<RenderFrameHostImpl
> > RFHPendingDeleteList
;
577 RFHPendingDeleteList pending_delete_hosts_
;
579 // The intersitial page currently shown if any, not own by this class
580 // (the InterstitialPage is self-owned, it deletes itself when hidden).
581 InterstitialPageImpl
* interstitial_page_
;
583 NotificationRegistrar registrar_
;
585 base::WeakPtrFactory
<RenderFrameHostManager
> weak_factory_
;
587 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager
);
590 } // namespace content
592 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_