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

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

Issue 139303020: Merge 245600 "Give QuickTime the plugin stream data in writeable..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 11 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 | « content/child/npapi/webplugin_delegate_impl.h ('k') | 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"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/process/process_handle.h" 12 #include "base/process/process_handle.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h"
14 #include "content/child/npapi/plugin_instance.h" 15 #include "content/child/npapi/plugin_instance.h"
15 #include "content/child/npapi/plugin_lib.h" 16 #include "content/child/npapi/plugin_lib.h"
16 #include "content/child/npapi/plugin_stream_url.h" 17 #include "content/child/npapi/plugin_stream_url.h"
17 #include "content/child/npapi/plugin_url_fetcher.h" 18 #include "content/child/npapi/plugin_url_fetcher.h"
18 #include "third_party/WebKit/public/web/WebInputEvent.h" 19 #include "third_party/WebKit/public/web/WebInputEvent.h"
19 20
20 using blink::WebCursorInfo; 21 using blink::WebCursorInfo;
21 using blink::WebInputEvent; 22 using blink::WebInputEvent;
22 23
23 namespace content { 24 namespace content {
(...skipping 20 matching lines...) Expand all
44 } else { 45 } else {
45 delete this; 46 delete this;
46 } 47 }
47 } 48 }
48 49
49 bool WebPluginDelegateImpl::Initialize( 50 bool WebPluginDelegateImpl::Initialize(
50 const GURL& url, 51 const GURL& url,
51 const std::vector<std::string>& arg_names, 52 const std::vector<std::string>& arg_names,
52 const std::vector<std::string>& arg_values, 53 const std::vector<std::string>& arg_values,
53 bool load_manually) { 54 bool load_manually) {
55 if (instance_->mime_type() == "video/quicktime")
56 quirks_ |= PLUGIN_QUIRK_COPY_STREAM_DATA;
57
54 instance_->set_web_plugin(plugin_); 58 instance_->set_web_plugin(plugin_);
55 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { 59 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) {
56 PluginLib* plugin_lib = instance()->plugin_lib(); 60 PluginLib* plugin_lib = instance()->plugin_lib();
57 if (plugin_lib->instance_count() > 1) { 61 if (plugin_lib->instance_count() > 1) {
58 return false; 62 return false;
59 } 63 }
60 } 64 }
61 65
62 int argc = 0; 66 int argc = 0;
63 scoped_ptr<char*[]> argn(new char*[arg_names.size()]); 67 scoped_ptr<char*[]> argn(new char*[arg_names.size()]);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 const GURL& referrer, 313 const GURL& referrer,
310 bool notify_redirects, 314 bool notify_redirects,
311 bool is_plugin_src_load, 315 bool is_plugin_src_load,
312 int origin_pid, 316 int origin_pid,
313 int render_view_id) { 317 int render_view_id) {
314 // TODO(jam): once we switch over to resource loading always happening in this 318 // TODO(jam): once we switch over to resource loading always happening in this
315 // code path, remove WebPluginResourceClient abstraction. 319 // code path, remove WebPluginResourceClient abstraction.
316 PluginStreamUrl* plugin_stream = instance()->CreateStream( 320 PluginStreamUrl* plugin_stream = instance()->CreateStream(
317 resource_id, url, std::string(), notify_id); 321 resource_id, url, std::string(), notify_id);
318 322
323 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA);
319 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( 324 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher(
320 plugin_stream, url, first_party_for_cookies, method, buf, len, 325 plugin_stream, url, first_party_for_cookies, method, buf, len,
321 referrer, notify_redirects, is_plugin_src_load, origin_pid, 326 referrer, notify_redirects, is_plugin_src_load, origin_pid,
322 render_view_id, resource_id)); 327 render_view_id, resource_id, copy_stream_data));
323 } 328 }
324 329
325 } // namespace content 330 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/webplugin_delegate_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698