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

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

Issue 57433010: Prevent creating a swapped out RVH in the same SiteInstance as the current one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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_VIEW_HOST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_VIEW_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_VIEW_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_VIEW_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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Either of the entries may be NULL. 301 // Either of the entries may be NULL.
302 bool ShouldSwapProcessesForNavigation( 302 bool ShouldSwapProcessesForNavigation(
303 const NavigationEntry* curr_entry, 303 const NavigationEntry* curr_entry,
304 const NavigationEntryImpl* new_entry) const; 304 const NavigationEntryImpl* new_entry) const;
305 305
306 bool ShouldReuseWebUI( 306 bool ShouldReuseWebUI(
307 const NavigationEntry* curr_entry, 307 const NavigationEntry* curr_entry,
308 const NavigationEntryImpl* new_entry) const; 308 const NavigationEntryImpl* new_entry) const;
309 309
310 // Returns an appropriate SiteInstance object for the given NavigationEntry, 310 // Returns an appropriate SiteInstance object for the given NavigationEntry,
311 // possibly reusing the current SiteInstance. 311 // possibly reusing the current SiteInstance. If --process-per-tab is used,
312 // Never called if --process-per-tab is used. 312 // this is only called when ShouldSwapProcessesForNavigation reutrns true.
313 SiteInstance* GetSiteInstanceForEntry( 313 SiteInstance* GetSiteInstanceForEntry(
314 const NavigationEntryImpl& entry, 314 const NavigationEntryImpl& entry,
315 SiteInstance* curr_instance); 315 SiteInstance* curr_instance,
316 bool force_swap);
316 317
317 // Sets up the necessary state for a new RenderViewHost with the given opener. 318 // Sets up the necessary state for a new RenderViewHost with the given opener.
318 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); 319 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id);
319 320
320 // Sets the pending RenderViewHost/WebUI to be the active one. Note that this 321 // Sets the pending RenderViewHost/WebUI to be the active one. Note that this
321 // doesn't require the pending render_view_host_ pointer to be non-NULL, since 322 // doesn't require the pending render_view_host_ pointer to be non-NULL, since
322 // there could be Web UI switching as well. Call this for every commit. 323 // there could be Web UI switching as well. Call this for every commit.
323 void CommitPending(); 324 void CommitPending();
324 325
325 // Shutdown all RenderViewHosts in a SiteInstance. This is called 326 // Shutdown all RenderViewHosts in a SiteInstance. This is called
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 InterstitialPageImpl* interstitial_page_; 389 InterstitialPageImpl* interstitial_page_;
389 390
390 NotificationRegistrar registrar_; 391 NotificationRegistrar registrar_;
391 392
392 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); 393 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager);
393 }; 394 };
394 395
395 } // namespace content 396 } // namespace content
396 397
397 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_VIEW_HOST_MANAGER_H_ 398 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_VIEW_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698