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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 6538028: A proposal for an initial postMessage interface. This will allow JavaScript ... (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
Index: webkit/plugins/ppapi/ppapi_plugin_instance.h
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.h (revision 77328)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.h (working copy)
@@ -53,6 +53,7 @@
namespace ppapi {
class FullscreenContainer;
+class MessageChannel;
class ObjectVar;
class PluginDelegate;
class PluginModule;
@@ -84,6 +85,7 @@
PluginDelegate* delegate() const { return delegate_; }
PluginModule* module() const { return module_.get(); }
+ MessageChannel& message_channel() { return *message_channel_; }
WebKit::WebPluginContainer* container() const { return container_; }
@@ -132,6 +134,7 @@
bool full_frame() const { return full_frame_; }
bool SetCursor(PP_CursorType_Dev type);
PP_Var ExecuteScript(PP_Var script, PP_Var* exception);
+ void PostMessage(PP_Var message);
// PPP_Instance pass-through.
void Delete();
@@ -142,6 +145,7 @@
bool HandleDocumentLoad(PPB_URLLoader_Impl* loader);
bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor_info);
+ void HandleMessage(PP_Var message);
PP_Var GetInstanceObject();
void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip);
@@ -358,6 +362,10 @@
// True if we are in fullscreen mode. Note: it is false during the transition.
bool fullscreen_;
+ // The MessageChannel used to implement bidirectional postMessage for the
+ // instance.
+ scoped_ptr<MessageChannel> message_channel_;
+
typedef std::set<PluginObject*> PluginObjectSet;
PluginObjectSet live_plugin_objects_;

Powered by Google App Engine
This is Rietveld 408576698