Index: webkit/plugins/ppapi/ppapi_plugin_instance.h |
=================================================================== |
--- webkit/plugins/ppapi/ppapi_plugin_instance.h (revision 78910) |
+++ webkit/plugins/ppapi/ppapi_plugin_instance.h (working copy) |
@@ -29,9 +29,11 @@ |
struct PPB_Instance; |
struct PPB_Find_Dev; |
struct PPB_Fullscreen_Dev; |
+struct PPB_Messaging_Dev; |
struct PPB_Zoom_Dev; |
struct PPP_Find_Dev; |
struct PPP_Instance; |
+struct PPP_Messaging_Dev; |
struct PPP_Pdf; |
struct PPP_Selection_Dev; |
struct PPP_Zoom_Dev; |
@@ -53,6 +55,7 @@ |
namespace ppapi { |
class FullscreenContainer; |
+class MessageChannel; |
class ObjectVar; |
class PluginDelegate; |
class PluginModule; |
@@ -80,10 +83,12 @@ |
// exposed to the plugin. |
static const PPB_Find_Dev* GetFindInterface(); |
static const PPB_Fullscreen_Dev* GetFullscreenInterface(); |
+ static const PPB_Messaging_Dev* GetMessagingInterface(); |
static const PPB_Zoom_Dev* GetZoomInterface(); |
PluginDelegate* delegate() const { return delegate_; } |
PluginModule* module() const { return module_.get(); } |
+ MessageChannel& message_channel() { return *message_channel_; } |
WebKit::WebPluginContainer* container() const { return container_; } |
@@ -210,6 +215,11 @@ |
// Implementation of PPB_Flash. |
bool NavigateToURL(const char* url, const char* target); |
+ // Implementation of PPB_Messaging. |
brettw
2011/03/22 05:59:11
I'd just use one comment for both of these functio
|
+ void PostMessage(PP_Var message); |
+ // Passthrough for PPP_Messaging. |
+ void HandleMessage(PP_Var message); |
+ |
PluginDelegate::PlatformContext3D* CreateContext3D(); |
// Tracks all live ObjectVar. This is so we can map between PluginModule + |
@@ -230,6 +240,7 @@ |
private: |
bool LoadFindInterface(); |
+ bool LoadMessagingInterface(); |
bool LoadPdfInterface(); |
bool LoadSelectionInterface(); |
bool LoadZoomInterface(); |
@@ -315,6 +326,7 @@ |
// The plugin-provided interfaces. |
const PPP_Find_Dev* plugin_find_interface_; |
+ const PPP_Messaging_Dev* plugin_messaging_interface_; |
const PPP_Pdf* plugin_pdf_interface_; |
const PPP_Selection_Dev* plugin_selection_interface_; |
const PPP_Zoom_Dev* plugin_zoom_interface_; |
@@ -363,6 +375,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_; |
+ |
// Bitmap for crashed plugin. Lazily initialized, non-owning pointer. |
SkBitmap* sad_plugin_; |