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

Unified Diff: ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
index 7175a508e35025d0c354694fba1334ffa660ee42..f22c06bd300b81fd940e2a2e1467caee5a82d702 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
@@ -47,14 +47,15 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) OVERRIDE;
private:
virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
@@ -63,11 +64,11 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
void AddFilters(GtkFileChooser* chooser);
// Notifies the listener that a single file was chosen.
- void FileSelected(GtkWidget* dialog, const FilePath& path);
+ void FileSelected(GtkWidget* dialog, const base::FilePath& path);
// Notifies the listener that multiple files were chosen.
void MultiFilesSelected(GtkWidget* dialog,
- const std::vector<FilePath>& files);
+ const std::vector<base::FilePath>& files);
// Notifies the listener that no file was chosen (the action was canceled).
// Dialog is passed so we can find that |params| pointer that was passed to
@@ -75,16 +76,16 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
void FileNotSelected(GtkWidget* dialog);
GtkWidget* CreateSelectFolderDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateFileOpenDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateMultiFileOpenDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateSaveAsDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
// Removes and returns the |params| associated with |dialog| from
// |params_map_|.
@@ -105,7 +106,7 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
// Common function for CreateFileOpenDialog and CreateMultiFileOpenDialog.
GtkWidget* CreateFileOpenHelper(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent);
// Callback for when the user responds to a Save As or Open File dialog.
@@ -166,10 +167,10 @@ bool SelectFileDialogImplGTK::HasMultipleFileTypeChoicesImpl() {
void SelectFileDialogImplGTK::SelectFileImpl(
Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) {
type_ = type;
@@ -285,7 +286,7 @@ void SelectFileDialogImplGTK::AddFilters(GtkFileChooser* chooser) {
}
void SelectFileDialogImplGTK::FileSelected(GtkWidget* dialog,
- const FilePath& path) {
+ const base::FilePath& path) {
if (type_ == SELECT_SAVEAS_FILE)
*last_saved_path_ = path.DirName();
else if (type_ == SELECT_OPEN_FILE || type_ == SELECT_FOLDER)
@@ -305,7 +306,7 @@ void SelectFileDialogImplGTK::FileSelected(GtkWidget* dialog,
}
void SelectFileDialogImplGTK::MultiFilesSelected(GtkWidget* dialog,
- const std::vector<FilePath>& files) {
+ const std::vector<base::FilePath>& files) {
*last_opened_path_ = files[0].DirName();
if (listener_)
@@ -322,7 +323,7 @@ void SelectFileDialogImplGTK::FileNotSelected(GtkWidget* dialog) {
GtkWidget* SelectFileDialogImplGTK::CreateFileOpenHelper(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
GtkWidget* dialog =
gtk_file_chooser_dialog_new(title.c_str(), parent,
@@ -351,7 +352,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateFileOpenHelper(
GtkWidget* SelectFileDialogImplGTK::CreateSelectFolderDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_SELECT_FOLDER_DIALOG_TITLE);
@@ -378,7 +379,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateSelectFolderDialog(
GtkWidget* SelectFileDialogImplGTK::CreateFileOpenDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_OPEN_FILE_DIALOG_TITLE);
@@ -392,7 +393,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateFileOpenDialog(
GtkWidget* SelectFileDialogImplGTK::CreateMultiFileOpenDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_OPEN_FILES_DIALOG_TITLE);
@@ -405,7 +406,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateMultiFileOpenDialog(
}
GtkWidget* SelectFileDialogImplGTK::CreateSaveAsDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent) {
+ const base::FilePath& default_path, gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE);
@@ -493,7 +494,7 @@ void SelectFileDialogImplGTK::SelectSingleFileHelper(GtkWidget* dialog,
return;
}
- FilePath path(filename);
+ base::FilePath path(filename);
g_free(filename);
if (allow_folder) {
@@ -530,9 +531,9 @@ void SelectFileDialogImplGTK::OnSelectMultiFileDialogResponse(GtkWidget* dialog,
return;
}
- std::vector<FilePath> filenames_fp;
+ std::vector<base::FilePath> filenames_fp;
for (GSList* iter = filenames; iter != NULL; iter = g_slist_next(iter)) {
- FilePath path(static_cast<char*>(iter->data));
+ base::FilePath path(static_cast<char*>(iter->data));
g_free(iter->data);
if (CallDirectoryExistsOnUIThread(path))
continue;
« no previous file with comments | « ui/shell_dialogs/gtk/select_file_dialog_impl.cc ('k') | ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698