Index: content/public/browser/web_contents_delegate.cc |
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc |
index b39436d20bc3f453a1baf014e155090ee1df8529..e9f09233bfc0810d2bc15df93898ebe1736e298d 100644 |
--- a/content/public/browser/web_contents_delegate.cc |
+++ b/content/public/browser/web_contents_delegate.cc |
@@ -22,7 +22,29 @@ WebContentsDelegate::WebContentsDelegate() { |
WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, |
const OpenURLParams& params) { |
- return nullptr; |
+ // CURRENT_TAB is the only one we implement for now. |
Charlie Reis
2015/11/25 00:05:28
// This default implementation only handles CURREN
alexmos
2015/11/25 19:15:39
Done.
|
+ if (params.disposition != CURRENT_TAB) |
+ return nullptr; |
+ |
+ NavigationController::LoadURLParams load_url_params(params.url); |
+ load_url_params.source_site_instance = params.source_site_instance; |
Charlie Reis
2015/11/25 00:05:28
Let's make sure we cover all the parameters from O
alexmos
2015/11/25 19:15:39
I've added redirect_chain and rearranged them.
I'
Charlie Reis
2015/11/25 19:34:25
Seems right.
|
+ load_url_params.referrer = params.referrer; |
+ load_url_params.frame_tree_node_id = params.frame_tree_node_id; |
+ load_url_params.transition_type = params.transition; |
+ load_url_params.extra_headers = params.extra_headers; |
+ load_url_params.should_replace_current_entry = |
+ params.should_replace_current_entry; |
+ |
+ if (params.transferred_global_request_id != GlobalRequestID()) { |
+ load_url_params.is_renderer_initiated = params.is_renderer_initiated; |
+ load_url_params.transferred_global_request_id = |
+ params.transferred_global_request_id; |
+ } else if (params.is_renderer_initiated) { |
+ load_url_params.is_renderer_initiated = true; |
Charlie Reis
2015/11/25 00:05:28
I can't figure out why shell.cc had this obscure a
alexmos
2015/11/25 19:15:39
Done. Same seems to be true for transferred_globa
Charlie Reis
2015/11/25 19:34:25
Ah, yes, nice find. Specifically:
https://coderev
|
+ } |
+ |
+ source->GetController().LoadURLWithParams(load_url_params); |
+ return source; |
} |
bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { |