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 plugins { |
| 20 namespace ppapi { |
18 | 21 |
19 class URLResponseInfo : public Resource { | 22 class PPB_FileRef_Impl; |
| 23 |
| 24 class PPB_URLResponseInfo_Impl : public Resource { |
20 public: | 25 public: |
21 explicit URLResponseInfo(PluginModule* module); | 26 explicit PPB_URLResponseInfo_Impl(PluginModule* module); |
22 virtual ~URLResponseInfo(); | 27 virtual ~PPB_URLResponseInfo_Impl(); |
23 | 28 |
24 // Returns a pointer to the interface implementing PPB_URLResponseInfo that | 29 // Returns a pointer to the interface implementing PPB_URLResponseInfo that |
25 // is exposed to the plugin. | 30 // is exposed to the plugin. |
26 static const PPB_URLResponseInfo* GetInterface(); | 31 static const PPB_URLResponseInfo* GetInterface(); |
27 | 32 |
28 // Resource overrides. | 33 // Resource overrides. |
29 virtual URLResponseInfo* AsURLResponseInfo(); | 34 virtual PPB_URLResponseInfo_Impl* AsURLResponseInfo(); |
30 | 35 |
31 // PPB_URLResponseInfo implementation. | 36 // PPB_URLResponseInfo implementation. |
32 PP_Var GetProperty(PP_URLResponseProperty property); | 37 PP_Var GetProperty(PP_URLResponseProperty property); |
33 | 38 |
34 bool Initialize(const WebKit::WebURLResponse& response); | 39 bool Initialize(const WebKit::WebURLResponse& response); |
35 | 40 |
36 FileRef* body() { return body_; } | 41 PPB_FileRef_Impl* body() { return body_; } |
37 | 42 |
38 std::string redirect_url() { return redirect_url_; } | 43 std::string redirect_url() { return redirect_url_; } |
39 | 44 |
40 private: | 45 private: |
41 std::string url_; | 46 std::string url_; |
42 std::string headers_; | 47 std::string headers_; |
43 int32_t status_code_; | 48 int32_t status_code_; |
44 std::string status_text_; | 49 std::string status_text_; |
45 std::string redirect_url_; | 50 std::string redirect_url_; |
46 scoped_refptr<FileRef> body_; | 51 scoped_refptr<PPB_FileRef_Impl> body_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Impl); |
47 }; | 54 }; |
48 | 55 |
49 } // namespace pepper | 56 } // namespace ppapi |
| 57 } // namespace plugins |
| 58 } // namespace webkit |
50 | 59 |
51 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_RESPONSE_INFO_H_ | 60 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ |
OLD | NEW |