| 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 contains callback types used for communicating with the Drive | 5 // This file contains callback types used for communicating with the Drive |
| 6 // server via WAPI (Documents List API) and Drive API. | 6 // server via WAPI (Documents List API) and Drive API. |
| 7 | 7 |
| 8 #ifndef GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ | 8 #ifndef GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ |
| 9 #define GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ | 9 #define GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Callback used for getting ResourceEntry. | 25 // Callback used for getting ResourceEntry. |
| 26 typedef base::Callback<void(GDataErrorCode error, | 26 typedef base::Callback<void(GDataErrorCode error, |
| 27 scoped_ptr<ResourceEntry> entry)> | 27 scoped_ptr<ResourceEntry> entry)> |
| 28 GetResourceEntryCallback; | 28 GetResourceEntryCallback; |
| 29 | 29 |
| 30 // Callback used for getting AboutResource. | 30 // Callback used for getting AboutResource. |
| 31 typedef base::Callback<void(GDataErrorCode error, | 31 typedef base::Callback<void(GDataErrorCode error, |
| 32 scoped_ptr<AboutResource> about_resource)> | 32 scoped_ptr<AboutResource> about_resource)> |
| 33 AboutResourceCallback; | 33 AboutResourceCallback; |
| 34 | 34 |
| 35 // Callback used for getting ShareUrl. | 35 // Callback used for methods getting an url. |
| 36 typedef base::Callback<void(GDataErrorCode error, | 36 typedef base::Callback<void(GDataErrorCode error, const GURL& url)> |
| 37 const GURL& share_url)> GetShareUrlCallback; | 37 GetUrlCallback; |
| 38 | 38 |
| 39 // Callback used for getting AppList. | 39 // Callback used for getting AppList. |
| 40 typedef base::Callback<void(GDataErrorCode error, | 40 typedef base::Callback<void(GDataErrorCode error, |
| 41 scoped_ptr<AppList> app_list)> AppListCallback; | 41 scoped_ptr<AppList> app_list)> AppListCallback; |
| 42 | 42 |
| 43 // Callback used for authorizing an app. |open_url| is used to open the target | 43 // Callback used for authorizing an app. |open_url| is used to open the target |
| 44 // file with the authorized app. | 44 // file with the authorized app. |
| 45 typedef base::Callback<void(GDataErrorCode error, | 45 typedef base::Callback<void(GDataErrorCode error, |
| 46 const GURL& open_url)> | 46 const GURL& open_url)> |
| 47 AuthorizeAppCallback; | 47 AuthorizeAppCallback; |
| 48 | 48 |
| 49 // Closure for canceling a certain request. Each request-issuing method returns | 49 // Closure for canceling a certain request. Each request-issuing method returns |
| 50 // this type of closure. If it is called during the request is in-flight, the | 50 // this type of closure. If it is called during the request is in-flight, the |
| 51 // callback passed with the request is invoked with GDATA_CANCELLED. If the | 51 // callback passed with the request is invoked with GDATA_CANCELLED. If the |
| 52 // request is already finished, nothing happens. | 52 // request is already finished, nothing happens. |
| 53 typedef base::Closure CancelCallback; | 53 typedef base::Closure CancelCallback; |
| 54 | 54 |
| 55 } // namespace google_apis | 55 } // namespace google_apis |
| 56 | 56 |
| 57 #endif // GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ | 57 #endif // GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_ |
| OLD | NEW |