Remove unused script android_webview/build/install_binary.
[chromium-blink-merge.git] / google_apis / drive / drive_common_callbacks.h
blobc31bea0358e51c4eb66751229e57d1af48257ffb
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
3 // found in the LICENSE file.
4 //
5 // This file contains callback types used for communicating with the Drive
6 // server via WAPI (Documents List API) and Drive API.
8 #ifndef GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_
9 #define GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_
11 #include "google_apis/drive/base_requests.h"
13 namespace google_apis {
15 class AboutResource;
16 class AppList;
17 class ResourceEntry;
18 class ResourceList;
20 // Callback used for getting ResourceList.
21 typedef base::Callback<void(GDataErrorCode error,
22 scoped_ptr<ResourceList> resource_list)>
23 GetResourceListCallback;
25 // Callback used for getting ResourceEntry.
26 typedef base::Callback<void(GDataErrorCode error,
27 scoped_ptr<ResourceEntry> entry)>
28 GetResourceEntryCallback;
30 // Callback used for getting AboutResource.
31 typedef base::Callback<void(GDataErrorCode error,
32 scoped_ptr<AboutResource> about_resource)>
33 AboutResourceCallback;
35 // Callback used for getting ShareUrl.
36 typedef base::Callback<void(GDataErrorCode error,
37 const GURL& share_url)> GetShareUrlCallback;
39 // Callback used for getting AppList.
40 typedef base::Callback<void(GDataErrorCode error,
41 scoped_ptr<AppList> app_list)> AppListCallback;
43 // Callback used for handling UploadRangeResponse.
44 typedef base::Callback<void(
45 const UploadRangeResponse& response,
46 scoped_ptr<ResourceEntry> new_entry)> UploadRangeCallback;
48 // Callback used for authorizing an app. |open_url| is used to open the target
49 // file with the authorized app.
50 typedef base::Callback<void(GDataErrorCode error,
51 const GURL& open_url)>
52 AuthorizeAppCallback;
54 // Closure for canceling a certain request. Each request-issuing method returns
55 // this type of closure. If it is called during the request is in-flight, the
56 // callback passed with the request is invoked with GDATA_CANCELLED. If the
57 // request is already finished, nothing happens.
58 typedef base::Closure CancelCallback;
60 } // namespace google_apis
62 #endif // GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_