| 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 <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlapp.h> | 8 #include <atlapp.h> |
| 9 #include <atlconv.h> | 9 #include <atlconv.h> |
| 10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 msg.lParam = lparam; | 1207 msg.lParam = lparam; |
| 1208 automation_->Send(new AutomationMsg_HandleAccelerator(tab_handle_, msg)); | 1208 automation_->Send(new AutomationMsg_HandleAccelerator(tab_handle_, msg)); |
| 1209 return true; | 1209 return true; |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 bool ExternalTabContainerWin::InitNavigationInfo( | 1212 bool ExternalTabContainerWin::InitNavigationInfo( |
| 1213 NavigationInfo* nav_info, | 1213 NavigationInfo* nav_info, |
| 1214 content::NavigationType nav_type, | 1214 content::NavigationType nav_type, |
| 1215 int relative_offset) { | 1215 int relative_offset) { |
| 1216 DCHECK(nav_info); | 1216 DCHECK(nav_info); |
| 1217 NavigationEntry* entry = web_contents_->GetController().GetActiveEntry(); | 1217 NavigationEntry* entry = web_contents_->GetController().GetVisibleEntry(); |
| 1218 // If this is very early in the game then there may not be an entry. | 1218 // If this is very early in the game then there may not be an entry. |
| 1219 if (!entry) | 1219 if (!entry) |
| 1220 return false; | 1220 return false; |
| 1221 | 1221 |
| 1222 nav_info->navigation_type = nav_type; | 1222 nav_info->navigation_type = nav_type; |
| 1223 nav_info->relative_offset = relative_offset; | 1223 nav_info->relative_offset = relative_offset; |
| 1224 nav_info->navigation_index = | 1224 nav_info->navigation_index = |
| 1225 web_contents_->GetController().GetCurrentEntryIndex(); | 1225 web_contents_->GetController().GetCurrentEntryIndex(); |
| 1226 nav_info->url = entry->GetURL(); | 1226 nav_info->url = entry->GetURL(); |
| 1227 nav_info->referrer = entry->GetReferrer().url; | 1227 nav_info->referrer = entry->GetReferrer().url; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 if (params.disposition == CURRENT_TAB) { | 1482 if (params.disposition == CURRENT_TAB) { |
| 1483 DCHECK(route_all_top_level_navigations_); | 1483 DCHECK(route_all_top_level_navigations_); |
| 1484 forward_params.disposition = NEW_FOREGROUND_TAB; | 1484 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1485 } | 1485 } |
| 1486 WebContents* new_contents = | 1486 WebContents* new_contents = |
| 1487 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1487 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
| 1488 // support only one navigation for a dummy tab before it is killed. | 1488 // support only one navigation for a dummy tab before it is killed. |
| 1489 widget_->CloseNow(); | 1489 widget_->CloseNow(); |
| 1490 return new_contents; | 1490 return new_contents; |
| 1491 } | 1491 } |
| OLD | NEW |