| 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 // File contains the fileBrowserHandlerInternal.selectFile extension function. | 5 // File contains the fileBrowserHandlerInternal.selectFile extension function. |
| 6 // The function prompts user to select a file path to be used by the caller. It | 6 // The function prompts user to select a file path to be used by the caller. It |
| 7 // will fail if it isn't invoked by a user gesture (e.g. a mouse click or a | 7 // will fail if it isn't invoked by a user gesture (e.g. a mouse click or a |
| 8 // keyboard key press). | 8 // keyboard key press). |
| 9 // Note that the target file is never actually created by this function, even | 9 // Note that the target file is never actually created by this function, even |
| 10 // if the selected path doesn't exist. | 10 // if the selected path doesn't exist. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // * boolean 'success', which will be equal to |success|. | 124 // * boolean 'success', which will be equal to |success|. |
| 125 // * object 'entry', which will be set only when |success| is true, and the | 125 // * object 'entry', which will be set only when |success| is true, and the |
| 126 // conversion to |entry_definition| was successful. In such case, it will | 126 // conversion to |entry_definition| was successful. In such case, it will |
| 127 // contain information needed to create a FileEntry object for the selected | 127 // contain information needed to create a FileEntry object for the selected |
| 128 // file. | 128 // file. |
| 129 void Respond(const file_manager::util::EntryDefinition& entry_definition, | 129 void Respond(const file_manager::util::EntryDefinition& entry_definition, |
| 130 bool success); | 130 bool success); |
| 131 | 131 |
| 132 // Factory used to create FileSelector to be used for prompting user to select | 132 // Factory used to create FileSelector to be used for prompting user to select |
| 133 // file. | 133 // file. |
| 134 scoped_ptr<file_manager::FileSelectorFactory> file_selector_factory_; | 134 std::unique_ptr<file_manager::FileSelectorFactory> file_selector_factory_; |
| 135 // Whether user gesture check is disabled. This should be true only in tests. | 135 // Whether user gesture check is disabled. This should be true only in tests. |
| 136 bool user_gesture_check_enabled_; | 136 bool user_gesture_check_enabled_; |
| 137 | 137 |
| 138 // List of permissions and paths that have to be granted for the selected | 138 // List of permissions and paths that have to be granted for the selected |
| 139 // files. | 139 // files. |
| 140 std::vector<std::pair<base::FilePath, int> > permissions_to_grant_; | 140 std::vector<std::pair<base::FilePath, int> > permissions_to_grant_; |
| 141 | 141 |
| 142 DECLARE_EXTENSION_FUNCTION("fileBrowserHandlerInternal.selectFile", | 142 DECLARE_EXTENSION_FUNCTION("fileBrowserHandlerInternal.selectFile", |
| 143 FILEBROWSERHANDLERINTERNAL_SELECTFILE) | 143 FILEBROWSERHANDLERINTERNAL_SELECTFILE) |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLER_
API_H_ | 146 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLER_
API_H_ |
| OLD | NEW |