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

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

Issue 166533002: [wip] Introduce SiteInstanceKeepAlive. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 | Annotate | Revision Log
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 RenderWidgetHostDelegate* render_widget_delegate, 126 RenderWidgetHostDelegate* render_widget_delegate,
127 Delegate* delegate); 127 Delegate* delegate);
128 virtual ~RenderFrameHostManager(); 128 virtual ~RenderFrameHostManager();
129 129
130 // For arguments, see WebContentsImpl constructor. 130 // For arguments, see WebContentsImpl constructor.
131 void Init(BrowserContext* browser_context, 131 void Init(BrowserContext* browser_context,
132 SiteInstance* site_instance, 132 SiteInstance* site_instance,
133 int view_routing_id, 133 int view_routing_id,
134 int frame_routing_id); 134 int frame_routing_id);
135 135
136 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown
137 // frames when all the frames in a SiteInstance are confirmed to be swapped
138 // out.
139 static void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id);
140
136 // Returns the currently active RenderFrameHost. 141 // Returns the currently active RenderFrameHost.
137 // 142 //
138 // This will be non-NULL between Init() and Shutdown(). You may want to NULL 143 // This will be non-NULL between Init() and Shutdown(). You may want to NULL
139 // check it in many cases, however. Windows can send us messages during the 144 // check it in many cases, however. Windows can send us messages during the
140 // destruction process after it has been shut down. 145 // destruction process after it has been shut down.
141 RenderFrameHostImpl* current_frame_host() const { 146 RenderFrameHostImpl* current_frame_host() const {
142 return render_frame_host_; 147 return render_frame_host_;
143 } 148 }
144 149
145 // TODO(creis): Remove this when we no longer use RVH for navigation. 150 // TODO(creis): Remove this when we no longer use RVH for navigation.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // initialized for another RenderFrameHost. 373 // initialized for another RenderFrameHost.
369 // TODO(creis): opener_route_id is currently for the RenderViewHost but should 374 // TODO(creis): opener_route_id is currently for the RenderViewHost but should
370 // be for the RenderFrame, since frames can have openers. 375 // be for the RenderFrame, since frames can have openers.
371 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); 376 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id);
372 377
373 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this 378 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
374 // doesn't require the pending render_frame_host_ pointer to be non-NULL, 379 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
375 // since there could be Web UI switching as well. Call this for every commit. 380 // since there could be Web UI switching as well. Call this for every commit.
376 void CommitPending(); 381 void CommitPending();
377 382
378 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown
379 // frames when all the frames in a SiteInstance are confirmed to be swapped
380 // out.
381 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id);
382
383 // Helper method to terminate the pending RenderViewHost. 383 // Helper method to terminate the pending RenderViewHost.
384 void CancelPending(); 384 void CancelPending();
385 385
386 RenderFrameHostImpl* UpdateRendererStateForNavigate( 386 RenderFrameHostImpl* UpdateRendererStateForNavigate(
387 const NavigationEntryImpl& entry); 387 const NavigationEntryImpl& entry);
388 388
389 // Called when a renderer process is starting to close. We should not 389 // Called when a renderer process is starting to close. We should not
390 // schedule new navigations in its swapped out RenderFrameHosts after this. 390 // schedule new navigations in its swapped out RenderFrameHosts after this.
391 void RendererProcessClosing(RenderProcessHost* render_process_host); 391 void RendererProcessClosing(RenderProcessHost* render_process_host);
392 392
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 CrossProcessFrameConnector* cross_process_frame_connector_; 461 CrossProcessFrameConnector* cross_process_frame_connector_;
462 462
463 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 463 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
464 464
465 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 465 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
466 }; 466 };
467 467
468 } // namespace content 468 } // namespace content
469 469
470 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 470 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698