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 "third_party/ppapi/c/ppb_url_response_info.h" | 10 #include "third_party/ppapi/c/dev/ppb_url_response_info_dev.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_Dev* GetInterface(); |
27 | 27 |
28 // Resource overrides. | 28 // Resource overrides. |
29 URLResponseInfo* AsURLResponseInfo() { return this; } | 29 URLResponseInfo* AsURLResponseInfo() { return this; } |
30 | 30 |
31 // PPB_URLResponseInfo implementation. | 31 // PPB_URLResponseInfo implementation. |
32 PP_Var GetProperty(PP_URLResponseProperty property); | 32 PP_Var GetProperty(PP_URLResponseProperty_Dev 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 private: | 38 private: |
39 std::string url_; | 39 std::string url_; |
40 std::string headers_; | 40 std::string headers_; |
41 int32_t status_code_; | 41 int32_t status_code_; |
42 scoped_refptr<FileRef> body_; | 42 scoped_refptr<FileRef> body_; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace pepper | 45 } // namespace pepper |
46 | 46 |
47 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 47 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ |
OLD | NEW |