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

Unified Diff: chrome/browser/ui/browser.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 987af6c2271b886ff7cef3465471b2785fb1e1a5..1f7d8eba00bda118c3e30868d5b9018239be938f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2504,34 +2504,6 @@ bool Browser::RunUnloadEventsHelper(WebContents* contents) {
}
// static
-void Browser::RunFileChooserHelper(
- WebContents* tab, const content::FileChooserParams& params) {
- Profile* profile =
- Profile::FromBrowserContext(tab->GetBrowserContext());
- // FileSelectHelper adds a reference to itself and only releases it after
- // sending the result message. It won't be destroyed when this reference
- // goes out of scope.
- scoped_refptr<FileSelectHelper> file_select_helper(
- new FileSelectHelper(profile));
- file_select_helper->RunFileChooser(tab->GetRenderViewHost(), tab, params);
-}
-
-// static
-void Browser::EnumerateDirectoryHelper(WebContents* tab, int request_id,
- const FilePath& path) {
- Profile* profile =
- Profile::FromBrowserContext(tab->GetBrowserContext());
- // FileSelectHelper adds a reference to itself and only releases it after
- // sending the result message. It won't be destroyed when this reference
- // goes out of scope.
- scoped_refptr<FileSelectHelper> file_select_helper(
- new FileSelectHelper(profile));
- file_select_helper->EnumerateDirectory(request_id,
- tab->GetRenderViewHost(),
- path);
-}
-
-// static
void Browser::JSOutOfMemoryHelper(WebContents* tab) {
TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
tab);
@@ -3889,12 +3861,13 @@ void Browser::DidEndColorChooser() {
void Browser::RunFileChooser(WebContents* tab,
const content::FileChooserParams& params) {
- RunFileChooserHelper(tab, params);
+ FileSelectHelper::RunFileChooser(tab, params);
}
-void Browser::EnumerateDirectory(WebContents* tab, int request_id,
+void Browser::EnumerateDirectory(WebContents* tab,
+ int request_id,
const FilePath& path) {
- EnumerateDirectoryHelper(tab, request_id, path);
+ FileSelectHelper::EnumerateDirectory(tab, request_id, path);
}
void Browser::ToggleFullscreenModeForTab(WebContents* tab,
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698