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>2009-01-13 23:54:57 +0000
committerzork@google.com <zork@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 23:54:57 +0000
commitb62d1a8c6795a9feefe4a2e688463c56ce46a6bd (patch)
tree229f2d9bd915151f13642b5841c58603b0819690 /chrome/common/chrome_plugin_api.h
parent10dd1a30fbaee0315e78d1752cbf1fa8e22c99e4 (diff)
downloadchromium_src-b62d1a8c6795a9feefe4a2e688463c56ce46a6bd.zip
chromium_src-b62d1a8c6795a9feefe4a2e688463c56ce46a6bd.tar.gz
chromium_src-b62d1a8c6795a9feefe4a2e688463c56ce46a6bd.tar.bz2
Updating so that Gears can spawn file selectors when running in the renderer process
Review URL: http://codereview.chromium.org/14907 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_plugin_api.h')
-rw-r--r--chrome/common/chrome_plugin_api.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/common/chrome_plugin_api.h b/chrome/common/chrome_plugin_api.h
index 14a54e5..039dac8 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 8
+#define CP_MINOR_VERSION 9
#define CP_VERSION ((CP_MAJOR_VERSION << 8) | (CP_MINOR_VERSION))
#define CP_GET_MAJOR_VERSION(version) ((version & 0xff00) >> 8)
@@ -390,6 +390,16 @@ typedef CPError (STDCALL *CPB_PluginThreadAsyncCallFunc)(CPID id,
void (*func)(void *),
void *user_data);
+// This function creates an open file dialog. The process is granted access
+// to any files that are selected. |multiple_files| determines if more than
+// one file can be selected.
+typedef CPError (STDCALL *CPB_OpenFileDialogFunc)(CPID id,
+ CPBrowsingContext context,
+ bool multiple_files,
+ const char *title,
+ const char *filter,
+ void *user_data);
+
// Informs the plugin of raw data having been sent from another process.
typedef void (STDCALL *CPP_OnMessageFunc)(void *data, uint32 data_len);
@@ -397,6 +407,12 @@ typedef void (STDCALL *CPP_OnMessageFunc)(void *data, uint32 data_len);
typedef void (STDCALL *CPP_OnSyncMessageFunc)(void *data, uint32 data_len,
void **retval, uint32 *retval_len);
+// Informs the plugin that the file dialog has completed, and contains the
+// results.
+typedef void (STDCALL *CPP_OnFileDialogResultFunc)(void *data,
+ const char **files,
+ uint32 files_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
@@ -440,6 +456,7 @@ typedef struct _CPPluginFuncs {
CPP_HtmlDialogClosedFunc html_dialog_closed;
CPP_HandleCommandFunc handle_command;
CPP_OnSyncMessageFunc on_sync_message;
+ CPP_OnFileDialogResultFunc on_file_dialog_result;
} CPPluginFuncs;
// Function table CPB functions (functions provided by host to plugin).
@@ -469,6 +486,7 @@ typedef struct _CPBrowserFuncs {
CPB_HandleCommandFunc handle_command;
CPB_SendSyncMessageFunc send_sync_message;
CPB_PluginThreadAsyncCallFunc plugin_thread_async_call;
+ CPB_OpenFileDialogFunc open_file_dialog;
} CPBrowserFuncs;