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 #include "ppapi/cpp/url_response_info.h"
7 #include "ppapi/cpp/file_ref.h"
8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/module_impl.h"
15 template <> const char* interface_name
<PPB_URLResponseInfo_1_0
>() {
16 return PPB_URLRESPONSEINFO_INTERFACE_1_0
;
21 URLResponseInfo::URLResponseInfo(const URLResponseInfo
& other
)
25 URLResponseInfo::URLResponseInfo(PassRef
, PP_Resource resource
)
26 : Resource(PASS_REF
, resource
) {
29 Var
URLResponseInfo::GetProperty(PP_URLResponseProperty property
) const {
30 if (!has_interface
<PPB_URLResponseInfo_1_0
>())
33 get_interface
<PPB_URLResponseInfo_1_0
>()->GetProperty(pp_resource(),
37 FileRef
URLResponseInfo::GetBodyAsFileRef() const {
38 if (!has_interface
<PPB_URLResponseInfo_1_0
>())
40 return FileRef(PASS_REF
,
41 get_interface
<PPB_URLResponseInfo_1_0
>()->GetBodyAsFileRef(