GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / google_apis / drive / drive_common_callbacks.h
blob087903333c71370baedf795119a3322dd8096698
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;
18 // Callback used for getting AboutResource.
19 typedef base::Callback<void(DriveApiErrorCode error,
20 scoped_ptr<AboutResource> about_resource)>
21 AboutResourceCallback;
23 // Callback used for getting ShareUrl.
24 typedef base::Callback<void(DriveApiErrorCode error,
25 const GURL& share_url)> GetShareUrlCallback;
27 // Callback used for getting AppList.
28 typedef base::Callback<void(DriveApiErrorCode error,
29 scoped_ptr<AppList> app_list)> AppListCallback;
31 // Callback used for authorizing an app. |open_url| is used to open the target
32 // file with the authorized app.
33 typedef base::Callback<void(DriveApiErrorCode error,
34 const GURL& open_url)>
35 AuthorizeAppCallback;
37 // Closure for canceling a certain request. Each request-issuing method returns
38 // this type of closure. If it is called during the request is in-flight, the
39 // callback passed with the request is invoked with DRIVE_CANCELLED. If the
40 // request is already finished, nothing happens.
41 typedef base::Closure CancelCallback;
43 } // namespace google_apis
45 #endif // GOOGLE_APIS_DRIVE_DRIVE_COMMON_CALLBACKS_H_