| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" |
| 10 #include "ppapi/c/ppb_url_response_info.h" | 11 #include "ppapi/c/ppb_url_response_info.h" |
| 11 #include "webkit/glue/plugins/pepper_resource.h" | 12 #include "webkit/plugins/ppapi/resource.h" |
| 12 | 13 |
| 13 namespace WebKit { | 14 namespace WebKit { |
| 14 class WebURLResponse; | 15 class WebURLResponse; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace pepper { | 18 namespace webkit { |
| 19 namespace ppapi { |
| 18 | 20 |
| 19 class URLResponseInfo : public Resource { | 21 class PPB_FileRef_Impl; |
| 22 |
| 23 class PPB_URLResponseInfo_Impl : public Resource { |
| 20 public: | 24 public: |
| 21 explicit URLResponseInfo(PluginModule* module); | 25 explicit PPB_URLResponseInfo_Impl(PluginModule* module); |
| 22 virtual ~URLResponseInfo(); | 26 virtual ~PPB_URLResponseInfo_Impl(); |
| 23 | 27 |
| 24 // Returns a pointer to the interface implementing PPB_URLResponseInfo that | 28 // Returns a pointer to the interface implementing PPB_URLResponseInfo that |
| 25 // is exposed to the plugin. | 29 // is exposed to the plugin. |
| 26 static const PPB_URLResponseInfo* GetInterface(); | 30 static const PPB_URLResponseInfo* GetInterface(); |
| 27 | 31 |
| 28 // Resource overrides. | 32 // Resource overrides. |
| 29 virtual URLResponseInfo* AsURLResponseInfo(); | 33 virtual PPB_URLResponseInfo_Impl* AsPPB_URLResponseInfo_Impl(); |
| 30 | 34 |
| 31 // PPB_URLResponseInfo implementation. | 35 // PPB_URLResponseInfo implementation. |
| 32 PP_Var GetProperty(PP_URLResponseProperty property); | 36 PP_Var GetProperty(PP_URLResponseProperty property); |
| 33 | 37 |
| 34 bool Initialize(const WebKit::WebURLResponse& response); | 38 bool Initialize(const WebKit::WebURLResponse& response); |
| 35 | 39 |
| 36 FileRef* body() { return body_; } | 40 PPB_FileRef_Impl* body() { return body_; } |
| 37 | 41 |
| 38 std::string redirect_url() { return redirect_url_; } | 42 std::string redirect_url() { return redirect_url_; } |
| 39 | 43 |
| 40 private: | 44 private: |
| 41 std::string url_; | 45 std::string url_; |
| 42 std::string headers_; | 46 std::string headers_; |
| 43 int32_t status_code_; | 47 int32_t status_code_; |
| 44 std::string status_text_; | 48 std::string status_text_; |
| 45 std::string redirect_url_; | 49 std::string redirect_url_; |
| 46 scoped_refptr<FileRef> body_; | 50 scoped_refptr<PPB_FileRef_Impl> body_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Impl); |
| 47 }; | 53 }; |
| 48 | 54 |
| 49 } // namespace pepper | 55 } // namespace ppapi |
| 56 } // namespace webkit |
| 50 | 57 |
| 51 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 58 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ |
| OLD | NEW |