| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ |
| 6 #define PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "ppapi/shared_impl/resource.h" | 12 #include "ppapi/shared_impl/resource.h" |
| 13 #include "ppapi/thunk/ppb_url_request_info_api.h" | 13 #include "ppapi/thunk/ppb_url_request_info_api.h" |
| 14 | 14 |
| 15 namespace ppapi { | 15 namespace ppapi { |
| 16 | 16 |
| 17 namespace thunk { | 17 namespace thunk { |
| 18 class PPB_FileRef_API; | 18 class PPB_FileRef_API; |
| 19 } | 19 } |
| 20 | 20 |
| 21 struct PPB_URLRequestInfo_Data { | 21 struct PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Data { |
| 22 struct BodyItem { | 22 struct PPAPI_SHARED_EXPORT BodyItem { |
| 23 BodyItem(); | 23 BodyItem(); |
| 24 explicit BodyItem(const std::string& data); | 24 explicit BodyItem(const std::string& data); |
| 25 BodyItem(Resource* file_ref, | 25 BodyItem(Resource* file_ref, |
| 26 int64_t start_offset, | 26 int64_t start_offset, |
| 27 int64_t number_of_bytes, | 27 int64_t number_of_bytes, |
| 28 PP_Time expected_last_modified_time); | 28 PP_Time expected_last_modified_time); |
| 29 | 29 |
| 30 // Set if the input is a file, false means the |data| is valid. | 30 // Set if the input is a file, false means the |data| is valid. |
| 31 bool is_file; | 31 bool is_file; |
| 32 | 32 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 int32_t prefetch_buffer_upper_threshold; | 84 int32_t prefetch_buffer_upper_threshold; |
| 85 int32_t prefetch_buffer_lower_threshold; | 85 int32_t prefetch_buffer_lower_threshold; |
| 86 | 86 |
| 87 std::vector<BodyItem> body; | 87 std::vector<BodyItem> body; |
| 88 | 88 |
| 89 // If you add more stuff here, be sure to modify the serialization rules in | 89 // If you add more stuff here, be sure to modify the serialization rules in |
| 90 // ppapi_messages.h | 90 // ppapi_messages.h |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 class URLRequestInfoImpl : public ::ppapi::Resource, | 93 class PPAPI_SHARED_EXPORT URLRequestInfoImpl |
| 94 public ::ppapi::thunk::PPB_URLRequestInfo_API { | 94 : public ::ppapi::Resource, |
| 95 public ::ppapi::thunk::PPB_URLRequestInfo_API { |
| 95 public: | 96 public: |
| 96 // This constructor initializes the object as a proxy object with the given | 97 // This constructor initializes the object as a proxy object with the given |
| 97 // host resource. | 98 // host resource. |
| 98 URLRequestInfoImpl(const HostResource& host_resource, | 99 URLRequestInfoImpl(const HostResource& host_resource, |
| 99 const PPB_URLRequestInfo_Data& data); | 100 const PPB_URLRequestInfo_Data& data); |
| 100 | 101 |
| 101 ~URLRequestInfoImpl(); | 102 ~URLRequestInfoImpl(); |
| 102 | 103 |
| 103 // Resource overrides. | 104 // Resource overrides. |
| 104 virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() OVERRIDE; | 105 virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() OVERRIDE; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 134 | 135 |
| 135 private: | 136 private: |
| 136 PPB_URLRequestInfo_Data data_; | 137 PPB_URLRequestInfo_Data data_; |
| 137 | 138 |
| 138 DISALLOW_IMPLICIT_CONSTRUCTORS(URLRequestInfoImpl); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(URLRequestInfoImpl); |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace ppapi | 142 } // namespace ppapi |
| 142 | 143 |
| 143 #endif // PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ | 144 #endif // PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |