| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/child/npapi/plugin_instance.h" | 5 #include "content/child/npapi/plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 | 401 |
| 402 void PluginInstance::DidReceiveManualResponse(const GURL& url, | 402 void PluginInstance::DidReceiveManualResponse(const GURL& url, |
| 403 const std::string& mime_type, | 403 const std::string& mime_type, |
| 404 const std::string& headers, | 404 const std::string& headers, |
| 405 uint32 expected_length, | 405 uint32 expected_length, |
| 406 uint32 last_modified) { | 406 uint32 last_modified) { |
| 407 DCHECK(load_manually_); | 407 DCHECK(load_manually_); |
| 408 | 408 |
| 409 plugin_data_stream_ = CreateStream(-1, url, mime_type, 0); | 409 plugin_data_stream_ = |
| 410 CreateStream(static_cast<unsigned long>(-1), url, mime_type, 0); |
| 410 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length, | 411 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length, |
| 411 last_modified, true); | 412 last_modified, true); |
| 412 } | 413 } |
| 413 | 414 |
| 414 void PluginInstance::DidReceiveManualData(const char* buffer, int length) { | 415 void PluginInstance::DidReceiveManualData(const char* buffer, int length) { |
| 415 DCHECK(load_manually_); | 416 DCHECK(load_manually_); |
| 416 if (plugin_data_stream_.get() != NULL) { | 417 if (plugin_data_stream_.get() != NULL) { |
| 417 plugin_data_stream_->DidReceiveData(buffer, length, 0); | 418 plugin_data_stream_->DidReceiveData(buffer, length, 0); |
| 418 } | 419 } |
| 419 } | 420 } |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 if (plugin_stream->notify_data() == notify_data) { | 688 if (plugin_stream->notify_data() == notify_data) { |
| 688 PluginStreamUrl* plugin_stream_url = | 689 PluginStreamUrl* plugin_stream_url = |
| 689 static_cast<PluginStreamUrl*>(plugin_stream); | 690 static_cast<PluginStreamUrl*>(plugin_stream); |
| 690 plugin_stream_url->URLRedirectResponse(allow); | 691 plugin_stream_url->URLRedirectResponse(allow); |
| 691 break; | 692 break; |
| 692 } | 693 } |
| 693 } | 694 } |
| 694 } | 695 } |
| 695 | 696 |
| 696 } // namespace content | 697 } // namespace content |
| OLD | NEW |