OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file provides utility functions for file browser handlers. | 5 // This file provides utility functions for file browser handlers. |
6 // https://developer.chrome.com/extensions/fileBrowserHandler.html | 6 // https://developer.chrome.com/extensions/fileBrowserHandler.html |
7 | 7 |
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_ | 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_ |
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_ | 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_ |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace fileapi { | 31 namespace fileapi { |
32 class FileSystemURL; | 32 class FileSystemURL; |
33 } | 33 } |
34 | 34 |
35 namespace file_manager { | 35 namespace file_manager { |
36 namespace file_browser_handlers { | 36 namespace file_browser_handlers { |
37 | 37 |
38 // Tasks are stored as a vector in order of priorities. | 38 // Tasks are stored as a vector in order of priorities. |
39 typedef std::vector<const FileBrowserHandler*> FileBrowserHandlerList; | 39 typedef std::vector<const FileBrowserHandler*> FileBrowserHandlerList; |
40 | 40 |
41 // Returns true if the given file browser handler should be used as a | 41 // Returns true if the given task is a fallback file browser handler. Such |
42 // fallback. Such handlers are Files.app's internal handlers as well as quick | 42 // handlers are Files.app's internal handlers as well as quick office |
43 // office extensions. | 43 // extensions. |
44 bool IsFallbackFileBrowserHandler(const FileBrowserHandler* handler); | 44 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task); |
45 | 45 |
46 // Finds file browser handlers set as default from |common_tasks| for | 46 // Finds file browser handlers set as default from |common_tasks| for |
47 // |file_list|. If no handlers are set as default, choose the the firstly | 47 // |file_list|. If no handlers are set as default, choose the the firstly |
48 // found fallback handler as default. | 48 // found fallback handler as default. |
49 FileBrowserHandlerList FindDefaultFileBrowserHandlers( | 49 FileBrowserHandlerList FindDefaultFileBrowserHandlers( |
50 const PrefService& pref_service, | 50 const PrefService& pref_service, |
51 const std::vector<base::FilePath>& file_list, | 51 const std::vector<base::FilePath>& file_list, |
52 const FileBrowserHandlerList& common_tasks); | 52 const FileBrowserHandlerList& common_tasks); |
53 | 53 |
54 // Returns the list of file browser handlers that can open all files in | 54 // Returns the list of file browser handlers that can open all files in |
(...skipping 21 matching lines...) Expand all Loading... |
76 const extensions::Extension* extension, | 76 const extensions::Extension* extension, |
77 int32 tab_id, | 77 int32 tab_id, |
78 const std::string& action_id, | 78 const std::string& action_id, |
79 const std::vector<fileapi::FileSystemURL>& file_urls, | 79 const std::vector<fileapi::FileSystemURL>& file_urls, |
80 const file_tasks::FileTaskFinishedCallback& done); | 80 const file_tasks::FileTaskFinishedCallback& done); |
81 | 81 |
82 } // namespace file_browser_handlers | 82 } // namespace file_browser_handlers |
83 } // namespace file_manager | 83 } // namespace file_manager |
84 | 84 |
85 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS
_H_ | 85 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_HANDLERS
_H_ |
OLD | NEW |