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

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: Patch #23 broken Created 8 years, 4 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 | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eee8f15b55c870bc400b875fab347b1fc51f6247 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -6,6 +6,7 @@
#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 extensions {
@@ -72,12 +73,25 @@ class FileSystemChooseFileFunction : public FileSystemEntryFunction {
DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.chooseFile");
+ typedef std::vector<linked_ptr<extensions::api::file_system::AcceptOption> >
+ AcceptOptions;
+
+ static void BuildFileTypeInfo(
+ ui::SelectFileDialog::FileTypeInfo* file_type_info,
+ const FilePath::StringType& suggested_extension,
+ const AcceptOptions* 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);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698