| 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 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 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: |
| 48 struct BodyItem { | 48 struct BodyItem; |
| 49 BodyItem(const std::string& data) | |
| 50 : data(data), | |
| 51 start_offset(0), | |
| 52 number_of_bytes(-1), | |
| 53 expected_last_modified_time(0.0) { | |
| 54 } | |
| 55 | |
| 56 BodyItem(FileRef* file_ref, | |
| 57 int64_t start_offset, | |
| 58 int64_t number_of_bytes, | |
| 59 PP_Time expected_last_modified_time) | |
| 60 : file_ref(file_ref), | |
| 61 start_offset(start_offset), | |
| 62 number_of_bytes(number_of_bytes), | |
| 63 expected_last_modified_time(expected_last_modified_time) { | |
| 64 } | |
| 65 | |
| 66 std::string data; | |
| 67 scoped_refptr<FileRef> file_ref; | |
| 68 int64_t start_offset; | |
| 69 int64_t number_of_bytes; | |
| 70 PP_Time expected_last_modified_time; | |
| 71 }; | |
| 72 | |
| 73 typedef std::vector<BodyItem> Body; | 49 typedef std::vector<BodyItem> Body; |
| 74 | 50 |
| 75 std::string url_; | 51 std::string url_; |
| 76 std::string method_; | 52 std::string method_; |
| 77 std::string headers_; | 53 std::string headers_; |
| 78 Body body_; | 54 Body body_; |
| 79 bool stream_to_file_; | 55 bool stream_to_file_; |
| 80 }; | 56 }; |
| 81 | 57 |
| 82 } // namespace pepper | 58 } // namespace pepper |
| 83 | 59 |
| 84 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ | 60 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ |
| OLD | NEW |