summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk/ppb_url_loader_api.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 23:04:24 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 23:04:24 +0000
commitceadc397e01759ce1fb876f35357427766b70c2a (patch)
tree2d2ba77bcc48065140a88545801415574241fb2f /ppapi/thunk/ppb_url_loader_api.h
parent9af75df68c6103002f27298dee8e53574457a1ab (diff)
downloadchromium_src-ceadc397e01759ce1fb876f35357427766b70c2a.zip
chromium_src-ceadc397e01759ce1fb876f35357427766b70c2a.tar.gz
chromium_src-ceadc397e01759ce1fb876f35357427766b70c2a.tar.bz2
Move fullscreen and instance to the new thunk system.
This takes it in a slightl different direction. Rather than maintaining separate APIs, proxies, and impls for each interface, I think smaller instance-related interfaces can just be added on the Instance_API. There's no need for binary compatibility here and it saves a whole lot of boilerplate. Although PPB_Instance_API will get large, this isn't necessarily bad, and is probably more clear than the alternative (it saves a whole lot of code). This means that the interface IDs no longer have a 1:1 mapping to interface names. But this was already going to be the case when we have multiple versions of different interfaces. Currently the code in dispatcher to deal with this is a bit weird, because of the way the mapping works. Long term, I'm going to change these from interface IDs in the proxy to API IDs in the thunk layer. This adds APIs and thunks for several other interfaces without implementing them yet (this patch was getting too large): URL loading and surface 3D. TEST=ppapi tests BUG=none Review URL: http://codereview.chromium.org/7058015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_url_loader_api.h')
-rw-r--r--ppapi/thunk/ppb_url_loader_api.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/ppapi/thunk/ppb_url_loader_api.h b/ppapi/thunk/ppb_url_loader_api.h
new file mode 100644
index 0000000..cd44c26
--- /dev/null
+++ b/ppapi/thunk/ppb_url_loader_api.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_THUNK_URL_LOADER_API_H_
+#define PPAPI_THUNK_URL_LOADER_API_H_
+
+#include "ppapi/c/ppb_url_loader.h"
+#include "ppapi/c/trusted/ppb_url_loader_trusted.h"
+
+namespace ppapi {
+namespace thunk {
+
+class PPB_URLLoader_API {
+ public:
+ virtual int32_t Open(PP_Resource request_id,
+ PP_CompletionCallback callback) = 0;
+ virtual int32_t FollowRedirect(PP_CompletionCallback callback) = 0;
+ virtual PP_Bool GetUploadProgress(int64_t* bytes_sent,
+ int64_t* total_bytes_to_be_sent) = 0;
+ virtual PP_Bool GetDownloadProgress(int64_t* bytes_received,
+ int64_t* total_bytes_to_be_received) = 0;
+ virtual PP_Resource GetResponseInfo() = 0;
+ virtual int32_t ReadResponseBody(void* buffer,
+ int32_t bytes_to_read,
+ PP_CompletionCallback callback) = 0;
+ virtual int32_t FinishStreamingToFile(PP_CompletionCallback callback) = 0;
+ virtual void Close() = 0;
+
+ // Trusted API.
+ virtual void GrantUniversalAccess() = 0;
+ virtual void SetStatusCallback(PP_URLLoaderTrusted_StatusCallback cb) = 0;
+};
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_URL_LOADER_API_H_