| Index: chrome/browser/extensions/extension_file_browser_private_api.h | 
| =================================================================== | 
| --- chrome/browser/extensions/extension_file_browser_private_api.h	(revision 81212) | 
| +++ chrome/browser/extensions/extension_file_browser_private_api.h	(working copy) | 
| @@ -13,27 +13,62 @@ | 
| #include "base/file_path.h" | 
| #include "chrome/browser/extensions/extension_function.h" | 
| #include "chrome/browser/ui/shell_dialogs.h" | 
| +#include "googleurl/src/url_util.h" | 
| #include "webkit/fileapi/file_system_callback_dispatcher.h" | 
|  | 
| -// Implements the Chrome Extension local File API. | 
| +// Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. | 
| +class RequestLocalFileSystemFunctionBase : public AsyncExtensionFunction { | 
| + protected: | 
| +  friend class LocalFileSystemCallbackDispatcher; | 
| +  // AsyncExtensionFunction overrides. | 
| +  virtual bool RunImpl() OVERRIDE; | 
| +  void RespondSuccessOnUIThread(const std::string& name, | 
| +                                const FilePath& root_path, | 
| +                                const GURL& file_url); | 
| +  void RespondFailedOnUIThread(base::PlatformFileError error_code); | 
| +  void RequestOnFileThread(const GURL& source_url, const GURL& file_url); | 
| +}; | 
| + | 
| +// Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. | 
| class RequestLocalFileSystemFunction | 
| -    : public AsyncExtensionFunction { | 
| - public: | 
| -  RequestLocalFileSystemFunction(); | 
| +    : public RequestLocalFileSystemFunctionBase { | 
| + private: | 
| +  DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.requestLocalFileSystem"); | 
| +}; | 
|  | 
| +// Implements the chrome.fileBrowserPrivate.getFileTasks method. | 
| +class GetFileTasksFileBrowserFunction : public AsyncExtensionFunction { | 
| protected: | 
| -  virtual ~RequestLocalFileSystemFunction(); | 
| +  // AsyncExtensionFunction overrides. | 
| +  virtual bool RunImpl() OVERRIDE; | 
|  | 
| + private: | 
| + | 
| +  DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTasks"); | 
| +}; | 
| + | 
| + | 
| +// Implements the chrome.fileBrowserPrivate.executeTask method. | 
| +class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction { | 
| + protected: | 
| // AsyncExtensionFunction overrides. | 
| virtual bool RunImpl() OVERRIDE; | 
|  | 
| private: | 
| -  friend class LocalFileSystemCallbackDispatcher; | 
| -  void RespondSuccessOnUIThread(const std::string& name, | 
| -                                const FilePath& path); | 
| -  void RespondFailedOnUIThread(base::PlatformFileError error_code); | 
| +  // Grants access for local file system element represented by | 
| +  // |origin_file_url| from handler extension identified by | 
| +  // |handler_extension_id|. It also modifies |origin_file_url| to make it | 
| +  // usable within handler extension - replaces origin extension id with | 
| +  // handlers's. | 
| +  bool GrantLocalFileSystemAccess(const GURL& origin_file_url, | 
| +                                  const std::string& handler_extension_id, | 
| +                                  GURL* handler_file_url); | 
|  | 
| -  DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.requestLocalFileSystem"); | 
| +  // Executes context menu tasks for each element of |files_list|. | 
| +  bool ExecuteContextMenuTasks(const std::string& handler_extension_id, | 
| +                               const std::string& action_id, | 
| +                               ListValue* files_list); | 
| +  DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask"); | 
| }; | 
|  | 
| // Parent class for the chromium extension APIs for the file dialog. | 
|  |