| 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/webplugin_delegate_impl.h" | 5 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } else { | 45 } else { |
| 46 delete this; | 46 delete this; |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool WebPluginDelegateImpl::Initialize( | 50 bool WebPluginDelegateImpl::Initialize( |
| 51 const GURL& url, | 51 const GURL& url, |
| 52 const std::vector<std::string>& arg_names, | 52 const std::vector<std::string>& arg_names, |
| 53 const std::vector<std::string>& arg_values, | 53 const std::vector<std::string>& arg_values, |
| 54 bool load_manually) { | 54 bool load_manually) { |
| 55 if (instance_->mime_type() == "video/quicktime") | 55 if (instance_->plugin_lib()->plugin_info().name.find( |
| 56 base::ASCIIToUTF16("QuickTime Plug-in")) != std::wstring::npos) { |
| 56 quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA; | 57 quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA; |
| 58 } |
| 57 | 59 |
| 58 instance_->set_web_plugin(plugin_); | 60 instance_->set_web_plugin(plugin_); |
| 59 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { | 61 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { |
| 60 PluginLib* plugin_lib = instance()->plugin_lib(); | 62 PluginLib* plugin_lib = instance()->plugin_lib(); |
| 61 if (plugin_lib->instance_count() > 1) { | 63 if (plugin_lib->instance_count() > 1) { |
| 62 return false; | 64 return false; |
| 63 } | 65 } |
| 64 } | 66 } |
| 65 | 67 |
| 66 int argc = 0; | 68 int argc = 0; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 resource_id, url, std::string(), notify_id); | 323 resource_id, url, std::string(), notify_id); |
| 322 | 324 |
| 323 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); | 325 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); |
| 324 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( | 326 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( |
| 325 plugin_stream, url, first_party_for_cookies, method, buf, len, | 327 plugin_stream, url, first_party_for_cookies, method, buf, len, |
| 326 referrer, notify_redirects, is_plugin_src_load, origin_pid, | 328 referrer, notify_redirects, is_plugin_src_load, origin_pid, |
| 327 render_view_id, resource_id, copy_stream_data)); | 329 render_view_id, resource_id, copy_stream_data)); |
| 328 } | 330 } |
| 329 | 331 |
| 330 } // namespace content | 332 } // namespace content |
| OLD | NEW |