| 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 Drive specific API functions. | 5 // This file provides Drive specific API functions. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ |
| 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ | 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/drive/file_errors.h" | 10 #include "chrome/browser/chromeos/drive/file_errors.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 CancelFileTransfersFunction(); | 113 CancelFileTransfersFunction(); |
| 114 | 114 |
| 115 protected: | 115 protected: |
| 116 virtual ~CancelFileTransfersFunction(); | 116 virtual ~CancelFileTransfersFunction(); |
| 117 | 117 |
| 118 // AsyncExtensionFunction overrides. | 118 // AsyncExtensionFunction overrides. |
| 119 virtual bool RunImpl() OVERRIDE; | 119 virtual bool RunImpl() OVERRIDE; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 // Implements the chrome.fileBrowserPrivate.transferFile method. | |
| 123 class TransferFileFunction : public LoggedAsyncExtensionFunction { | |
| 124 public: | |
| 125 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.transferFile", | |
| 126 FILEBROWSERPRIVATE_TRANSFERFILE) | |
| 127 | |
| 128 TransferFileFunction(); | |
| 129 | |
| 130 protected: | |
| 131 virtual ~TransferFileFunction(); | |
| 132 | |
| 133 // AsyncExtensionFunction overrides. | |
| 134 virtual bool RunImpl() OVERRIDE; | |
| 135 | |
| 136 private: | |
| 137 // Helper callback for handling response from FileSystem::TransferFile(). | |
| 138 void OnTransferCompleted(drive::FileError error); | |
| 139 }; | |
| 140 | |
| 141 class SearchDriveFunction : public LoggedAsyncExtensionFunction { | 122 class SearchDriveFunction : public LoggedAsyncExtensionFunction { |
| 142 public: | 123 public: |
| 143 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.searchDrive", | 124 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.searchDrive", |
| 144 FILEBROWSERPRIVATE_SEARCHDRIVE) | 125 FILEBROWSERPRIVATE_SEARCHDRIVE) |
| 145 | 126 |
| 146 SearchDriveFunction(); | 127 SearchDriveFunction(); |
| 147 | 128 |
| 148 protected: | 129 protected: |
| 149 virtual ~SearchDriveFunction(); | 130 virtual ~SearchDriveFunction(); |
| 150 | 131 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 virtual bool RunImpl() OVERRIDE; | 220 virtual bool RunImpl() OVERRIDE; |
| 240 | 221 |
| 241 // Callback with an url to the sharing dialog as |share_url|, called by | 222 // Callback with an url to the sharing dialog as |share_url|, called by |
| 242 // FileSystem::GetShareUrl. | 223 // FileSystem::GetShareUrl. |
| 243 void OnGetShareUrl(drive::FileError error, const GURL& share_url); | 224 void OnGetShareUrl(drive::FileError error, const GURL& share_url); |
| 244 }; | 225 }; |
| 245 | 226 |
| 246 } // namespace file_manager | 227 } // namespace file_manager |
| 247 | 228 |
| 248 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ | 229 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ |
| OLD | NEW |