Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: content/child/npapi/webplugin_delegate_impl.cc

Issue 145483008: Merge 248007 "Expand the QuickTime quirk to handle all mime type..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } else { 46 } else {
47 delete this; 47 delete this;
48 } 48 }
49 } 49 }
50 50
51 bool WebPluginDelegateImpl::Initialize( 51 bool WebPluginDelegateImpl::Initialize(
52 const GURL& url, 52 const GURL& url,
53 const std::vector<std::string>& arg_names, 53 const std::vector<std::string>& arg_names,
54 const std::vector<std::string>& arg_values, 54 const std::vector<std::string>& arg_values,
55 bool load_manually) { 55 bool load_manually) {
56 if (instance_->mime_type() == "video/quicktime") 56 if (instance_->plugin_lib()->plugin_info().name.find(
57 base::ASCIIToUTF16("QuickTime Plug-in")) != std::wstring::npos) {
57 quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA; 58 quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA;
59 }
58 60
59 instance_->set_web_plugin(plugin_); 61 instance_->set_web_plugin(plugin_);
60 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { 62 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) {
61 PluginLib* plugin_lib = instance()->plugin_lib(); 63 PluginLib* plugin_lib = instance()->plugin_lib();
62 if (plugin_lib->instance_count() > 1) { 64 if (plugin_lib->instance_count() > 1) {
63 return false; 65 return false;
64 } 66 }
65 } 67 }
66 68
67 int argc = 0; 69 int argc = 0;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 resource_id, url, std::string(), notify_id); 324 resource_id, url, std::string(), notify_id);
323 325
324 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); 326 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA);
325 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( 327 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher(
326 plugin_stream, url, first_party_for_cookies, method, buf, len, 328 plugin_stream, url, first_party_for_cookies, method, buf, len,
327 referrer, notify_redirects, is_plugin_src_load, origin_pid, 329 referrer, notify_redirects, is_plugin_src_load, origin_pid,
328 render_view_id, resource_id, copy_stream_data)); 330 render_view_id, resource_id, copy_stream_data));
329 } 331 }
330 332
331 } // namespace content 333 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698