summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_plugin_api.h
diff options
context:
space:
mode:
authorzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 23:43:42 +0000
committerzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 23:43:42 +0000
commita9f4d90f8a1643ccc27aba95cf60c4531b3db7b9 (patch)
tree0f6069b618b1847b12cdba7d18e2ba8326073eed /chrome/common/chrome_plugin_api.h
parentb2d85c6d595cd7b0b3807d2bb7849fee343d7394 (diff)
downloadchromium_src-a9f4d90f8a1643ccc27aba95cf60c4531b3db7b9.zip
chromium_src-a9f4d90f8a1643ccc27aba95cf60c4531b3db7b9.tar.gz
chromium_src-a9f4d90f8a1643ccc27aba95cf60c4531b3db7b9.tar.bz2
Adding sync plugin messages, and plugin broadcasts to the renderer processes
Review URL: http://codereview.chromium.org/2411 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_plugin_api.h')
-rw-r--r--chrome/common/chrome_plugin_api.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/common/chrome_plugin_api.h b/chrome/common/chrome_plugin_api.h
index 9e5301a..278787c 100644
--- a/chrome/common/chrome_plugin_api.h
+++ b/chrome/common/chrome_plugin_api.h
@@ -30,7 +30,7 @@ extern "C" {
// The current version of the API, used by the 'version' field of CPPluginFuncs
// and CPBrowserFuncs.
#define CP_MAJOR_VERSION 0
-#define CP_MINOR_VERSION 6
+#define CP_MINOR_VERSION 7
#define CP_VERSION ((CP_MAJOR_VERSION << 8) | (CP_MINOR_VERSION))
#define CP_GET_MAJOR_VERSION(version) ((version & 0xff00) >> 8)
@@ -374,9 +374,23 @@ typedef CPError (STDCALL *CPB_SendMessageFunc)(CPID id,
const void *data,
uint32 data_len);
+// Asks the browser to send raw data to the other process hosting an instance of
+// this plugin. This function only works from the plugin or renderer process.
+// This function blocks until the message is processed. The memory should be
+// freed using CPB_Free when done.
+typedef CPError (STDCALL *CPB_SendSyncMessageFunc)(CPID id,
+ const void *data,
+ uint32 data_len,
+ void **retval,
+ uint32 *retval_len);
+
// Informs the plugin of raw data having been sent from another process.
typedef void (STDCALL *CPP_OnMessageFunc)(void *data, uint32 data_len);
+// Informs the plugin of raw data having been sent from another process.
+typedef void (STDCALL *CPP_OnSyncMessageFunc)(void *data, uint32 data_len,
+ void **retval, uint32 *retval_len);
+
// Function table for issuing requests using via the other side's network stack.
// For the plugin, this functions deal with issuing requests through the
// browser. For the browser, these functions deal with allowing the plugin to
@@ -419,6 +433,7 @@ typedef struct _CPPluginFuncs {
CPP_OnMessageFunc on_message;
CPP_HtmlDialogClosedFunc html_dialog_closed;
CPP_HandleCommandFunc handle_command;
+ CPP_OnSyncMessageFunc on_sync_message;
} CPPluginFuncs;
// Function table CPB functions (functions provided by host to plugin).
@@ -446,6 +461,7 @@ typedef struct _CPBrowserFuncs {
CPB_GetCommandLineArgumentsFunc get_command_line_arguments;
CPB_AddUICommandFunc add_ui_command;
CPB_HandleCommandFunc handle_command;
+ CPB_SendSyncMessageFunc send_sync_message;
} CPBrowserFuncs;