Index: ppapi/c/ppp_instance.h |
=================================================================== |
--- ppapi/c/ppp_instance.h (revision 75765) |
+++ ppapi/c/ppp_instance.h (working copy) |
@@ -5,6 +5,7 @@ |
#ifndef PPAPI_C_PPP_INSTANCE_H_ |
#define PPAPI_C_PPP_INSTANCE_H_ |
+#include "ppapi/c/dev/pp_message_event_dev.h" |
polina
2011/02/26 08:00:08
this file is no longer in the CL
dmichael(do not use this one)
2011/02/28 15:59:28
Done.
|
#include "ppapi/c/pp_bool.h" |
#include "ppapi/c/pp_instance.h" |
#include "ppapi/c/pp_rect.h" |
@@ -13,7 +14,7 @@ |
struct PP_InputEvent; |
struct PP_Var; |
-#define PPP_INSTANCE_INTERFACE "PPP_Instance;0.4" |
+#define PPP_INSTANCE_INTERFACE "PPP_Instance;0.5" |
/** |
* @file |
@@ -172,6 +173,25 @@ |
* @return A PP_Var containing scriptable object. |
*/ |
struct PP_Var (*GetInstanceObject)(PP_Instance instance); |
+ |
+ /** |
+ * This method gets called when postMessage is invoked on the DOM object for |
polina
2011/02/26 08:00:08
postMessage()
polina
2011/02/26 08:00:08
called asynchronously?
(you clarified this in the
dmichael(do not use this one)
2011/02/28 15:59:28
Done.
dmichael(do not use this one)
2011/02/28 15:59:28
Done.
|
+ * this instance in JavaScript. |
+ * |
+ * For example: |
+ * |
+ * <body> |
+ * <object id="plugin" |
+ * type="application/x-ppapi-postMessage-example"/> |
+ * <script type="text/javascript"> |
+ * document.getElementById('plugin').postMessage("Hello world!"); |
+ * </script> |
+ * </body> |
+ * |
+ * This will result in HandleMessage being invoked on the instance, with |
+ * message being a string PP_Var containing "Hello world!". |
polina
2011/02/26 08:00:08
In the other direction you pass an object with a p
dmichael(do not use this one)
2011/02/28 15:59:28
See previous review comments. I was originally go
|
+ */ |
+ void (*HandleMessage)(PP_Instance instance, struct PP_Var message); |
polina
2011/02/26 08:00:08
Why is this not called OnMessage?
brettw
2011/02/26 17:11:17
We decided not to use "On" since it can be ambiguo
polina
2011/02/26 20:06:36
I agree that "HandleMessage" is a better name in i
dmichael(do not use this one)
2011/02/28 15:59:28
See other comments. I want to keep the JS side 'o
|
}; |
/** |
* @} |