Index: content/common/pepper_plugin_registry.cc |
diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc |
index ed1c8d946e4179e6c62d60dee96a78adda0aa97a..e054999f6d72fb83c880c0b43c805c12376bc744 100644 |
--- a/content/common/pepper_plugin_registry.cc |
+++ b/content/common/pepper_plugin_registry.cc |
@@ -12,6 +12,7 @@ |
#include "base/utf_string_conversions.h" |
#include "content/public/common/content_client.h" |
#include "content/public/common/content_switches.h" |
+#include "ppapi/shared_impl/ppapi_permissions.h" |
#include "webkit/plugins/npapi/plugin_list.h" |
namespace { |
@@ -69,6 +70,11 @@ void ComputePluginsFromCommandLine( |
plugin.mime_types.push_back(mime_type); |
} |
+ // Command-line plugins get full permissions. |
+ plugin.permissions = ppapi::PERMISSION_DEV | |
+ ppapi::PERMISSION_PRIVATE | |
+ ppapi::PERMISSION_BYPASS_USER_GESTURE; |
+ |
plugins->push_back(plugin); |
} |
} |
@@ -217,7 +223,8 @@ PepperPluginRegistry::PepperPluginRegistry() { |
continue; // Out of process plugins need no special pre-initialization. |
scoped_refptr<webkit::ppapi::PluginModule> module = |
- new webkit::ppapi::PluginModule(current.name, current.path, this); |
+ new webkit::ppapi::PluginModule(current.name, current.path, this, |
+ ppapi::PpapiPermissions(current.permissions)); |
AddLiveModule(current.path, module); |
if (current.is_internal) { |
if (!module->InitAsInternalPlugin(current.internal_entry_points)) { |