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

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

Issue 14588009: PPAPI/NaCl: Move event dispatching from the plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 1 month 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_instance_impl.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 1f92c999879d12f22d0a02244807359c2c72c438..056a356bd9c453d33f3918cf592a8fc35dd90080 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -1374,12 +1374,22 @@ bool PepperPluginInstanceImpl::LoadPrintInterface() {
}
bool PepperPluginInstanceImpl::LoadPrivateInterface() {
+ // If this is a NaCl app, we want to talk to the trusted NaCl plugin to
+ // call GetInstanceObject. This is necessary to ensure that the properties
+ // the trusted plugin exposes (readyState and lastError) work properly. Note
+ // that untrusted NaCl apps are not allowed to provide PPP_InstancePrivate,
+ // so it's correct to never look up PPP_InstancePrivate for them.
+ //
+ // If this is *not* a NaCl plugin, original_module_ will never be set; we talk
+ // to the "real" module.
+ scoped_refptr<PluginModule> module = original_module_ ? original_module_ :
+ module_;
// Only check for the interface if the plugin has private permission.
- if (!module_->permissions().HasPermission(ppapi::PERMISSION_PRIVATE))
+ if (!module->permissions().HasPermission(ppapi::PERMISSION_PRIVATE))
return false;
if (!plugin_private_interface_) {
plugin_private_interface_ = static_cast<const PPP_Instance_Private*>(
- module_->GetPluginInterface(PPP_INSTANCE_PRIVATE_INTERFACE));
+ module->GetPluginInterface(PPP_INSTANCE_PRIVATE_INTERFACE));
}
return !!plugin_private_interface_;
@@ -2666,10 +2676,6 @@ NPP PepperPluginInstanceImpl::instanceNPP() {
return npp_.get();
}
-v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const {
- return isolate_;
-}
-
PepperPluginInstance* PepperPluginInstance::Get(PP_Instance instance_id) {
return HostGlobals::Get()->GetInstance(instance_id);
}
@@ -2682,6 +2688,10 @@ WebKit::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() {
return container_;
}
+v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const {
+ return isolate_;
+}
+
ppapi::VarTracker* PepperPluginInstanceImpl::GetVarTracker() {
return HostGlobals::Get()->GetVarTracker();
}
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698