OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/external_tab_container_win.h" | 5 #include "chrome/browser/external_tab_container_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 if (automation_) { | 349 if (automation_) { |
350 automation_->Send(new AutomationMsg_OpenURL(tab_handle_, | 350 automation_->Send(new AutomationMsg_OpenURL(tab_handle_, |
351 params.url, | 351 params.url, |
352 params.referrer, | 352 params.referrer, |
353 params.disposition)); | 353 params.disposition)); |
354 // TODO(ananta) | 354 // TODO(ananta) |
355 // We should populate other fields in the | 355 // We should populate other fields in the |
356 // ViewHostMsg_FrameNavigate_Params structure. Another option could be | 356 // ViewHostMsg_FrameNavigate_Params structure. Another option could be |
357 // to refactor the UpdateHistoryForNavigation function in TabContents. | 357 // to refactor the UpdateHistoryForNavigation function in TabContents. |
358 content::FrameNavigateParams nav_params; | 358 content::FrameNavigateParams nav_params; |
359 nav_params.referrer = params.referrer; | 359 nav_params.referrer = content::Referrer( |
| 360 params.referrer, |
| 361 WebKit::WebReferrerPolicyDefault); |
360 nav_params.url = params.url; | 362 nav_params.url = params.url; |
361 nav_params.page_id = -1; | 363 nav_params.page_id = -1; |
362 nav_params.transition = content::PAGE_TRANSITION_LINK; | 364 nav_params.transition = content::PAGE_TRANSITION_LINK; |
363 | 365 |
364 content::LoadCommittedDetails details; | 366 content::LoadCommittedDetails details; |
365 details.did_replace_entry = false; | 367 details.did_replace_entry = false; |
366 | 368 |
367 scoped_refptr<history::HistoryAddPageArgs> add_page_args( | 369 scoped_refptr<history::HistoryAddPageArgs> add_page_args( |
368 tab_contents_->history_tab_helper()-> | 370 tab_contents_->history_tab_helper()-> |
369 CreateHistoryAddPageArgs(params.url, details, nav_params)); | 371 CreateHistoryAddPageArgs(params.url, details, nav_params)); |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 if (params.disposition == CURRENT_TAB) { | 1160 if (params.disposition == CURRENT_TAB) { |
1159 DCHECK(route_all_top_level_navigations_); | 1161 DCHECK(route_all_top_level_navigations_); |
1160 forward_params.disposition = NEW_FOREGROUND_TAB; | 1162 forward_params.disposition = NEW_FOREGROUND_TAB; |
1161 } | 1163 } |
1162 TabContents* new_contents = | 1164 TabContents* new_contents = |
1163 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1165 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
1164 // support only one navigation for a dummy tab before it is killed. | 1166 // support only one navigation for a dummy tab before it is killed. |
1165 ::DestroyWindow(GetNativeView()); | 1167 ::DestroyWindow(GetNativeView()); |
1166 return new_contents; | 1168 return new_contents; |
1167 } | 1169 } |
OLD | NEW |