Pass RenderFrameHost to ShouldCreateNewSiteInstance
This commit is contained in:
parent
61fa8693d2
commit
90852c665d
2 changed files with 7 additions and 3 deletions
|
@ -87,10 +87,10 @@ content::WebContents* AtomBrowserClient::GetWebContentsFromProcessID(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomBrowserClient::ShouldCreateNewSiteInstance(
|
bool AtomBrowserClient::ShouldCreateNewSiteInstance(
|
||||||
|
content::RenderFrameHost* render_frame_host,
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
content::SiteInstance* current_instance,
|
content::SiteInstance* current_instance,
|
||||||
const GURL& url) {
|
const GURL& url) {
|
||||||
|
|
||||||
if (url.SchemeIs(url::kJavaScriptScheme))
|
if (url.SchemeIs(url::kJavaScriptScheme))
|
||||||
// "javacript:" scheme should always use same SiteInstance
|
// "javacript:" scheme should always use same SiteInstance
|
||||||
return false;
|
return false;
|
||||||
|
@ -183,6 +183,7 @@ std::string AtomBrowserClient::GetApplicationLocale() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomBrowserClient::OverrideSiteInstanceForNavigation(
|
void AtomBrowserClient::OverrideSiteInstanceForNavigation(
|
||||||
|
content::RenderFrameHost* render_frame_host,
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
content::SiteInstance* current_instance,
|
content::SiteInstance* current_instance,
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
|
@ -192,7 +193,8 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ShouldCreateNewSiteInstance(browser_context, current_instance, url))
|
if (!ShouldCreateNewSiteInstance(render_frame_host, browser_context,
|
||||||
|
current_instance, url))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
scoped_refptr<content::SiteInstance> site_instance =
|
scoped_refptr<content::SiteInstance> site_instance =
|
||||||
|
|
|
@ -54,6 +54,7 @@ class AtomBrowserClient : public brightray::BrowserClient,
|
||||||
content::WebPreferences* prefs) override;
|
content::WebPreferences* prefs) override;
|
||||||
std::string GetApplicationLocale() override;
|
std::string GetApplicationLocale() override;
|
||||||
void OverrideSiteInstanceForNavigation(
|
void OverrideSiteInstanceForNavigation(
|
||||||
|
content::RenderFrameHost* render_frame_host,
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
content::SiteInstance* current_instance,
|
content::SiteInstance* current_instance,
|
||||||
const GURL& dest_url,
|
const GURL& dest_url,
|
||||||
|
@ -111,7 +112,8 @@ class AtomBrowserClient : public brightray::BrowserClient,
|
||||||
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
|
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ShouldCreateNewSiteInstance(content::BrowserContext* browser_context,
|
bool ShouldCreateNewSiteInstance(content::RenderFrameHost* render_frame_host,
|
||||||
|
content::BrowserContext* browser_context,
|
||||||
content::SiteInstance* current_instance,
|
content::SiteInstance* current_instance,
|
||||||
const GURL& dest_url);
|
const GURL& dest_url);
|
||||||
struct ProcessPreferences {
|
struct ProcessPreferences {
|
||||||
|
|
Loading…
Reference in a new issue