| 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 void ExternalTabContainer::Navigate(const GURL& url, const GURL& referrer) { | 1024 void ExternalTabContainer::Navigate(const GURL& url, const GURL& referrer) { |
| 1025 if (!tab_contents_.get()) { | 1025 if (!tab_contents_.get()) { |
| 1026 NOTREACHED(); | 1026 NOTREACHED(); |
| 1027 return; | 1027 return; |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 TRACE_EVENT_BEGIN_ETW("ExternalTabContainer::Navigate", 0, url.spec()); | 1030 TRACE_EVENT_BEGIN_ETW("ExternalTabContainer::Navigate", 0, url.spec()); |
| 1031 | 1031 |
| 1032 tab_contents_->controller().LoadURL(url, referrer, | 1032 tab_contents_->controller().LoadURL( |
| 1033 content::PAGE_TRANSITION_START_PAGE, | 1033 url, content::Referrer(referrer, WebKit::WebReferrerPolicyDefault), |
| 1034 std::string()); | 1034 content::PAGE_TRANSITION_START_PAGE, std::string()); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 bool ExternalTabContainer::OnGoToEntryOffset(int offset) { | 1037 bool ExternalTabContainer::OnGoToEntryOffset(int offset) { |
| 1038 if (load_requests_via_automation_) { | 1038 if (load_requests_via_automation_) { |
| 1039 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset( | 1039 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset( |
| 1040 tab_handle_, offset)); | 1040 tab_handle_, offset)); |
| 1041 return false; | 1041 return false; |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 return true; | 1044 return true; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 if (params.disposition == CURRENT_TAB) { | 1160 if (params.disposition == CURRENT_TAB) { |
| 1161 DCHECK(route_all_top_level_navigations_); | 1161 DCHECK(route_all_top_level_navigations_); |
| 1162 forward_params.disposition = NEW_FOREGROUND_TAB; | 1162 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1163 } | 1163 } |
| 1164 TabContents* new_contents = | 1164 TabContents* new_contents = |
| 1165 ExternalTabContainer::OpenURLFromTab(source, forward_params); | 1165 ExternalTabContainer::OpenURLFromTab(source, forward_params); |
| 1166 // 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. |
| 1167 ::DestroyWindow(GetNativeView()); | 1167 ::DestroyWindow(GetNativeView()); |
| 1168 return new_contents; | 1168 return new_contents; |
| 1169 } | 1169 } |
| OLD | NEW |