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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 | 233 |
234 protected: | 234 protected: |
235 virtual ~FileBrowserPrivateRequestDriveShareFunction() {} | 235 virtual ~FileBrowserPrivateRequestDriveShareFunction() {} |
236 virtual bool RunAsync() OVERRIDE; | 236 virtual bool RunAsync() OVERRIDE; |
237 | 237 |
238 private: | 238 private: |
239 // Called back after the drive file system operation is finished. | 239 // Called back after the drive file system operation is finished. |
240 void OnAddPermission(drive::FileError error); | 240 void OnAddPermission(drive::FileError error); |
241 }; | 241 }; |
242 | 242 |
243 // Implements the chrome.fileBrowserPrivate.getShareUrl method. | |
hashimoto
2014/07/09 07:48:57
s/getShareUrl/getDownloadUrl/
yoshiki
2014/07/11 13:48:50
Done.
| |
244 class FileBrowserPrivateGetDownloadUrlFunction | |
245 : public LoggedAsyncExtensionFunction { | |
246 public: | |
247 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDownloadUrl", | |
248 FILEBROWSERPRIVATE_GETSHAREURL) | |
249 | |
250 protected: | |
251 virtual ~FileBrowserPrivateGetDownloadUrlFunction() {} | |
252 | |
253 // AsyncExtensionFunction overrides. | |
254 virtual bool RunAsync() OVERRIDE; | |
255 | |
256 // Callback with an |download_url|, called by FileSystem::GetDownloadUrl. | |
257 void OnGetDownloadUrl(drive::FileError error, const GURL& download_url); | |
258 | |
259 // Callback with an |access_token|, called by | |
260 // drive::DriveReadonlyTokenFetcher. | |
261 void OnTokenFetched(google_apis::GDataErrorCode code, | |
262 const std::string& access_token); | |
263 | |
264 private: | |
265 std::string download_url_; | |
266 base::FilePath file_path_; | |
267 }; | |
268 | |
243 } // namespace extensions | 269 } // namespace extensions |
244 | 270 |
245 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ | 271 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DRIVE_H_ |
OLD | NEW |