| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "build/build_config.h" |
| 8 | 9 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 10 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "Cursor.h" | 11 #include "Cursor.h" |
| 11 #include "Document.h" | 12 #include "Document.h" |
| 12 #include "Element.h" | 13 #include "Element.h" |
| 13 #include "Event.h" | 14 #include "Event.h" |
| 14 #include "EventNames.h" | 15 #include "EventNames.h" |
| 15 #include "FormData.h" | 16 #include "FormData.h" |
| 16 #include "FocusController.h" | 17 #include "FocusController.h" |
| 17 #include "Frame.h" | 18 #include "Frame.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 369 } |
| 369 } | 370 } |
| 370 } | 371 } |
| 371 | 372 |
| 372 bool WebPluginImpl::SetPostData(WebCore::ResourceRequest* request, | 373 bool WebPluginImpl::SetPostData(WebCore::ResourceRequest* request, |
| 373 const char *buf, | 374 const char *buf, |
| 374 uint32 length) { | 375 uint32 length) { |
| 375 std::vector<std::string> names; | 376 std::vector<std::string> names; |
| 376 std::vector<std::string> values; | 377 std::vector<std::string> values; |
| 377 std::vector<char> body; | 378 std::vector<char> body; |
| 379 #if !defined(OS_LINUX) |
| 378 bool rv = NPAPI::PluginHost::SetPostData(buf, length, &names, &values, &body); | 380 bool rv = NPAPI::PluginHost::SetPostData(buf, length, &names, &values, &body); |
| 381 #else |
| 382 // TODO(port): unstub once we have plugin support |
| 383 bool rv = false; |
| 384 NOTREACHED(); |
| 385 #endif |
| 379 | 386 |
| 380 for (size_t i = 0; i < names.size(); ++i) | 387 for (size_t i = 0; i < names.size(); ++i) |
| 381 request->addHTTPHeaderField(webkit_glue::StdStringToString(names[i]), | 388 request->addHTTPHeaderField(webkit_glue::StdStringToString(names[i]), |
| 382 webkit_glue::StdStringToString(values[i])); | 389 webkit_glue::StdStringToString(values[i])); |
| 383 | 390 |
| 384 WebCore::String content_type = request->httpContentType(); | 391 WebCore::String content_type = request->httpContentType(); |
| 385 if (content_type.isEmpty()) | 392 if (content_type.isEmpty()) |
| 386 request->setHTTPContentType("application/x-www-form-urlencoded"); | 393 request->setHTTPContentType("application/x-www-form-urlencoded"); |
| 387 | 394 |
| 388 RefPtr<WebCore::FormData> data = WebCore::FormData::create(); | 395 RefPtr<WebCore::FormData> data = WebCore::FormData::create(); |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 | 1283 |
| 1277 MultiPartResponseClient* multi_part_response_client = | 1284 MultiPartResponseClient* multi_part_response_client = |
| 1278 new MultiPartResponseClient(client); | 1285 new MultiPartResponseClient(client); |
| 1279 | 1286 |
| 1280 MultipartResponseDelegate* multi_part_response_handler = | 1287 MultipartResponseDelegate* multi_part_response_handler = |
| 1281 new MultipartResponseDelegate(multi_part_response_client, NULL, | 1288 new MultipartResponseDelegate(multi_part_response_client, NULL, |
| 1282 response, | 1289 response, |
| 1283 multipart_boundary); | 1290 multipart_boundary); |
| 1284 multi_part_response_map_[client] = multi_part_response_handler; | 1291 multi_part_response_map_[client] = multi_part_response_handler; |
| 1285 } | 1292 } |
| OLD | NEW |