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

Unified Diff: webkit/plugins/ppapi/ppapi_webplugin_impl.cc

Issue 6716005: A proposal and implementation for an initial postMessage interface. These in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« ppapi/cpp/instance.h ('K') | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_webplugin_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_webplugin_impl.cc (revision 78988)
+++ webkit/plugins/ppapi/ppapi_webplugin_impl.cc (working copy)
@@ -12,6 +12,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
+#include "webkit/plugins/ppapi/message_channel.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
@@ -90,9 +91,14 @@
NPObject* WebPluginImpl::scriptableObject() {
scoped_refptr<ObjectVar> object(
ObjectVar::FromPPVar(instance_->GetInstanceObject()));
- if (object)
- return object->np_object();
- return NULL;
+ // If there's an InstanceObject, tell the Instance's MessageChannel to pass
+ // any non-postMessage calls to it.
+ if (object) {
+ instance_->message_channel().set_passthrough_object(
+ object->np_object());
+ }
+ // And return the instance's MessageChannel.
+ return instance_->message_channel().np_object();
piman 2011/03/29 04:40:22 Mmmh.... This CL is causing http://code.google.com
}
void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) {
« ppapi/cpp/instance.h ('K') | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698