Index: chrome/browser/extensions/extension_view_host.cc |
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc |
index eca369a6ed7c47d5ee81fbd1e1037ac6243a0bfd..d0687d83123b5dd164685ef4516f37b3656a62b2 100644 |
--- a/chrome/browser/extensions/extension_view_host.cc |
+++ b/chrome/browser/extensions/extension_view_host.cc |
@@ -146,6 +146,16 @@ bool ExtensionViewHost::IsBackgroundPage() const { |
WebContents* ExtensionViewHost::OpenURLFromTab( |
WebContents* source, |
const OpenURLParams& params) { |
+ // Supporting CURRENT_TAB is necessary for renderer-initiated, cross-site |
+ // frame navigations with --isolate-extensions or --site-per-process. These |
+ // navigations cause cross-process transfers which utilize this function with |
+ // CURRENT_TAB. This means that the navigation should happen in the same |
+ // ExtensionViewHost window. |
+ bool is_transfer = |
+ params.transferred_global_request_id != content::GlobalRequestID(); |
+ if (params.disposition == CURRENT_TAB && is_transfer) |
+ return WebContentsDelegate::OpenURLFromTab(host_contents(), params); |
+ |
// Whitelist the dispositions we will allow to be opened. |
switch (params.disposition) { |
case SINGLETON_TAB: |