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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 13023002: Change chrome.filesystem to handle the Chrome OS Drive file entries directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More test fix. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 #include "chrome/common/extensions/api/file_system.h" 9 #include "chrome/common/extensions/api/file_system.h"
10 #include "ui/shell_dialogs/select_file_dialog.h" 10 #include "ui/shell_dialogs/select_file_dialog.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual ~FileSystemIsWritableEntryFunction() {} 66 virtual ~FileSystemIsWritableEntryFunction() {}
67 virtual bool RunImpl() OVERRIDE; 67 virtual bool RunImpl() OVERRIDE;
68 }; 68 };
69 69
70 class FileSystemChooseEntryFunction : public FileSystemEntryFunction { 70 class FileSystemChooseEntryFunction : public FileSystemEntryFunction {
71 public: 71 public:
72 // Allow picker UI to be skipped in testing. 72 // Allow picker UI to be skipped in testing.
73 static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path); 73 static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path);
74 static void SkipPickerAndAlwaysCancelForTest(); 74 static void SkipPickerAndAlwaysCancelForTest();
75 static void StopSkippingPickerForTest(); 75 static void StopSkippingPickerForTest();
76 static void RegisterTempExternalFileSystemForTest(const std::string& name,
benwells 2013/03/25 10:08:13 Could you add a comment here explaining when this
kinaba 2013/03/25 12:07:51 Done.
77 const base::FilePath& path);
76 78
77 DECLARE_EXTENSION_FUNCTION("fileSystem.chooseEntry", FILESYSTEM_CHOOSEENTRY) 79 DECLARE_EXTENSION_FUNCTION("fileSystem.chooseEntry", FILESYSTEM_CHOOSEENTRY)
78 80
79 typedef std::vector<linked_ptr<extensions::api::file_system::AcceptOption> > 81 typedef std::vector<linked_ptr<extensions::api::file_system::AcceptOption> >
80 AcceptOptions; 82 AcceptOptions;
81 83
82 static void BuildFileTypeInfo( 84 static void BuildFileTypeInfo(
83 ui::SelectFileDialog::FileTypeInfo* file_type_info, 85 ui::SelectFileDialog::FileTypeInfo* file_type_info,
84 const base::FilePath::StringType& suggested_extension, 86 const base::FilePath::StringType& suggested_extension,
85 const AcceptOptions* accepts, 87 const AcceptOptions* accepts,
(...skipping 14 matching lines...) Expand all
100 102
101 private: 103 private:
102 // FileSelected and FileSelectionCanceled are called by the file picker. 104 // FileSelected and FileSelectionCanceled are called by the file picker.
103 void FileSelected(const base::FilePath& path, EntryType entry_type); 105 void FileSelected(const base::FilePath& path, EntryType entry_type);
104 void FileSelectionCanceled(); 106 void FileSelectionCanceled();
105 }; 107 };
106 108
107 } // namespace extensions 109 } // namespace extensions
108 110
109 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 111 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698