1 // Copyright (c) 2012 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.
5 // From ppb_url_response_info.idl modified Thu Apr 25 13:21:08 2013.
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_url_response_info.h"
9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppb_instance_api.h"
12 #include "ppapi/thunk/ppb_url_response_info_api.h"
13 #include "ppapi/thunk/resource_creation_api.h"
14 #include "ppapi/thunk/thunk.h"
21 PP_Bool
IsURLResponseInfo(PP_Resource resource
) {
22 VLOG(4) << "PPB_URLResponseInfo::IsURLResponseInfo()";
23 EnterResource
<PPB_URLResponseInfo_API
> enter(resource
, false);
24 return PP_FromBool(enter
.succeeded());
27 struct PP_Var
GetProperty(PP_Resource response
,
28 PP_URLResponseProperty property
) {
29 VLOG(4) << "PPB_URLResponseInfo::GetProperty()";
30 EnterResource
<PPB_URLResponseInfo_API
> enter(response
, true);
32 return PP_MakeUndefined();
33 return enter
.object()->GetProperty(property
);
36 PP_Resource
GetBodyAsFileRef(PP_Resource response
) {
37 VLOG(4) << "PPB_URLResponseInfo::GetBodyAsFileRef()";
38 EnterResource
<PPB_URLResponseInfo_API
> enter(response
, true);
41 return enter
.object()->GetBodyAsFileRef();
44 const PPB_URLResponseInfo_1_0 g_ppb_urlresponseinfo_thunk_1_0
= {
52 const PPB_URLResponseInfo_1_0
* GetPPB_URLResponseInfo_1_0_Thunk() {
53 return &g_ppb_urlresponseinfo_thunk_1_0
;