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

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

Issue 10411064: Move RunFileChooserHelper and EnumerateDirectoryHelper out of Browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months 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
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/external_tab/external_tab_container_win.h" 5 #include "chrome/browser/external_tab/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/string16.h" 15 #include "base/string16.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "base/win/win_util.h" 17 #include "base/win/win_util.h"
18 #include "chrome/app/chrome_command_ids.h" 18 #include "chrome/app/chrome_command_ids.h"
19 #include "chrome/app/chrome_dll_resource.h" 19 #include "chrome/app/chrome_dll_resource.h"
20 #include "chrome/browser/automation/automation_provider.h" 20 #include "chrome/browser/automation/automation_provider.h"
21 #include "chrome/browser/debugger/devtools_toggle_action.h" 21 #include "chrome/browser/debugger/devtools_toggle_action.h"
22 #include "chrome/browser/debugger/devtools_window.h" 22 #include "chrome/browser/debugger/devtools_window.h"
23 #include "chrome/browser/file_select_helper.h"
23 #include "chrome/browser/history/history_tab_helper.h" 24 #include "chrome/browser/history/history_tab_helper.h"
24 #include "chrome/browser/history/history_types.h" 25 #include "chrome/browser/history/history_types.h"
25 #include "chrome/browser/infobars/infobar_tab_helper.h" 26 #include "chrome/browser/infobars/infobar_tab_helper.h"
26 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/repost_form_warning_controller.h" 28 #include "chrome/browser/repost_form_warning_controller.h"
28 #include "chrome/browser/themes/theme_service.h" 29 #include "chrome/browser/themes/theme_service.h"
29 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" 30 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
30 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 31 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
31 #include "chrome/browser/ui/browser.h" 32 #include "chrome/browser/ui/browser.h"
32 #include "chrome/browser/ui/browser_dialogs.h" 33 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 714
714 void ExternalTabContainer::ShowRepostFormWarningDialog( 715 void ExternalTabContainer::ShowRepostFormWarningDialog(
715 WebContents* source) { 716 WebContents* source) {
716 browser::ShowTabModalConfirmDialog( 717 browser::ShowTabModalConfirmDialog(
717 new RepostFormWarningController(source), 718 new RepostFormWarningController(source),
718 TabContentsWrapper::GetCurrentWrapperForContents(source)); 719 TabContentsWrapper::GetCurrentWrapperForContents(source));
719 } 720 }
720 721
721 void ExternalTabContainer::RunFileChooser( 722 void ExternalTabContainer::RunFileChooser(
722 WebContents* tab, const content::FileChooserParams& params) { 723 WebContents* tab, const content::FileChooserParams& params) {
723 Browser::RunFileChooserHelper(tab, params); 724 FileSelectHelper::RunFileChooser(tab, params);
724 } 725 }
725 726
726 void ExternalTabContainer::EnumerateDirectory(WebContents* tab, int request_id, 727 void ExternalTabContainer::EnumerateDirectory(WebContents* tab, int request_id,
727 const FilePath& path) { 728 const FilePath& path) {
728 Browser::EnumerateDirectoryHelper(tab, request_id, path); 729 FileSelectHelper::EnumerateDirectory(tab, request_id, path);
729 } 730 }
730 731
731 void ExternalTabContainer::JSOutOfMemory(WebContents* tab) { 732 void ExternalTabContainer::JSOutOfMemory(WebContents* tab) {
732 Browser::JSOutOfMemoryHelper(tab); 733 Browser::JSOutOfMemoryHelper(tab);
733 } 734 }
734 735
735 void ExternalTabContainer::RegisterProtocolHandler(WebContents* tab, 736 void ExternalTabContainer::RegisterProtocolHandler(WebContents* tab,
736 const std::string& protocol, 737 const std::string& protocol,
737 const GURL& url, 738 const GURL& url,
738 const string16& title) { 739 const string16& title) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 if (params.disposition == CURRENT_TAB) { 1202 if (params.disposition == CURRENT_TAB) {
1202 DCHECK(route_all_top_level_navigations_); 1203 DCHECK(route_all_top_level_navigations_);
1203 forward_params.disposition = NEW_FOREGROUND_TAB; 1204 forward_params.disposition = NEW_FOREGROUND_TAB;
1204 } 1205 }
1205 WebContents* new_contents = 1206 WebContents* new_contents =
1206 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1207 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1207 // support only one navigation for a dummy tab before it is killed. 1208 // support only one navigation for a dummy tab before it is killed.
1208 ::DestroyWindow(GetNativeView()); 1209 ::DestroyWindow(GetNativeView());
1209 return new_contents; 1210 return new_contents;
1210 } 1211 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/file_select_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698