| 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 #include "webkit/glue/plugins/pepper_url_request_info.h" | 5 #include "webkit/glue/plugins/pepper_url_request_info.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "net/http/http_util.h" | 10 #include "net/http/http_util.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 161 } |
| 162 | 162 |
| 163 URLRequestInfo::~URLRequestInfo() { | 163 URLRequestInfo::~URLRequestInfo() { |
| 164 } | 164 } |
| 165 | 165 |
| 166 // static | 166 // static |
| 167 const PPB_URLRequestInfo* URLRequestInfo::GetInterface() { | 167 const PPB_URLRequestInfo* URLRequestInfo::GetInterface() { |
| 168 return &ppb_urlrequestinfo; | 168 return &ppb_urlrequestinfo; |
| 169 } | 169 } |
| 170 | 170 |
| 171 URLRequestInfo* URLRequestInfo::AsURLRequestInfo() { |
| 172 return this; |
| 173 } |
| 174 |
| 171 bool URLRequestInfo::SetBooleanProperty(PP_URLRequestProperty property, | 175 bool URLRequestInfo::SetBooleanProperty(PP_URLRequestProperty property, |
| 172 bool value) { | 176 bool value) { |
| 173 switch (property) { | 177 switch (property) { |
| 174 case PP_URLREQUESTPROPERTY_STREAMTOFILE: | 178 case PP_URLREQUESTPROPERTY_STREAMTOFILE: |
| 175 stream_to_file_ = value; | 179 stream_to_file_ = value; |
| 176 return true; | 180 return true; |
| 177 case PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS: | 181 case PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS: |
| 178 follow_redirects_ = value; | 182 follow_redirects_ = value; |
| 179 return true; | 183 return true; |
| 180 case PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS: | 184 case PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 273 } |
| 270 } | 274 } |
| 271 web_request.setHTTPBody(http_body); | 275 web_request.setHTTPBody(http_body); |
| 272 } | 276 } |
| 273 | 277 |
| 274 frame->setReferrerForRequest(web_request, WebURL()); // Use default. | 278 frame->setReferrerForRequest(web_request, WebURL()); // Use default. |
| 275 return web_request; | 279 return web_request; |
| 276 } | 280 } |
| 277 | 281 |
| 278 } // namespace pepper | 282 } // namespace pepper |
| OLD | NEW |