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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 76063007: Clean up RenderViewHostManager swapping logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 7 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 virtual bool ShouldTryToUseExistingProcessHost( 233 virtual bool ShouldTryToUseExistingProcessHost(
234 BrowserContext* browser_context, const GURL& url); 234 BrowserContext* browser_context, const GURL& url);
235 235
236 // Called when a site instance is first associated with a process. 236 // Called when a site instance is first associated with a process.
237 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {} 237 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {}
238 238
239 // Called from a site instance's destructor. 239 // Called from a site instance's destructor.
240 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {} 240 virtual void SiteInstanceDeleting(SiteInstance* site_instance) {}
241 241
242 // Returns true if for the navigation from |current_url| to |new_url| 242 // Returns true if for the navigation from |current_url| to |new_url|
243 // in |site_instance|, the process should be swapped (even if we are in a 243 // in |site_instance|, a new SiteInstance and BrowsingInstance should be
244 // process model that doesn't usually swap). 244 // created (even if we are in a process model that doesn't usually swap.)
245 virtual bool ShouldSwapProcessesForNavigation(SiteInstance* site_instance, 245 // This forces a process swap and severs script connections with existing
246 const GURL& current_url, 246 // tabs.
247 const GURL& new_url); 247 virtual bool ShouldSwapBrowsingInstancesForNavigation(
248 SiteInstance* site_instance,
249 const GURL& current_url,
250 const GURL& new_url);
248 251
249 // Returns true if the given navigation redirect should cause a renderer 252 // Returns true if the given navigation redirect should cause a renderer
250 // process swap. 253 // process swap.
251 // This is called on the IO thread. 254 // This is called on the IO thread.
252 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context, 255 virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context,
253 const GURL& current_url, 256 const GURL& current_url,
254 const GURL& new_url); 257 const GURL& new_url);
255 258
256 // Returns true if the passed in URL should be assigned as the site of the 259 // Returns true if the passed in URL should be assigned as the site of the
257 // current SiteInstance, if it does not yet have a site. 260 // current SiteInstance, if it does not yet have a site.
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 // Returns true if plugin referred to by the url can use 616 // Returns true if plugin referred to by the url can use
614 // pp::FileIO::RequestOSFileHandle. 617 // pp::FileIO::RequestOSFileHandle.
615 virtual bool IsPluginAllowedToCallRequestOSFileHandle( 618 virtual bool IsPluginAllowedToCallRequestOSFileHandle(
616 content::BrowserContext* browser_context, 619 content::BrowserContext* browser_context,
617 const GURL& url); 620 const GURL& url);
618 }; 621 };
619 622
620 } // namespace content 623 } // namespace content
621 624
622 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 625 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_view_host_manager_unittest.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698