| 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..70a1f0627de995b8812c87e3080b506c14f6bd3a 100644
|
| --- a/content/public/browser/web_contents_delegate.cc
|
| +++ b/content/public/browser/web_contents_delegate.cc
|
| @@ -22,7 +22,33 @@ WebContentsDelegate::WebContentsDelegate() {
|
|
|
| WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source,
|
| const OpenURLParams& params) {
|
| - return nullptr;
|
| + // This default implementation only handles CURRENT_TAB.
|
| + if (params.disposition != CURRENT_TAB)
|
| + return nullptr;
|
| +
|
| + NavigationController::LoadURLParams load_url_params(params.url);
|
| + load_url_params.source_site_instance = params.source_site_instance;
|
| + load_url_params.transition_type = params.transition;
|
| + load_url_params.frame_tree_node_id = params.frame_tree_node_id;
|
| + load_url_params.referrer = params.referrer;
|
| + load_url_params.redirect_chain = params.redirect_chain;
|
| + load_url_params.extra_headers = params.extra_headers;
|
| + load_url_params.is_renderer_initiated = params.is_renderer_initiated;
|
| + load_url_params.transferred_global_request_id =
|
| + params.transferred_global_request_id;
|
| + load_url_params.should_replace_current_entry =
|
| + params.should_replace_current_entry;
|
| +
|
| + // Only allows the browser-initiated navigation to use POST.
|
| + if (params.uses_post && !params.is_renderer_initiated) {
|
| + load_url_params.load_type =
|
| + NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST;
|
| + load_url_params.browser_initiated_post_data =
|
| + params.browser_initiated_post_data;
|
| + }
|
| +
|
| + source->GetController().LoadURLWithParams(load_url_params);
|
| + return source;
|
| }
|
|
|
| bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const {
|
|
|