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

Unified Diff: chrome/browser/gtk/dialogs_gtk.cc

Issue 63093: Refactoring; switch the |filter| parameter into something that is more amenab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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/download/save_package.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/dialogs_gtk.cc
===================================================================
--- chrome/browser/gtk/dialogs_gtk.cc (revision 13572)
+++ chrome/browser/gtk/dialogs_gtk.cc (working copy)
@@ -30,12 +30,13 @@
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFile(Type type, const string16& title,
+ virtual void SelectFile(Type type,
+ const string16& title,
const FilePath& default_path,
- const std::wstring& filter,
- int filter_index,
+ const FileTypeInfo* file_types,
+ int file_type_index,
const FilePath::StringType& default_extension,
- gfx::NativeWindow parent_window,
+ gfx::NativeWindow owning_window,
void* params);
private:
@@ -114,21 +115,21 @@
listener_ = NULL;
}
-// We ignore |filter| and |default_extension|.
-// TODO(estade): use |filter|.
+// We ignore |file_types| and |default_extension|.
+// TODO(estade): use |file_types|.
void SelectFileDialogImpl::SelectFile(
Type type,
const string16& title,
const FilePath& default_path,
- const std::wstring& filter,
- int filter_index,
+ const FileTypeInfo* file_types,
+ int file_type_index,
const FilePath::StringType& default_extension,
- gfx::NativeWindow parent_window,
+ gfx::NativeWindow owning_window,
void* params) {
// TODO(estade): on windows, parent_window may be null. But I'm not sure when
// that's used and how to deal with it here. For now, don't allow it.
- DCHECK(parent_window);
- parents_.insert(parent_window);
+ DCHECK(owning_window);
+ parents_.insert(owning_window);
std::string title_string = UTF16ToUTF8(title);
@@ -136,14 +137,14 @@
switch (type) {
case SELECT_OPEN_FILE:
DCHECK(default_path.empty());
- dialog = CreateFileOpenDialog(title_string, parent_window);
+ dialog = CreateFileOpenDialog(title_string, owning_window);
break;
case SELECT_OPEN_MULTI_FILE:
DCHECK(default_path.empty());
- dialog = CreateMultiFileOpenDialog(title_string, parent_window);
+ dialog = CreateMultiFileOpenDialog(title_string, owning_window);
break;
case SELECT_SAVEAS_FILE:
- dialog = CreateSaveAsDialog(title_string, default_path, parent_window);
+ dialog = CreateSaveAsDialog(title_string, default_path, owning_window);
break;
default:
NOTIMPLEMENTED() << "Dialog type " << type << " not implemented.";
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698