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