Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 8986005: Reland r114898: Add TabModalConfirmDialogDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix and cleanup Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/win/win_util.h" 16 #include "base/win/win_util.h"
17 #include "chrome/app/chrome_command_ids.h" 17 #include "chrome/app/chrome_command_ids.h"
18 #include "chrome/app/chrome_dll_resource.h" 18 #include "chrome/app/chrome_dll_resource.h"
19 #include "chrome/browser/automation/automation_provider.h" 19 #include "chrome/browser/automation/automation_provider.h"
20 #include "chrome/browser/debugger/devtools_toggle_action.h" 20 #include "chrome/browser/debugger/devtools_toggle_action.h"
21 #include "chrome/browser/debugger/devtools_window.h" 21 #include "chrome/browser/debugger/devtools_window.h"
22 #include "chrome/browser/history/history_tab_helper.h" 22 #include "chrome/browser/history/history_tab_helper.h"
23 #include "chrome/browser/history/history_types.h" 23 #include "chrome/browser/history/history_types.h"
24 #include "chrome/browser/infobars/infobar_tab_helper.h" 24 #include "chrome/browser/infobars/infobar_tab_helper.h"
25 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/repost_form_warning_controller.h"
26 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" 27 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
27 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 28 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
28 #include "chrome/browser/ui/browser.h" 29 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_dialogs.h"
29 #include "chrome/browser/ui/browser_window.h" 31 #include "chrome/browser/ui/browser_window.h"
30 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 32 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
31 #include "chrome/browser/ui/views/browser_dialogs.h" 33 #include "chrome/browser/ui/views/browser_dialogs.h"
32 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" 34 #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
33 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h" 35 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h"
34 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" 36 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
35 #include "chrome/common/automation_messages.h" 37 #include "chrome/common/automation_messages.h"
36 #include "chrome/common/chrome_constants.h" 38 #include "chrome/common/chrome_constants.h"
37 #include "chrome/common/chrome_notification_types.h" 39 #include "chrome/common/chrome_notification_types.h"
38 #include "chrome/common/render_messages.h" 40 #include "chrome/common/render_messages.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 AutomationMsg_RunUnloadHandlers::WriteReplyParams(unload_reply_message_, 691 AutomationMsg_RunUnloadHandlers::WriteReplyParams(unload_reply_message_,
690 false); 692 false);
691 automation_->Send(unload_reply_message_); 693 automation_->Send(unload_reply_message_);
692 unload_reply_message_ = NULL; 694 unload_reply_message_ = NULL;
693 *proceed_to_fire_unload = false; 695 *proceed_to_fire_unload = false;
694 } 696 }
695 } 697 }
696 698
697 void ExternalTabContainer::ShowRepostFormWarningDialog( 699 void ExternalTabContainer::ShowRepostFormWarningDialog(
698 TabContents* tab_contents) { 700 TabContents* tab_contents) {
699 browser::ShowRepostFormWarningDialog(GetNativeView(), tab_contents); 701 browser::ShowTabModalConfirmDialog(
702 new RepostFormWarningController(tab_contents),
703 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents));
700 } 704 }
701 705
702 void ExternalTabContainer::RunFileChooser( 706 void ExternalTabContainer::RunFileChooser(
703 TabContents* tab, const content::FileChooserParams& params) { 707 TabContents* tab, const content::FileChooserParams& params) {
704 Browser::RunFileChooserHelper(tab, params); 708 Browser::RunFileChooserHelper(tab, params);
705 } 709 }
706 710
707 void ExternalTabContainer::EnumerateDirectory(TabContents* tab, int request_id, 711 void ExternalTabContainer::EnumerateDirectory(TabContents* tab, int request_id,
708 const FilePath& path) { 712 const FilePath& path) {
709 Browser::EnumerateDirectoryHelper(tab, request_id, path); 713 Browser::EnumerateDirectoryHelper(tab, request_id, path);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 if (params.disposition == CURRENT_TAB) { 1182 if (params.disposition == CURRENT_TAB) {
1179 DCHECK(route_all_top_level_navigations_); 1183 DCHECK(route_all_top_level_navigations_);
1180 forward_params.disposition = NEW_FOREGROUND_TAB; 1184 forward_params.disposition = NEW_FOREGROUND_TAB;
1181 } 1185 }
1182 TabContents* new_contents = 1186 TabContents* new_contents =
1183 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1187 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1184 // support only one navigation for a dummy tab before it is killed. 1188 // support only one navigation for a dummy tab before it is killed.
1185 ::DestroyWindow(GetNativeView()); 1189 ::DestroyWindow(GetNativeView());
1186 return new_contents; 1190 return new_contents;
1187 } 1191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698