summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 23:02:32 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 23:02:32 +0000
commitcefdec81077faae589c40e09b4d3f949295edb3f (patch)
tree7d9bf954116d27e738d4fbd11a24be83d6c4db56
parentbb9c9752cde83beb6a4de9f2653f2054aaaf797b (diff)
downloadchromium_src-cefdec81077faae589c40e09b4d3f949295edb3f.zip
chromium_src-cefdec81077faae589c40e09b4d3f949295edb3f.tar.gz
chromium_src-cefdec81077faae589c40e09b4d3f949295edb3f.tar.bz2
Pepper: Autogenerate thunk for PPB_URLResponseInfo.
BUG= Review URL: https://chromiumcodereview.appspot.com/14031017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196523 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/api/ppb_url_response_info.idl2
-rw-r--r--ppapi/thunk/ppb_url_response_info_thunk.cc22
2 files changed, 18 insertions, 6 deletions
diff --git a/ppapi/api/ppb_url_response_info.idl b/ppapi/api/ppb_url_response_info.idl
index 01c7df8..2998b7a 100644
--- a/ppapi/api/ppb_url_response_info.idl
+++ b/ppapi/api/ppb_url_response_info.idl
@@ -8,6 +8,8 @@
* responses.
*/
+[generate_thunk]
+
label Chrome {
M14 = 1.0
};
diff --git a/ppapi/thunk/ppb_url_response_info_thunk.cc b/ppapi/thunk/ppb_url_response_info_thunk.cc
index c0b36ff..fe6ef08 100644
--- a/ppapi/thunk/ppb_url_response_info_thunk.cc
+++ b/ppapi/thunk/ppb_url_response_info_thunk.cc
@@ -2,10 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/thunk/thunk.h"
+// From ppb_url_response_info.idl modified Thu Apr 25 13:21:08 2013.
+
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/c/ppb_url_response_info.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_instance_api.h"
#include "ppapi/thunk/ppb_url_response_info_api.h"
#include "ppapi/thunk/resource_creation_api.h"
+#include "ppapi/thunk/thunk.h"
namespace ppapi {
namespace thunk {
@@ -13,25 +19,29 @@ namespace thunk {
namespace {
PP_Bool IsURLResponseInfo(PP_Resource resource) {
+ VLOG(4) << "PPB_URLResponseInfo::IsURLResponseInfo()";
EnterResource<PPB_URLResponseInfo_API> enter(resource, false);
return PP_FromBool(enter.succeeded());
}
-PP_Var GetProperty(PP_Resource response, PP_URLResponseProperty property) {
+struct PP_Var GetProperty(PP_Resource response,
+ PP_URLResponseProperty property) {
+ VLOG(4) << "PPB_URLResponseInfo::GetProperty()";
EnterResource<PPB_URLResponseInfo_API> enter(response, true);
- if (!enter.succeeded())
+ if (enter.failed())
return PP_MakeUndefined();
return enter.object()->GetProperty(property);
}
PP_Resource GetBodyAsFileRef(PP_Resource response) {
+ VLOG(4) << "PPB_URLResponseInfo::GetBodyAsFileRef()";
EnterResource<PPB_URLResponseInfo_API> enter(response, true);
- if (!enter.succeeded())
+ if (enter.failed())
return 0;
return enter.object()->GetBodyAsFileRef();
}
-const PPB_URLResponseInfo g_ppb_url_response_info_thunk = {
+const PPB_URLResponseInfo_1_0 g_ppb_urlresponseinfo_thunk_1_0 = {
&IsURLResponseInfo,
&GetProperty,
&GetBodyAsFileRef
@@ -40,7 +50,7 @@ const PPB_URLResponseInfo g_ppb_url_response_info_thunk = {
} // namespace
const PPB_URLResponseInfo_1_0* GetPPB_URLResponseInfo_1_0_Thunk() {
- return &g_ppb_url_response_info_thunk;
+ return &g_ppb_urlresponseinfo_thunk_1_0;
}
} // namespace thunk