| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ | |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "ppapi/c/ppb_url_response_info.h" | |
| 13 #include "ppapi/shared_impl/resource.h" | |
| 14 #include "ppapi/thunk/ppb_url_response_info_api.h" | |
| 15 | |
| 16 namespace WebKit { | |
| 17 class WebURLResponse; | |
| 18 } | |
| 19 | |
| 20 namespace webkit { | |
| 21 namespace ppapi { | |
| 22 | |
| 23 class PPB_FileRef_Impl; | |
| 24 | |
| 25 class PPB_URLResponseInfo_Impl | |
| 26 : public ::ppapi::Resource, | |
| 27 public ::ppapi::thunk::PPB_URLResponseInfo_API { | |
| 28 public: | |
| 29 explicit PPB_URLResponseInfo_Impl(PP_Instance instance); | |
| 30 virtual ~PPB_URLResponseInfo_Impl(); | |
| 31 | |
| 32 bool Initialize(const WebKit::WebURLResponse& response); | |
| 33 | |
| 34 // Resource overrides. | |
| 35 virtual PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() OVERRIDE; | |
| 36 | |
| 37 // PPB_URLResponseInfo_API implementation. | |
| 38 virtual PP_Var GetProperty(PP_URLResponseProperty property) OVERRIDE; | |
| 39 virtual PP_Resource GetBodyAsFileRef() OVERRIDE; | |
| 40 | |
| 41 PPB_FileRef_Impl* body() { return body_; } | |
| 42 std::string redirect_url() { return redirect_url_; } | |
| 43 | |
| 44 private: | |
| 45 std::string url_; | |
| 46 std::string headers_; | |
| 47 int32_t status_code_; | |
| 48 std::string status_text_; | |
| 49 std::string redirect_url_; | |
| 50 scoped_refptr<PPB_FileRef_Impl> body_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Impl); | |
| 53 }; | |
| 54 | |
| 55 } // namespace ppapi | |
| 56 } // namespace webkit | |
| 57 | |
| 58 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ | |
| OLD | NEW |