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

Unified Diff: ppapi/c/ppb_instance.h

Issue 7038044: First step to remove scripting from PPP_Instance and PPB_Instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 7 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
« no previous file with comments | « no previous file | ppapi/c/ppp_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/ppb_instance.h
diff --git a/ppapi/c/ppb_instance.h b/ppapi/c/ppb_instance.h
index e63eff4fd039a3a82a7b412742d88323b567aed0..09e8c99f7c9b5dbe656038bc38a3f99b229dddfc 100644
--- a/ppapi/c/ppb_instance.h
+++ b/ppapi/c/ppb_instance.h
@@ -11,7 +11,12 @@
#include "ppapi/c/pp_var.h"
#define PPB_INSTANCE_INTERFACE_0_4 "PPB_Instance;0.4"
+#define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5"
+#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
+#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_5
+#else
#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_4
+#endif
/**
* @file
@@ -28,25 +33,12 @@
* related to the module instance on a web page.
*
*/
-struct PPB_Instance {
- /**
- * GetWindowObject is a pointer to a function that determines
- * the DOM window containing this module instance.
- *
- * @param[in] instance A PP_Instance whose WindowObject should be retrieved.
- * @return A PP_Var containing window object on success.
- */
- struct PP_Var (*GetWindowObject)(PP_Instance instance);
-
- /**
- * GetOwnerElementObject is a pointer to a function that determines
- * the DOM element containing this module instance.
- *
- * @param[in] instance A PP_Instance whose WindowObject should be retrieved.
- * @return A PP_Var containing DOM element on success.
- */
- struct PP_Var (*GetOwnerElementObject)(PP_Instance instance);
+#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
+struct PPB_Instance {
+#else
+struct PPB_Instance_0_5 {
+#endif
/**
* BindGraphics is a pointer to a function that binds the given
* graphics as the current drawing surface. The
@@ -87,28 +79,22 @@ struct PPB_Instance {
*/
PP_Bool (*IsFullFrame)(PP_Instance instance);
- /**
- * ExecuteScript is a pointer to a function that executes the given
- * script in the context of the frame containing the module.
- *
- * The exception, if any, will be returned in *exception. As with the PPB_Var
- * interface, the exception parameter, if non-NULL, must be initialized
- * to a void exception or the function will immediately return. On success,
- * the exception parameter will be set to a "void" var. On failure, the
- * return value will be a "void" var.
- *
- * @param[in] script A string containing the JavaScript to execute.
- * @param[in/out] exception PP_Var containing the exception. Initialize
- * this to NULL if you don't want exception info; initialize this to a void
- * exception if want exception info.
- *
- * @return The result of the script execution, or a "void" var
- * if execution failed.
- */
+};
+
+#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
+struct PPB_Instance_0_4 {
+#else
+struct PPB_Instance {
+#endif
+ struct PP_Var (*GetWindowObject)(PP_Instance instance);
+ struct PP_Var (*GetOwnerElementObject)(PP_Instance instance);
+ PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device);
+ PP_Bool (*IsFullFrame)(PP_Instance instance);
struct PP_Var (*ExecuteScript)(PP_Instance instance,
struct PP_Var script,
struct PP_Var* exception);
};
+
/**
* @}
*/
« no previous file with comments | « no previous file | ppapi/c/ppp_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698