| 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_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_API
_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 virtual ~PinDriveFileFunction(); | 553 virtual ~PinDriveFileFunction(); |
| 554 | 554 |
| 555 // AsyncExtensionFunction overrides. | 555 // AsyncExtensionFunction overrides. |
| 556 virtual bool RunImpl() OVERRIDE; | 556 virtual bool RunImpl() OVERRIDE; |
| 557 | 557 |
| 558 private: | 558 private: |
| 559 // Callback for RunImpl(). | 559 // Callback for RunImpl(). |
| 560 void OnPinStateSet(drive::FileError error); | 560 void OnPinStateSet(drive::FileError error); |
| 561 }; | 561 }; |
| 562 | 562 |
| 563 // Get gdata files for the given list of file URLs. Initiate downloading of | 563 // Get drive files for the given list of file URLs. Initiate downloading of |
| 564 // gdata files if these are not cached. Return a list of local file names. | 564 // drive files if these are not cached. Return a list of local file names. |
| 565 // This function puts empty strings instead of local paths for files could | 565 // This function puts empty strings instead of local paths for files could |
| 566 // not be obtained. For instance, this can happen if the user specifies a new | 566 // not be obtained. For instance, this can happen if the user specifies a new |
| 567 // file name to save a file on gdata. There may be other reasons to fail. The | 567 // file name to save a file on drive. There may be other reasons to fail. The |
| 568 // file manager should check if the local paths returned from getDriveFiles() | 568 // file manager should check if the local paths returned from getDriveFiles() |
| 569 // contain empty paths. | 569 // contain empty paths. |
| 570 // TODO(satorux): Should we propagate error types to the JavasScript layer? | 570 // TODO(satorux): Should we propagate error types to the JavaScript layer? |
| 571 class GetDriveFilesFunction : public FileBrowserFunction { | 571 class GetDriveFilesFunction : public FileBrowserFunction { |
| 572 public: | 572 public: |
| 573 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDriveFiles", | 573 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getDriveFiles", |
| 574 FILEBROWSERPRIVATE_GETDRIVEFILES) | 574 FILEBROWSERPRIVATE_GETDRIVEFILES) |
| 575 | 575 |
| 576 GetDriveFilesFunction(); | 576 GetDriveFilesFunction(); |
| 577 | 577 |
| 578 protected: | 578 protected: |
| 579 virtual ~GetDriveFilesFunction(); | 579 virtual ~GetDriveFilesFunction(); |
| 580 | 580 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 779 |
| 780 // AsyncExtensionFunction overrides. | 780 // AsyncExtensionFunction overrides. |
| 781 virtual bool RunImpl() OVERRIDE; | 781 virtual bool RunImpl() OVERRIDE; |
| 782 | 782 |
| 783 // Received the cached auth token (if available) or the fetched one. | 783 // Received the cached auth token (if available) or the fetched one. |
| 784 void OnAccessTokenFetched(google_apis::GDataErrorCode code, | 784 void OnAccessTokenFetched(google_apis::GDataErrorCode code, |
| 785 const std::string& access_token); | 785 const std::string& access_token); |
| 786 }; | 786 }; |
| 787 | 787 |
| 788 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ | 788 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_FILE_BROWSER_PRIVATE_
API_H_ |
| OLD | NEW |