Chromium Code Reviews| Index: content/child/npapi/webplugin_delegate_impl.cc |
| =================================================================== |
| --- content/child/npapi/webplugin_delegate_impl.cc (revision 245386) |
| +++ content/child/npapi/webplugin_delegate_impl.cc (working copy) |
| @@ -11,6 +11,7 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "base/process/process_handle.h" |
| #include "base/strings/string_util.h" |
| +#include "base/strings/utf_string_conversions.h" |
| #include "content/child/npapi/plugin_instance.h" |
| #include "content/child/npapi/plugin_lib.h" |
| #include "content/child/npapi/plugin_stream_url.h" |
| @@ -51,6 +52,11 @@ |
| const std::vector<std::string>& arg_names, |
| const std::vector<std::string>& arg_values, |
| bool load_manually) { |
| + if (instance_->plugin_lib()->plugin_info().name.find( |
| + base::ASCIIToUTF16("QuickTime Plug-in")) != std::wstring::npos) { |
| + quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA; |
|
ananta
2014/01/17 18:51:02
Would it be possible to check the mime type of the
jam
2014/01/17 19:09:17
Done.
|
| + } |
| + |
| instance_->set_web_plugin(plugin_); |
| if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { |
| PluginLib* plugin_lib = instance()->plugin_lib(); |
| @@ -316,10 +322,11 @@ |
| PluginStreamUrl* plugin_stream = instance()->CreateStream( |
| resource_id, url, std::string(), notify_id); |
| + bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); |
| plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( |
| plugin_stream, url, first_party_for_cookies, method, buf, len, |
| referrer, notify_redirects, is_plugin_src_load, origin_pid, |
| - render_frame_id, resource_id)); |
| + render_frame_id, resource_id, copy_stream_data)); |
| } |
| } // namespace content |