| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "base/win/win_util.h" | 13 #include "base/win/win_util.h" |
| 14 #include "chrome/app/chrome_command_ids.h" | 14 #include "chrome/app/chrome_command_ids.h" |
| 15 #include "chrome/app/chrome_dll_resource.h" | 15 #include "chrome/app/chrome_dll_resource.h" |
| 16 #include "chrome/browser/automation/automation_provider.h" | 16 #include "chrome/browser/automation/automation_provider.h" |
| 17 #include "chrome/browser/debugger/devtools_manager.h" | 17 #include "chrome/browser/debugger/devtools_manager.h" |
| 18 #include "chrome/browser/debugger/devtools_toggle_action.h" | 18 #include "chrome/browser/debugger/devtools_toggle_action.h" |
| 19 #include "chrome/browser/google/google_util.h" | 19 #include "chrome/browser/google/google_util.h" |
| 20 #include "chrome/browser/history/history_types.h" | 20 #include "chrome/browser/history/history_types.h" |
| 21 #include "chrome/browser/history/history_tab_helper.h" |
| 21 #include "chrome/browser/load_notification_details.h" | 22 #include "chrome/browser/load_notification_details.h" |
| 22 #include "chrome/browser/page_info_window.h" | 23 #include "chrome/browser/page_info_window.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
| 25 #include "chrome/browser/ui/browser_window.h" | 26 #include "chrome/browser/ui/browser_window.h" |
| 26 #include "chrome/browser/ui/download/download_tab_helper.h" | 27 #include "chrome/browser/ui/download/download_tab_helper.h" |
| 27 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 28 #include "chrome/browser/ui/views/browser_dialogs.h" | 29 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 29 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 30 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 30 #include "chrome/browser/ui/views/page_info_bubble_view.h" | 31 #include "chrome/browser/ui/views/page_info_bubble_view.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 ViewHostMsg_FrameNavigate_Params params; | 365 ViewHostMsg_FrameNavigate_Params params; |
| 365 params.referrer = referrer; | 366 params.referrer = referrer; |
| 366 params.url = url; | 367 params.url = url; |
| 367 params.page_id = -1; | 368 params.page_id = -1; |
| 368 params.transition = PageTransition::LINK; | 369 params.transition = PageTransition::LINK; |
| 369 | 370 |
| 370 NavigationController::LoadCommittedDetails details; | 371 NavigationController::LoadCommittedDetails details; |
| 371 details.did_replace_entry = false; | 372 details.did_replace_entry = false; |
| 372 | 373 |
| 373 scoped_refptr<history::HistoryAddPageArgs> add_page_args( | 374 scoped_refptr<history::HistoryAddPageArgs> add_page_args( |
| 374 tab_contents_->tab_contents()-> | 375 tab_contents_->history_tab_helper()-> |
| 375 CreateHistoryAddPageArgs(url, details, params)); | 376 CreateHistoryAddPageArgs(url, details, params)); |
| 376 tab_contents_->tab_contents()-> | 377 tab_contents_->history_tab_helper()-> |
| 377 UpdateHistoryForNavigation(add_page_args); | 378 UpdateHistoryForNavigation(add_page_args); |
| 378 } | 379 } |
| 379 break; | 380 break; |
| 380 default: | 381 default: |
| 381 NOTREACHED(); | 382 NOTREACHED(); |
| 382 break; | 383 break; |
| 383 } | 384 } |
| 384 } | 385 } |
| 385 | 386 |
| 386 void ExternalTabContainer::NavigationStateChanged(const TabContents* source, | 387 void ExternalTabContainer::NavigationStateChanged(const TabContents* source, |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 | 1130 |
| 1130 if (disposition == CURRENT_TAB) { | 1131 if (disposition == CURRENT_TAB) { |
| 1131 DCHECK(route_all_top_level_navigations_); | 1132 DCHECK(route_all_top_level_navigations_); |
| 1132 disposition = NEW_FOREGROUND_TAB; | 1133 disposition = NEW_FOREGROUND_TAB; |
| 1133 } | 1134 } |
| 1134 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1135 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
| 1135 transition); | 1136 transition); |
| 1136 // support only one navigation for a dummy tab before it is killed. | 1137 // support only one navigation for a dummy tab before it is killed. |
| 1137 ::DestroyWindow(GetNativeView()); | 1138 ::DestroyWindow(GetNativeView()); |
| 1138 } | 1139 } |
| OLD | NEW |