| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 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. | |
| 4 | |
| 5 #include "ppapi/cpp/dev/url_response_info_dev.h" | |
| 6 | |
| 7 #include "ppapi/cpp/dev/file_ref_dev.h" | |
| 8 #include "ppapi/cpp/module.h" | |
| 9 #include "ppapi/cpp/module_impl.h" | |
| 10 | |
| 11 namespace { | |
| 12 | |
| 13 DeviceFuncs<PPB_URLResponseInfo_Dev> url_response_info_f( | |
| 14 PPB_URLRESPONSEINFO_DEV_INTERFACE); | |
| 15 | |
| 16 } // namespace | |
| 17 | |
| 18 namespace pp { | |
| 19 | |
| 20 URLResponseInfo_Dev::URLResponseInfo_Dev(const URLResponseInfo_Dev& other) | |
| 21 : Resource(other) { | |
| 22 } | |
| 23 | |
| 24 URLResponseInfo_Dev::URLResponseInfo_Dev(PassRef, PP_Resource resource) { | |
| 25 PassRefFromConstructor(resource); | |
| 26 } | |
| 27 | |
| 28 URLResponseInfo_Dev& URLResponseInfo_Dev::operator=( | |
| 29 const URLResponseInfo_Dev& other) { | |
| 30 URLResponseInfo_Dev copy(other); | |
| 31 swap(copy); | |
| 32 return *this; | |
| 33 } | |
| 34 | |
| 35 void URLResponseInfo_Dev::swap(URLResponseInfo_Dev& other) { | |
| 36 Resource::swap(other); | |
| 37 } | |
| 38 | |
| 39 Var URLResponseInfo_Dev::GetProperty( | |
| 40 PP_URLResponseProperty_Dev property) const { | |
| 41 if (!url_response_info_f) | |
| 42 return Var(); | |
| 43 return Var(Var::PassRef(), | |
| 44 url_response_info_f->GetProperty(pp_resource(), property)); | |
| 45 } | |
| 46 | |
| 47 FileRef_Dev URLResponseInfo_Dev::GetBody() const { | |
| 48 if (!url_response_info_f) | |
| 49 return FileRef_Dev(); | |
| 50 return FileRef_Dev(FileRef_Dev::PassRef(), | |
| 51 url_response_info_f->GetBody(pp_resource())); | |
| 52 } | |
| 53 | |
| 54 } // namespace pp | |
| OLD | NEW |