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_REQUEST_INFO_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "third_party/ppapi/c/ppb_url_request_info.h" | 12 #include "third_party/ppapi/c/dev/ppb_url_request_info_dev.h" |
13 #include "webkit/glue/plugins/pepper_file_ref.h" | 13 #include "webkit/glue/plugins/pepper_file_ref.h" |
14 #include "webkit/glue/plugins/pepper_resource.h" | 14 #include "webkit/glue/plugins/pepper_resource.h" |
15 | 15 |
16 namespace WebKit { | 16 namespace WebKit { |
17 class WebFrame; | 17 class WebFrame; |
18 class WebURLRequest; | 18 class WebURLRequest; |
19 } | 19 } |
20 | 20 |
21 namespace pepper { | 21 namespace pepper { |
22 | 22 |
23 class URLRequestInfo : public Resource { | 23 class URLRequestInfo : public Resource { |
24 public: | 24 public: |
25 explicit URLRequestInfo(PluginModule* module); | 25 explicit URLRequestInfo(PluginModule* module); |
26 virtual ~URLRequestInfo(); | 26 virtual ~URLRequestInfo(); |
27 | 27 |
28 // Returns a pointer to the interface implementing PPB_URLRequestInfo that is | 28 // Returns a pointer to the interface implementing PPB_URLRequestInfo that is |
29 // exposed to the plugin. | 29 // exposed to the plugin. |
30 static const PPB_URLRequestInfo* GetInterface(); | 30 static const PPB_URLRequestInfo_Dev* GetInterface(); |
31 | 31 |
32 // Resource overrides. | 32 // Resource overrides. |
33 URLRequestInfo* AsURLRequestInfo() { return this; } | 33 URLRequestInfo* AsURLRequestInfo() { return this; } |
34 | 34 |
35 // PPB_URLRequestInfo implementation. | 35 // PPB_URLRequestInfo implementation. |
36 bool SetBooleanProperty(PP_URLRequestProperty property, bool value); | 36 bool SetBooleanProperty(PP_URLRequestProperty_Dev property, bool value); |
37 bool SetStringProperty(PP_URLRequestProperty property, | 37 bool SetStringProperty(PP_URLRequestProperty_Dev property, |
38 const std::string& value); | 38 const std::string& value); |
39 bool AppendDataToBody(const std::string& data); | 39 bool AppendDataToBody(const std::string& data); |
40 bool AppendFileToBody(FileRef* file_ref, | 40 bool AppendFileToBody(FileRef* file_ref, |
41 int64_t start_offset, | 41 int64_t start_offset, |
42 int64_t number_of_bytes, | 42 int64_t number_of_bytes, |
43 PP_Time expected_last_modified_time); | 43 PP_Time expected_last_modified_time); |
44 | 44 |
45 WebKit::WebURLRequest ToWebURLRequest(WebKit::WebFrame* frame) const; | 45 WebKit::WebURLRequest ToWebURLRequest(WebKit::WebFrame* frame) const; |
46 | 46 |
47 private: | 47 private: |
(...skipping 27 matching lines...) Expand all Loading... |
75 std::string url_; | 75 std::string url_; |
76 std::string method_; | 76 std::string method_; |
77 std::string headers_; | 77 std::string headers_; |
78 Body body_; | 78 Body body_; |
79 bool stream_to_file_; | 79 bool stream_to_file_; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace pepper | 82 } // namespace pepper |
83 | 83 |
84 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ | 84 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ |
OLD | NEW |