| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/file_select_helper.h" | 23 #include "chrome/browser/file_select_helper.h" |
| 24 #include "chrome/browser/history/history_tab_helper.h" | 24 #include "chrome/browser/history/history_tab_helper.h" |
| 25 #include "chrome/browser/history/history_types.h" | 25 #include "chrome/browser/history/history_types.h" |
| 26 #include "chrome/browser/infobars/infobar_tab_helper.h" | 26 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/repost_form_warning_controller.h" | 28 #include "chrome/browser/repost_form_warning_controller.h" |
| 29 #include "chrome/browser/themes/theme_service.h" | 29 #include "chrome/browser/themes/theme_service.h" |
| 30 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" | 30 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" |
| 31 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 31 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
| 32 #include "chrome/browser/ui/browser.h" | 32 #include "chrome/browser/ui/browser.h" |
| 33 #include "chrome/browser/ui/browser_dialogs.h" | |
| 34 #include "chrome/browser/ui/browser_window.h" | 33 #include "chrome/browser/ui/browser_window.h" |
| 35 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 34 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 35 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 36 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 36 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 37 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h" | 37 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h" |
| 38 #include "chrome/common/automation_messages.h" | 38 #include "chrome/common/automation_messages.h" |
| 39 #include "chrome/common/chrome_constants.h" | 39 #include "chrome/common/chrome_constants.h" |
| 40 #include "chrome/common/chrome_notification_types.h" | 40 #include "chrome/common/chrome_notification_types.h" |
| 41 #include "chrome/common/render_messages.h" | 41 #include "chrome/common/render_messages.h" |
| 42 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
| 43 #include "content/public/browser/load_notification_details.h" | 43 #include "content/public/browser/load_notification_details.h" |
| 44 #include "content/public/browser/native_web_keyboard_event.h" | 44 #include "content/public/browser/native_web_keyboard_event.h" |
| 45 #include "content/public/browser/navigation_details.h" | 45 #include "content/public/browser/navigation_details.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 if (!proceed) { | 764 if (!proceed) { |
| 765 AutomationMsg_RunUnloadHandlers::WriteReplyParams(unload_reply_message_, | 765 AutomationMsg_RunUnloadHandlers::WriteReplyParams(unload_reply_message_, |
| 766 false); | 766 false); |
| 767 automation_->Send(unload_reply_message_); | 767 automation_->Send(unload_reply_message_); |
| 768 unload_reply_message_ = NULL; | 768 unload_reply_message_ = NULL; |
| 769 *proceed_to_fire_unload = false; | 769 *proceed_to_fire_unload = false; |
| 770 } | 770 } |
| 771 } | 771 } |
| 772 | 772 |
| 773 void ExternalTabContainerWin::ShowRepostFormWarningDialog(WebContents* source) { | 773 void ExternalTabContainerWin::ShowRepostFormWarningDialog(WebContents* source) { |
| 774 chrome::ShowTabModalConfirmDialog(new RepostFormWarningController(source), | 774 TabModalConfirmDialog::Create(new RepostFormWarningController(source), |
| 775 TabContents::FromWebContents(source)); | 775 TabContents::FromWebContents(source)); |
| 776 } | 776 } |
| 777 | 777 |
| 778 void ExternalTabContainerWin::RunFileChooser( | 778 void ExternalTabContainerWin::RunFileChooser( |
| 779 WebContents* tab, | 779 WebContents* tab, |
| 780 const content::FileChooserParams& params) { | 780 const content::FileChooserParams& params) { |
| 781 FileSelectHelper::RunFileChooser(tab, params); | 781 FileSelectHelper::RunFileChooser(tab, params); |
| 782 } | 782 } |
| 783 | 783 |
| 784 void ExternalTabContainerWin::EnumerateDirectory(WebContents* tab, | 784 void ExternalTabContainerWin::EnumerateDirectory(WebContents* tab, |
| 785 int request_id, | 785 int request_id, |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 if (params.disposition == CURRENT_TAB) { | 1273 if (params.disposition == CURRENT_TAB) { |
| 1274 DCHECK(route_all_top_level_navigations_); | 1274 DCHECK(route_all_top_level_navigations_); |
| 1275 forward_params.disposition = NEW_FOREGROUND_TAB; | 1275 forward_params.disposition = NEW_FOREGROUND_TAB; |
| 1276 } | 1276 } |
| 1277 WebContents* new_contents = | 1277 WebContents* new_contents = |
| 1278 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); | 1278 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); |
| 1279 // support only one navigation for a dummy tab before it is killed. | 1279 // support only one navigation for a dummy tab before it is killed. |
| 1280 ::DestroyWindow(GetNativeView()); | 1280 ::DestroyWindow(GetNativeView()); |
| 1281 return new_contents; | 1281 return new_contents; |
| 1282 } | 1282 } |
| OLD | NEW |