| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "webkit/glue/plugins/plugin_instance.h" | 9 #include "webkit/glue/plugins/plugin_instance.h" |
| 10 | 10 |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 const std::string& mime_type, | 368 const std::string& mime_type, |
| 369 const std::string& headers, | 369 const std::string& headers, |
| 370 uint32 expected_length, | 370 uint32 expected_length, |
| 371 uint32 last_modified) { | 371 uint32 last_modified) { |
| 372 DCHECK(load_manually_); | 372 DCHECK(load_manually_); |
| 373 std::string response_url = url; | 373 std::string response_url = url; |
| 374 if (response_url.empty()) { | 374 if (response_url.empty()) { |
| 375 response_url = instance_url_.spec(); | 375 response_url = instance_url_.spec(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 bool cancel = false; | |
| 379 | |
| 380 plugin_data_stream_ = CreateStream(-1, url, mime_type, false, NULL); | 378 plugin_data_stream_ = CreateStream(-1, url, mime_type, false, NULL); |
| 381 | 379 |
| 382 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length, | 380 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length, |
| 383 last_modified, true, &cancel); | 381 last_modified, true); |
| 384 } | 382 } |
| 385 | 383 |
| 386 void PluginInstance::DidReceiveManualData(const char* buffer, int length) { | 384 void PluginInstance::DidReceiveManualData(const char* buffer, int length) { |
| 387 DCHECK(load_manually_); | 385 DCHECK(load_manually_); |
| 388 if (plugin_data_stream_.get() != NULL) { | 386 if (plugin_data_stream_.get() != NULL) { |
| 389 plugin_data_stream_->DidReceiveData(buffer, length, 0); | 387 plugin_data_stream_->DidReceiveData(buffer, length, 0); |
| 390 } | 388 } |
| 391 } | 389 } |
| 392 | 390 |
| 393 void PluginInstance::DidFinishManualLoading() { | 391 void PluginInstance::DidFinishManualLoading() { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 stream->url, range_info.c_str(), | 501 stream->url, range_info.c_str(), |
| 504 reinterpret_cast<intptr_t>(plugin_stream), | 502 reinterpret_cast<intptr_t>(plugin_stream), |
| 505 plugin_stream->notify_needed(), | 503 plugin_stream->notify_needed(), |
| 506 reinterpret_cast<intptr_t>(plugin_stream->notify_data())); | 504 reinterpret_cast<intptr_t>(plugin_stream->notify_data())); |
| 507 break; | 505 break; |
| 508 } | 506 } |
| 509 } | 507 } |
| 510 } | 508 } |
| 511 | 509 |
| 512 } // namespace NPAPI | 510 } // namespace NPAPI |
| OLD | NEW |