OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "chrome/browser/ui/select_file_dialog.h" | 10 #include "chrome/browser/ui/select_file_dialog.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static void StopSkippingPickerForTest(); | 63 static void StopSkippingPickerForTest(); |
64 | 64 |
65 DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.chooseFile"); | 65 DECLARE_EXTENSION_FUNCTION_NAME("fileSystem.chooseFile"); |
66 | 66 |
67 protected: | 67 protected: |
68 class FilePicker; | 68 class FilePicker; |
69 | 69 |
70 virtual ~FileSystemChooseFileFunction() {} | 70 virtual ~FileSystemChooseFileFunction() {} |
71 virtual bool RunImpl() OVERRIDE; | 71 virtual bool RunImpl() OVERRIDE; |
72 bool ShowPicker(const FilePath& suggested_path, | 72 bool ShowPicker(const FilePath& suggested_path, |
| 73 const SelectFileDialog::FileTypeInfo& file_type_info, |
73 SelectFileDialog::Type picker_type, | 74 SelectFileDialog::Type picker_type, |
74 EntryType entry_type); | 75 EntryType entry_type); |
75 | 76 |
76 private: | 77 private: |
77 // FileSelected and FileSelectionCanceled are called by the file picker. | 78 // FileSelected and FileSelectionCanceled are called by the file picker. |
78 void FileSelected(const FilePath& path, EntryType entry_type); | 79 void FileSelected(const FilePath& path, EntryType entry_type); |
79 void FileSelectionCanceled(); | 80 void FileSelectionCanceled(); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace extensions | 83 } // namespace extensions |
83 | 84 |
84 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ |
OLD | NEW |