Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: chrome/browser/google_apis/drive_common_callbacks.h

Issue 17395010: drive: Introduce chrome/browser/google_apis/drive_common_callbacks.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/drive_common_callbacks.h
diff --git a/chrome/browser/google_apis/drive_common_callbacks.h b/chrome/browser/google_apis/drive_common_callbacks.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad52838cd0eda51a79a24da2bd1c18a9814304c6
--- /dev/null
+++ b/chrome/browser/google_apis/drive_common_callbacks.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
tfarina 2013/06/19 01:26:12 supernit: no (c) and just 2013.
satorux1 2013/06/19 01:27:47 Thanks! Fixed.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This file contains callback types used for communicating with the Drive
+// server via WAPI (Documents List API) and Drive API.
+
+#ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_
+#define CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_
+
+#include "chrome/browser/google_apis/base_requests.h"
+
+namespace google_apis {
+
+class AboutResource;
+class AppList;
+class ResourceEntry;
+class ResourceList;
+
+// Callback used for getting ResourceList.
+typedef base::Callback<void(GDataErrorCode error,
+ scoped_ptr<ResourceList> resource_list)>
+ GetResourceListCallback;
+
+// Callback used for getting ResourceEntry.
+typedef base::Callback<void(GDataErrorCode error,
+ scoped_ptr<ResourceEntry> entry)>
+ GetResourceEntryCallback;
+
+// Callback used for gettign AboutResource.
+typedef base::Callback<void(GDataErrorCode error,
+ scoped_ptr<AboutResource> about_resource)>
+ GetAboutResourceCallback;
+
+// Callback used for getting AppList.
+typedef base::Callback<void(GDataErrorCode error,
+ scoped_ptr<AppList> app_list)>
+ GetAppListCallback;
+
+// Callback used for handling UploadRangeResponse.
+typedef base::Callback<void(
+ const UploadRangeResponse& response,
+ scoped_ptr<ResourceEntry> new_entry)> UploadRangeCallback;
+
+// Callback used for authrozing an app. |open_url| is used to open the target
+// file with the authorized app.
+typedef base::Callback<void(GDataErrorCode error,
+ const GURL& open_url)>
+ AuthorizeAppCallback;
+
+// Closure for canceling a certain request. Each request-issuing method returns
+// this type of closure. If it is called during the request is in-flight, the
+// callback passed with the request is invoked with GDATA_CANCELLED. If the
+// request is already finished, nothing happens.
+typedef base::Closure CancelCallback;
+
+} // namespace google_apis
+
+#endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_COMMON_CALLBACKS_H_

Powered by Google App Engine
This is Rietveld 408576698