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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11414180: Add a gyp flag to allow removing dependency on ppapi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index 2500754fa50d3c0de08fe6f9908b7892c85ac6ed..1a3bc41f382eedf840e2fa69759712a846704ecf 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -83,6 +83,7 @@
#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
#include "webkit/plugins/ppapi/ppb_flash_impl.h"
#include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h"
@@ -335,6 +336,23 @@ PepperPluginDelegateImpl::~PepperPluginDelegateImpl() {
DCHECK(mouse_lock_instances_.empty());
}
+WebKit::WebPlugin* PepperPluginDelegateImpl::CreatePepperWebPlugin(
+ const webkit::WebPluginInfo& webplugin_info,
+ const WebKit::WebPluginParams& params) {
+ bool pepper_plugin_was_registered = false;
+ scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
+ CreatePepperPluginModule(webplugin_info, &pepper_plugin_was_registered));
+
+ if (pepper_plugin_was_registered) {
+ if (!pepper_module)
+ return NULL;
+ return new webkit::ppapi::WebPluginImpl(
+ pepper_module.get(), params, AsWeakPtr());
+ }
+
+ return NULL;
+}
+
scoped_refptr<webkit::ppapi::PluginModule>
PepperPluginDelegateImpl::CreatePepperPluginModule(
const webkit::WebPluginInfo& webplugin_info,
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698