| 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_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/gdata/operations_base.h" | 10 #include "chrome/browser/chromeos/gdata/operations_base.h" |
| 11 // TODO(kochi): Further split gdata_operations.h and include only necessary | 11 // TODO(kochi): Further split gdata_operations.h and include only necessary |
| 12 // headers. http://crbug.com/141469 | 12 // headers. http://crbug.com/141469 |
| 13 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams | 13 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams |
| 14 #include "chrome/browser/chromeos/gdata/gdata_operations.h" | 14 #include "chrome/browser/chromeos/gdata/gdata_operations.h" |
| 15 | 15 |
| 16 class Profile; | 16 class Profile; |
| 17 | 17 |
| 18 namespace gdata { | 18 namespace gdata { |
| 19 | 19 |
| 20 class GDataOperationRegistry; | 20 class OperationRegistry; |
| 21 | 21 |
| 22 // Document export format. | 22 // Document export format. |
| 23 enum DocumentExportFormat { | 23 enum DocumentExportFormat { |
| 24 PDF, // Portable Document Format. (all documents) | 24 PDF, // Portable Document Format. (all documents) |
| 25 PNG, // Portable Networks Graphic Image Format (all documents) | 25 PNG, // Portable Networks Graphic Image Format (all documents) |
| 26 HTML, // HTML Format (text documents and spreadsheets). | 26 HTML, // HTML Format (text documents and spreadsheets). |
| 27 TXT, // Text file (text documents and presentations). | 27 TXT, // Text file (text documents and presentations). |
| 28 DOC, // Word (text documents only). | 28 DOC, // Word (text documents only). |
| 29 ODT, // Open Document Format (text documents only). | 29 ODT, // Open Document Format (text documents only). |
| 30 RTF, // Rich Text Format (text documents only). | 30 RTF, // Rich Text Format (text documents only). |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 class DriveServiceInterface { | 52 class DriveServiceInterface { |
| 53 public: | 53 public: |
| 54 virtual ~DriveServiceInterface() {} | 54 virtual ~DriveServiceInterface() {} |
| 55 | 55 |
| 56 // Common service: | 56 // Common service: |
| 57 | 57 |
| 58 // Initializes the documents service tied with |profile|. | 58 // Initializes the documents service tied with |profile|. |
| 59 virtual void Initialize(Profile* profile) = 0; | 59 virtual void Initialize(Profile* profile) = 0; |
| 60 | 60 |
| 61 // Retrieves the operation registry. | 61 // Retrieves the operation registry. |
| 62 virtual GDataOperationRegistry* operation_registry() const = 0; | 62 virtual OperationRegistry* operation_registry() const = 0; |
| 63 | 63 |
| 64 // Cancels all in-flight operations. | 64 // Cancels all in-flight operations. |
| 65 virtual void CancelAll() = 0; | 65 virtual void CancelAll() = 0; |
| 66 | 66 |
| 67 // Authentication service: | 67 // Authentication service: |
| 68 | 68 |
| 69 // Authenticates the user by fetching the auth token as | 69 // Authenticates the user by fetching the auth token as |
| 70 // needed. |callback| will be run with the error code and the auth | 70 // needed. |callback| will be run with the error code and the auth |
| 71 // token, on the thread this function is run. | 71 // token, on the thread this function is run. |
| 72 virtual void Authenticate(const AuthStatusCallback& callback) = 0; | 72 virtual void Authenticate(const AuthStatusCallback& callback) = 0; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Authorizes a Drive app with the id |app_id| to open the given document. | 194 // Authorizes a Drive app with the id |app_id| to open the given document. |
| 195 // Upon completion, invokes |callback| with results on the calling thread. | 195 // Upon completion, invokes |callback| with results on the calling thread. |
| 196 virtual void AuthorizeApp(const GURL& resource_url, | 196 virtual void AuthorizeApp(const GURL& resource_url, |
| 197 const std::string& app_id, | 197 const std::string& app_id, |
| 198 const GetDataCallback& callback) = 0; | 198 const GetDataCallback& callback) = 0; |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 } // namespace gdata | 201 } // namespace gdata |
| 202 | 202 |
| 203 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 203 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| OLD | NEW |