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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 10692105: Updates file type selector for fileSystem API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge to head 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: chrome/browser/extensions/api/file_system/file_system_api.h
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
index 6977007d83811cdb99d5b47c559fac6f8a979e22..c2f65cf4e16b8ac8a42d14e7e4bacb374a588d7a 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -6,8 +6,11 @@
#define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/common/extensions/api/file_system.h"
#include "ui/base/dialogs/select_file_dialog.h"
+namespace file_system = extensions::api::file_system;
Mihai Parparita -not on Chrome 2012/07/31 22:26:10 Namespace aliases aren't allowed in the top level
benwells 2012/07/31 23:01:19 You could also have a typedef in FileSystemChooseF
thorogood 2012/08/03 02:58:02 I've taken the typedef option inside the class def
+
namespace extensions {
class FileSystemGetDisplayPathFunction : public SyncExtensionFunction {
@@ -72,12 +75,22 @@ class FileSystemChooseFileFunction : public FileSystemEntryFunction {
DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.chooseFile");
+ static void BuildFileTypeInfo(
+ ui::SelectFileDialog::FileTypeInfo* file_type_info,
+ const FilePath::StringType& suggested_extension,
+ const std::vector<linked_ptr<file_system::AcceptOption> >* accepts,
+ const bool* acceptsAllTypes);
+ static void BuildSuggestion(const std::string* opt_name,
+ FilePath* suggested_name,
+ FilePath::StringType* suggested_extension);
+
protected:
class FilePicker;
virtual ~FileSystemChooseFileFunction() {}
virtual bool RunImpl() OVERRIDE;
bool ShowPicker(const FilePath& suggested_path,
+ const ui::SelectFileDialog::FileTypeInfo& file_type_info,
ui::SelectFileDialog::Type picker_type,
EntryType entry_type);

Powered by Google App Engine
This is Rietveld 408576698