| 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_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <queue> | 9 #include <queue> | 
| 10 #include <string> | 10 #include <string> | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 22 | 22 | 
| 23 class GURL; | 23 class GURL; | 
| 24 class Profile; | 24 class Profile; | 
| 25 | 25 | 
| 26 namespace base { | 26 namespace base { | 
| 27 class Value; | 27 class Value; | 
| 28 } | 28 } | 
| 29 | 29 | 
| 30 namespace fileapi { | 30 namespace fileapi { | 
| 31 class FileSystemContext; | 31 class FileSystemContext; | 
|  | 32 class FileSystemURL; | 
| 32 } | 33 } | 
| 33 | 34 | 
| 34 namespace drive { | 35 namespace drive { | 
| 35 struct SearchResultInfo; | 36 struct SearchResultInfo; | 
| 36 class DriveCacheEntry; | 37 class DriveCacheEntry; | 
| 37 struct DriveWebAppInfo; | 38 struct DriveWebAppInfo; | 
| 38 class DriveWebAppsRegistry; | 39 class DriveWebAppsRegistry; | 
| 39 } | 40 } | 
| 40 | 41 | 
| 41 namespace ui { | 42 namespace ui { | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 95       const FilePath& local_path, const FilePath& virtual_path, | 96       const FilePath& local_path, const FilePath& virtual_path, | 
| 96       const std::string& extension_id) = 0; | 97       const std::string& extension_id) = 0; | 
| 97 | 98 | 
| 98   // AsyncExtensionFunction overrides. | 99   // AsyncExtensionFunction overrides. | 
| 99   virtual bool RunImpl() OVERRIDE; | 100   virtual bool RunImpl() OVERRIDE; | 
| 100 | 101 | 
| 101  private: | 102  private: | 
| 102   void RespondOnUIThread(bool success); | 103   void RespondOnUIThread(bool success); | 
| 103   void RunFileWatchOperationOnFileThread( | 104   void RunFileWatchOperationOnFileThread( | 
| 104       scoped_refptr<FileBrowserEventRouter> event_router, | 105       scoped_refptr<FileBrowserEventRouter> event_router, | 
| 105       const GURL& file_url, | 106       const fileapi::FileSystemURL& file_url, | 
| 106       const std::string& extension_id); | 107       const std::string& extension_id); | 
| 107 }; | 108 }; | 
| 108 | 109 | 
| 109 // Implements the chrome.fileBrowserPrivate.addFileWatch method. | 110 // Implements the chrome.fileBrowserPrivate.addFileWatch method. | 
| 110 class AddFileWatchBrowserFunction : public FileWatchBrowserFunctionBase { | 111 class AddFileWatchBrowserFunction : public FileWatchBrowserFunctionBase { | 
| 111  public: | 112  public: | 
| 112   DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addFileWatch"); | 113   DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addFileWatch"); | 
| 113 | 114 | 
| 114  protected: | 115  protected: | 
| 115   virtual ~AddFileWatchBrowserFunction() {} | 116   virtual ~AddFileWatchBrowserFunction() {} | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 188 | 189 | 
| 189   // Find the list of drive apps that can be used with the given file types. If | 190   // Find the list of drive apps that can be used with the given file types. If | 
| 190   // a default task is set in the result list, then |default_already_set| is set | 191   // a default task is set in the result list, then |default_already_set| is set | 
| 191   // to true. | 192   // to true. | 
| 192   bool FindDriveAppTasks(const FileInfoList& file_info_list, | 193   bool FindDriveAppTasks(const FileInfoList& file_info_list, | 
| 193                          ListValue* result_list, | 194                          ListValue* result_list, | 
| 194                          bool* default_already_set); | 195                          bool* default_already_set); | 
| 195 | 196 | 
| 196   // Find the list of Web Intent tasks that can be used with the given file | 197   // Find the list of Web Intent tasks that can be used with the given file | 
| 197   // types, appending them to the |result_list|. | 198   // types, appending them to the |result_list|. | 
| 198   bool FindWebIntentTasks(const std::vector<GURL>& file_urls, | 199   bool FindWebIntentTasks(const std::vector<FilePath>& file_paths, | 
| 199                           ListValue* result_list); | 200                           ListValue* result_list); | 
| 200 | 201 | 
| 201   // Find the list of app file handlers that can be used with the given file | 202   // Find the list of app file handlers that can be used with the given file | 
| 202   // types, appending them to the |result_list|. | 203   // types, appending them to the |result_list|. | 
| 203   bool FindAppTasks(const std::vector<GURL>& file_urls, | 204   bool FindAppTasks(const std::vector<FilePath>& file_paths, | 
| 204                     ListValue* result_list); | 205                     ListValue* result_list); | 
| 205 }; | 206 }; | 
| 206 | 207 | 
| 207 // Implements the chrome.fileBrowserPrivate.executeTask method. | 208 // Implements the chrome.fileBrowserPrivate.executeTask method. | 
| 208 class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction { | 209 class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction { | 
| 209  public: | 210  public: | 
| 210   DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask"); | 211   DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask"); | 
| 211 | 212 | 
| 212   ExecuteTasksFileBrowserFunction(); | 213   ExecuteTasksFileBrowserFunction(); | 
| 213 | 214 | 
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 796   virtual bool RunImpl() OVERRIDE; | 797   virtual bool RunImpl() OVERRIDE; | 
| 797 | 798 | 
| 798   // extensions::ZipFileCreator::Delegate overrides. | 799   // extensions::ZipFileCreator::Delegate overrides. | 
| 799   virtual void OnZipDone(bool success) OVERRIDE; | 800   virtual void OnZipDone(bool success) OVERRIDE; | 
| 800 | 801 | 
| 801  private: | 802  private: | 
| 802   scoped_refptr<extensions::ZipFileCreator> zip_file_creator_; | 803   scoped_refptr<extensions::ZipFileCreator> zip_file_creator_; | 
| 803 }; | 804 }; | 
| 804 | 805 | 
| 805 #endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 806 #endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 
| OLD | NEW | 
|---|