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

Unified Diff: ui/base/dialogs/gtk/select_file_dialog_impl.cc

Issue 10790083: shell dialogs: Move the linux implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 8 years, 5 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
Index: ui/base/dialogs/gtk/select_file_dialog_impl.cc
diff --git a/chrome/browser/ui/gtk/select_file_dialog_impl.cc b/ui/base/dialogs/gtk/select_file_dialog_impl.cc
similarity index 88%
rename from chrome/browser/ui/gtk/select_file_dialog_impl.cc
rename to ui/base/dialogs/gtk/select_file_dialog_impl.cc
index 8d02cdc03f63421e33b5b2cf8babfaf31cf3228d..0ec03e93cc2fa3cec9df23445fcd9baa3825ce17 100644
--- a/chrome/browser/ui/gtk/select_file_dialog_impl.cc
+++ b/ui/base/dialogs/gtk/select_file_dialog_impl.cc
@@ -4,15 +4,12 @@
//
// This file implements common select dialog functionality between GTK and KDE.
-#include "chrome/browser/ui/gtk/select_file_dialog_impl.h"
+#include "ui/base/dialogs/gtk/select_file_dialog_impl.h"
#include "base/environment.h"
#include "base/file_util.h"
#include "base/nix/xdg_util.h"
#include "base/threading/thread_restrictions.h"
-#include "content/public/browser/browser_thread.h"
-
-using content::BrowserThread;
namespace {
@@ -26,13 +23,15 @@ UseKdeFileDialogStatus use_kde_ = UNKNOWN;
} // namespace
+namespace ui {
+
FilePath* SelectFileDialogImpl::last_saved_path_ = NULL;
FilePath* SelectFileDialogImpl::last_opened_path_ = NULL;
// static
-SelectFileDialog* SelectFileDialog::Create(Listener* listener,
- ui::SelectFilePolicy* policy) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+SelectFileDialog* CreateLinuxSelectFileDialog(
+ SelectFileDialog::Listener* listener,
+ SelectFilePolicy* policy) {
if (use_kde_ == UNKNOWN) {
// Start out assumimg we are not going to use KDE.
use_kde_ = NO_KDE;
@@ -88,3 +87,5 @@ bool SelectFileDialogImpl::CallDirectoryExistsOnUIThread(const FilePath& path) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
return file_util::DirectoryExists(path);
}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698