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_GOOGLE_APIS_DRIVE_API_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_SERVICE_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_SERVICE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "chrome/browser/google_apis/auth_service.h" | 12 #include "chrome/browser/google_apis/auth_service.h" |
13 #include "chrome/browser/google_apis/auth_service_observer.h" | 13 #include "chrome/browser/google_apis/auth_service_observer.h" |
14 #include "chrome/browser/google_apis/drive_api_url_generator.h" | 14 #include "chrome/browser/google_apis/drive_api_url_generator.h" |
15 #include "chrome/browser/google_apis/drive_service_interface.h" | 15 #include "chrome/browser/google_apis/drive_service_interface.h" |
16 | 16 |
17 class FilePath; | |
18 class GURL; | 17 class GURL; |
19 class Profile; | 18 class Profile; |
20 | 19 |
| 20 namespace base { |
| 21 class FilePath; |
| 22 } |
| 23 |
21 namespace net { | 24 namespace net { |
22 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
23 } // namespace net | 26 } // namespace net |
24 | 27 |
25 namespace google_apis { | 28 namespace google_apis { |
26 class OperationRunner; | 29 class OperationRunner; |
27 | 30 |
28 // This class provides documents feed service calls for Drive V2 API. | 31 // This class provides documents feed service calls for Drive V2 API. |
29 // Details of API call are abstracted in each operation class and this class | 32 // Details of API call are abstracted in each operation class and this class |
30 // works as a thin wrapper for the API. | 33 // works as a thin wrapper for the API. |
(...skipping 13 matching lines...) Expand all Loading... |
44 const GURL& base_url, | 47 const GURL& base_url, |
45 const std::string& custom_user_agent); | 48 const std::string& custom_user_agent); |
46 virtual ~DriveAPIService(); | 49 virtual ~DriveAPIService(); |
47 | 50 |
48 // DriveServiceInterface Overrides | 51 // DriveServiceInterface Overrides |
49 virtual void Initialize(Profile* profile) OVERRIDE; | 52 virtual void Initialize(Profile* profile) OVERRIDE; |
50 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; | 53 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; |
51 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; | 54 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; |
52 virtual bool CanStartOperation() const OVERRIDE; | 55 virtual bool CanStartOperation() const OVERRIDE; |
53 virtual void CancelAll() OVERRIDE; | 56 virtual void CancelAll() OVERRIDE; |
54 virtual bool CancelForFilePath(const FilePath& file_path) OVERRIDE; | 57 virtual bool CancelForFilePath(const base::FilePath& file_path) OVERRIDE; |
55 virtual OperationProgressStatusList GetProgressStatusList() const OVERRIDE; | 58 virtual OperationProgressStatusList GetProgressStatusList() const OVERRIDE; |
56 virtual bool HasAccessToken() const OVERRIDE; | 59 virtual bool HasAccessToken() const OVERRIDE; |
57 virtual bool HasRefreshToken() const OVERRIDE; | 60 virtual bool HasRefreshToken() const OVERRIDE; |
58 virtual std::string GetRootResourceId() const OVERRIDE; | 61 virtual std::string GetRootResourceId() const OVERRIDE; |
59 virtual void GetResourceList( | 62 virtual void GetResourceList( |
60 const GURL& feed_url, | 63 const GURL& feed_url, |
61 int64 start_changestamp, | 64 int64 start_changestamp, |
62 const std::string& search_query, | 65 const std::string& search_query, |
63 bool shared_with_me, | 66 bool shared_with_me, |
64 const std::string& directory_resource_id, | 67 const std::string& directory_resource_id, |
65 const GetResourceListCallback& callback) OVERRIDE; | 68 const GetResourceListCallback& callback) OVERRIDE; |
66 virtual void GetResourceEntry( | 69 virtual void GetResourceEntry( |
67 const std::string& resource_id, | 70 const std::string& resource_id, |
68 const GetResourceEntryCallback& callback) OVERRIDE; | 71 const GetResourceEntryCallback& callback) OVERRIDE; |
69 | 72 |
70 virtual void GetAccountMetadata( | 73 virtual void GetAccountMetadata( |
71 const GetAccountMetadataCallback& callback) OVERRIDE; | 74 const GetAccountMetadataCallback& callback) OVERRIDE; |
72 virtual void GetAppList(const GetAppListCallback& callback) OVERRIDE; | 75 virtual void GetAppList(const GetAppListCallback& callback) OVERRIDE; |
73 virtual void DeleteResource( | 76 virtual void DeleteResource( |
74 const std::string& resource_id, | 77 const std::string& resource_id, |
75 const EntryActionCallback& callback) OVERRIDE; | 78 const EntryActionCallback& callback) OVERRIDE; |
76 virtual void DownloadFile( | 79 virtual void DownloadFile( |
77 const FilePath& virtual_path, | 80 const base::FilePath& virtual_path, |
78 const FilePath& local_cache_path, | 81 const base::FilePath& local_cache_path, |
79 const GURL& content_url, | 82 const GURL& content_url, |
80 const DownloadActionCallback& download_action_callback, | 83 const DownloadActionCallback& download_action_callback, |
81 const GetContentCallback& get_content_callback) OVERRIDE; | 84 const GetContentCallback& get_content_callback) OVERRIDE; |
82 virtual void CopyHostedDocument( | 85 virtual void CopyHostedDocument( |
83 const std::string& resource_id, | 86 const std::string& resource_id, |
84 const std::string& new_name, | 87 const std::string& new_name, |
85 const GetResourceEntryCallback& callback) OVERRIDE; | 88 const GetResourceEntryCallback& callback) OVERRIDE; |
86 virtual void RenameResource( | 89 virtual void RenameResource( |
87 const std::string& resource_id, | 90 const std::string& resource_id, |
88 const std::string& new_name, | 91 const std::string& new_name, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 ObserverList<DriveServiceObserver> observers_; | 149 ObserverList<DriveServiceObserver> observers_; |
147 DriveApiUrlGenerator url_generator_; | 150 DriveApiUrlGenerator url_generator_; |
148 const std::string custom_user_agent_; | 151 const std::string custom_user_agent_; |
149 | 152 |
150 DISALLOW_COPY_AND_ASSIGN(DriveAPIService); | 153 DISALLOW_COPY_AND_ASSIGN(DriveAPIService); |
151 }; | 154 }; |
152 | 155 |
153 } // namespace google_apis | 156 } // namespace google_apis |
154 | 157 |
155 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_SERVICE_H_ | 158 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_SERVICE_H_ |
OLD | NEW |