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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl.cc

Issue 14720012: Relanding this as the previous attempt failed due to build errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | « webkit/plugins/npapi/plugin_utils.cc ('k') | webkit/plugins/plugin_constants.h » ('j') | 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 "webkit/plugins/npapi/webplugin_delegate_impl.h" 5 #include "webkit/plugins/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.h" 11 #include "base/message_loop.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
15 #include "webkit/glue/webkit_glue.h" 15 #include "webkit/glue/webkit_glue.h"
16 #include "webkit/plugins/npapi/plugin_instance.h" 16 #include "webkit/plugins/npapi/plugin_instance.h"
17 #include "webkit/plugins/npapi/plugin_lib.h" 17 #include "webkit/plugins/npapi/plugin_lib.h"
18 #include "webkit/plugins/npapi/plugin_stream_url.h" 18 #include "webkit/plugins/npapi/plugin_stream_url.h"
19 #include "webkit/plugins/npapi/plugin_utils.h"
19 20
20 using WebKit::WebCursorInfo; 21 using WebKit::WebCursorInfo;
21 using WebKit::WebInputEvent; 22 using WebKit::WebInputEvent;
22 23
23 namespace webkit { 24 namespace webkit {
24 namespace npapi { 25 namespace npapi {
25 26
26 WebPluginDelegateImpl* WebPluginDelegateImpl::Create( 27 WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
27 const base::FilePath& filename, 28 const base::FilePath& filename,
28 const std::string& mime_type) { 29 const std::string& mime_type) {
(...skipping 27 matching lines...) Expand all
56 57
57 instance_->set_web_plugin(plugin_); 58 instance_->set_web_plugin(plugin_);
58 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { 59 if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) {
59 PluginLib* plugin_lib = instance()->plugin_lib(); 60 PluginLib* plugin_lib = instance()->plugin_lib();
60 if (plugin_lib->instance_count() > 1) { 61 if (plugin_lib->instance_count() > 1) {
61 return false; 62 return false;
62 } 63 }
63 } 64 }
64 65
65 if (quirks_ & PLUGIN_QUIRK_DIE_AFTER_UNLOAD) 66 if (quirks_ & PLUGIN_QUIRK_DIE_AFTER_UNLOAD)
66 webkit_glue::SetForcefullyTerminatePluginProcess(true); 67 webkit::npapi::SetForcefullyTerminatePluginProcess(true);
67 68
68 int argc = 0; 69 int argc = 0;
69 scoped_ptr<char*[]> argn(new char*[arg_names.size()]); 70 scoped_ptr<char*[]> argn(new char*[arg_names.size()]);
70 scoped_ptr<char*[]> argv(new char*[arg_names.size()]); 71 scoped_ptr<char*[]> argv(new char*[arg_names.size()]);
71 for (size_t i = 0; i < arg_names.size(); ++i) { 72 for (size_t i = 0; i < arg_names.size(); ++i) {
72 if (quirks_ & PLUGIN_QUIRK_NO_WINDOWLESS && 73 if (quirks_ & PLUGIN_QUIRK_NO_WINDOWLESS &&
73 LowerCaseEqualsASCII(arg_names[i], "windowlessvideo")) { 74 LowerCaseEqualsASCII(arg_names[i], "windowlessvideo")) {
74 continue; 75 continue;
75 } 76 }
76 argn[argc] = const_cast<char*>(arg_names[i].c_str()); 77 argn[argc] = const_cast<char*>(arg_names[i].c_str());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 resource_id, url, std::string(), notify_id); 292 resource_id, url, std::string(), notify_id);
292 } 293 }
293 294
294 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( 295 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient(
295 unsigned long resource_id, int range_request_id) { 296 unsigned long resource_id, int range_request_id) {
296 return instance()->GetRangeRequest(range_request_id); 297 return instance()->GetRangeRequest(range_request_id);
297 } 298 }
298 299
299 } // namespace npapi 300 } // namespace npapi
300 } // namespace webkit 301 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_utils.cc ('k') | webkit/plugins/plugin_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698