OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/external_tab_container_win.h" | 5 #include "chrome/browser/ui/views/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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 content::FrameNavigateParams nav_params; | 427 content::FrameNavigateParams nav_params; |
428 nav_params.referrer = content::Referrer(referrer, | 428 nav_params.referrer = content::Referrer(referrer, |
429 params.referrer.policy); | 429 params.referrer.policy); |
430 nav_params.url = params.url; | 430 nav_params.url = params.url; |
431 nav_params.page_id = -1; | 431 nav_params.page_id = -1; |
432 nav_params.transition = content::PAGE_TRANSITION_LINK; | 432 nav_params.transition = content::PAGE_TRANSITION_LINK; |
433 | 433 |
434 content::LoadCommittedDetails details; | 434 content::LoadCommittedDetails details; |
435 details.did_replace_entry = false; | 435 details.did_replace_entry = false; |
436 | 436 |
437 scoped_refptr<history::HistoryAddPageArgs> add_page_args( | 437 const history::HistoryAddPageArgs& add_page_args = |
438 tab_contents_->history_tab_helper()-> | 438 tab_contents_->history_tab_helper()-> |
439 CreateHistoryAddPageArgs(params.url, details, nav_params)); | 439 CreateHistoryAddPageArgs(params.url, details, nav_params); |
440 tab_contents_->history_tab_helper()-> | 440 tab_contents_->history_tab_helper()-> |
441 UpdateHistoryForNavigation(add_page_args); | 441 UpdateHistoryForNavigation(add_page_args); |
442 | 442 |
443 return tab_contents_->web_contents(); | 443 return tab_contents_->web_contents(); |
444 } | 444 } |
445 break; | 445 break; |
446 default: | 446 default: |
447 NOTREACHED(); | 447 NOTREACHED(); |
448 break; | 448 break; |
449 } | 449 } |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 if (params.disposition == CURRENT_TAB) { | 1272 if (params.disposition == CURRENT_TAB) { |
1273 DCHECK(route_all_top_level_navigations_); | 1273 DCHECK(route_all_top_level_navigations_); |
1274 forward_params.disposition = NEW_FOREGROUND_TAB; | 1274 forward_params.disposition = NEW_FOREGROUND_TAB; |
1275 } | 1275 } |
1276 WebContents* new_contents = | 1276 WebContents* new_contents = |
1277 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1277 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
1278 // support only one navigation for a dummy tab before it is killed. | 1278 // support only one navigation for a dummy tab before it is killed. |
1279 ::DestroyWindow(GetNativeView()); | 1279 ::DestroyWindow(GetNativeView()); |
1280 return new_contents; | 1280 return new_contents; |
1281 } | 1281 } |
OLD | NEW |