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_; |