| 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_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ppapi/c/ppb_url_response_info.h" | 10 #include "ppapi/c/ppb_url_response_info.h" |
| 11 #include "webkit/glue/plugins/pepper_resource.h" | 11 #include "webkit/glue/plugins/pepper_resource.h" |
| 12 | 12 |
| 13 namespace WebKit { | 13 namespace WebKit { |
| 14 class WebURLResponse; | 14 class WebURLResponse; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace pepper { | 17 namespace pepper { |
| 18 | 18 |
| 19 class URLResponseInfo : public Resource { | 19 class URLResponseInfo : public Resource { |
| 20 public: | 20 public: |
| 21 explicit URLResponseInfo(PluginModule* module); | 21 explicit URLResponseInfo(PluginModule* module); |
| 22 virtual ~URLResponseInfo(); | 22 virtual ~URLResponseInfo(); |
| 23 | 23 |
| 24 // Returns a pointer to the interface implementing PPB_URLResponseInfo that | 24 // Returns a pointer to the interface implementing PPB_URLResponseInfo that |
| 25 // is exposed to the plugin. | 25 // is exposed to the plugin. |
| 26 static const PPB_URLResponseInfo* GetInterface(); | 26 static const PPB_URLResponseInfo* GetInterface(); |
| 27 | 27 |
| 28 // Resource overrides. | 28 // Resource overrides. |
| 29 URLResponseInfo* AsURLResponseInfo() { return this; } | 29 virtual URLResponseInfo* AsURLResponseInfo(); |
| 30 | 30 |
| 31 // PPB_URLResponseInfo implementation. | 31 // PPB_URLResponseInfo implementation. |
| 32 PP_Var GetProperty(PP_URLResponseProperty property); | 32 PP_Var GetProperty(PP_URLResponseProperty property); |
| 33 | 33 |
| 34 bool Initialize(const WebKit::WebURLResponse& response); | 34 bool Initialize(const WebKit::WebURLResponse& response); |
| 35 | 35 |
| 36 FileRef* body() { return body_; } | 36 FileRef* body() { return body_; } |
| 37 | 37 |
| 38 std::string redirect_url() { return redirect_url_; } | 38 std::string redirect_url() { return redirect_url_; } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 std::string url_; | 41 std::string url_; |
| 42 std::string headers_; | 42 std::string headers_; |
| 43 int32_t status_code_; | 43 int32_t status_code_; |
| 44 std::string status_text_; | 44 std::string status_text_; |
| 45 std::string redirect_url_; | 45 std::string redirect_url_; |
| 46 scoped_refptr<FileRef> body_; | 46 scoped_refptr<FileRef> body_; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace pepper | 49 } // namespace pepper |
| 50 | 50 |
| 51 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 51 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ |
| OLD | NEW |