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 #include "ppapi/shared_impl/ppb_url_request_info_shared.h" | 5 #include "ppapi/shared_impl/ppb_url_request_info_shared.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "ppapi/shared_impl/var.h" | 8 #include "ppapi/shared_impl/var.h" |
9 #include "ppapi/thunk/enter.h" | 9 #include "ppapi/thunk/enter.h" |
10 #include "ppapi/thunk/ppb_file_ref_api.h" | 10 #include "ppapi/thunk/ppb_file_ref_api.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 custom_content_transfer_encoding(), | 64 custom_content_transfer_encoding(), |
65 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold), | 65 prefetch_buffer_upper_threshold(kDefaultPrefetchBufferUpperThreshold), |
66 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold), | 66 prefetch_buffer_lower_threshold(kDefaultPrefetchBufferLowerThreshold), |
67 body() { | 67 body() { |
68 } | 68 } |
69 | 69 |
70 PPB_URLRequestInfo_Data::~PPB_URLRequestInfo_Data() { | 70 PPB_URLRequestInfo_Data::~PPB_URLRequestInfo_Data() { |
71 } | 71 } |
72 | 72 |
73 PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared( | 73 PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared( |
| 74 ResourceObjectType type, |
74 PP_Instance instance, | 75 PP_Instance instance, |
75 const PPB_URLRequestInfo_Data& data) | 76 const PPB_URLRequestInfo_Data& data) |
76 : Resource(instance), | 77 : Resource(type, instance), |
77 data_(data) { | 78 data_(data) { |
78 } | 79 } |
79 | 80 |
80 PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared( | |
81 const HostResource& host_resource, | |
82 const PPB_URLRequestInfo_Data& data) | |
83 : Resource(host_resource), | |
84 data_(data) { | |
85 } | |
86 | |
87 PPB_URLRequestInfo_Shared::~PPB_URLRequestInfo_Shared() { | 81 PPB_URLRequestInfo_Shared::~PPB_URLRequestInfo_Shared() { |
88 } | 82 } |
89 | 83 |
90 thunk::PPB_URLRequestInfo_API* | 84 thunk::PPB_URLRequestInfo_API* |
91 PPB_URLRequestInfo_Shared::AsPPB_URLRequestInfo_API() { | 85 PPB_URLRequestInfo_Shared::AsPPB_URLRequestInfo_API() { |
92 return this; | 86 return this; |
93 } | 87 } |
94 | 88 |
95 PP_Bool PPB_URLRequestInfo_Shared::SetProperty(PP_URLRequestProperty property, | 89 PP_Bool PPB_URLRequestInfo_Shared::SetProperty(PP_URLRequestProperty property, |
96 PP_Var var) { | 90 PP_Var var) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 case PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING: | 257 case PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING: |
264 data_.has_custom_content_transfer_encoding = true; | 258 data_.has_custom_content_transfer_encoding = true; |
265 data_.custom_content_transfer_encoding = value; | 259 data_.custom_content_transfer_encoding = value; |
266 return true; | 260 return true; |
267 default: | 261 default: |
268 return false; | 262 return false; |
269 } | 263 } |
270 } | 264 } |
271 | 265 |
272 } // namespace ppapi | 266 } // namespace ppapi |
OLD | NEW |