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_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/google_apis/auth_service_interface.h" | 10 #include "chrome/browser/google_apis/auth_service_interface.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // so that we can do testing of clients of DriveService. | 34 // so that we can do testing of clients of DriveService. |
35 // | 35 // |
36 // All functions must be called on UI thread. DriveService is built on top of | 36 // All functions must be called on UI thread. DriveService is built on top of |
37 // URLFetcher that runs on UI thread. | 37 // URLFetcher that runs on UI thread. |
38 class DriveServiceInterface { | 38 class DriveServiceInterface { |
39 public: | 39 public: |
40 virtual ~DriveServiceInterface() {} | 40 virtual ~DriveServiceInterface() {} |
41 | 41 |
42 // Common service: | 42 // Common service: |
43 | 43 |
44 // Initializes the documents service. | 44 // Initializes the documents service with |account_id|. |
45 virtual void Initialize() = 0; | 45 virtual void Initialize(const std::string& account_id) = 0; |
46 | 46 |
47 // Adds an observer. | 47 // Adds an observer. |
48 virtual void AddObserver(DriveServiceObserver* observer) = 0; | 48 virtual void AddObserver(DriveServiceObserver* observer) = 0; |
49 | 49 |
50 // Removes an observer. | 50 // Removes an observer. |
51 virtual void RemoveObserver(DriveServiceObserver* observer) = 0; | 51 virtual void RemoveObserver(DriveServiceObserver* observer) = 0; |
52 | 52 |
53 // True if ready to send requests. | 53 // True if ready to send requests. |
54 virtual bool CanSendRequest() const = 0; | 54 virtual bool CanSendRequest() const = 0; |
55 | 55 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 // | 374 // |
375 // |callback| must not be null. | 375 // |callback| must not be null. |
376 virtual google_apis::CancelCallback GetRemainingResourceList( | 376 virtual google_apis::CancelCallback GetRemainingResourceList( |
377 const GURL& next_link, | 377 const GURL& next_link, |
378 const google_apis::GetResourceListCallback& callback) = 0; | 378 const google_apis::GetResourceListCallback& callback) = 0; |
379 }; | 379 }; |
380 | 380 |
381 } // namespace drive | 381 } // namespace drive |
382 | 382 |
383 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 383 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
OLD | NEW |