summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_plugin_host.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 23:00:09 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 23:00:09 +0000
commitcc21fb5b4e675a86c8862b934aa8e100643e75e4 (patch)
treef5055650bc147382260bc397f417560c6090812e /chrome/browser/chrome_plugin_host.cc
parent5abb7f799f538318c702f0f26372b38464ab888a (diff)
downloadchromium_src-cc21fb5b4e675a86c8862b934aa8e100643e75e4.zip
chromium_src-cc21fb5b4e675a86c8862b934aa8e100643e75e4.tar.gz
chromium_src-cc21fb5b4e675a86c8862b934aa8e100643e75e4.tar.bz2
CPAPI gears drag drop and renderer IPC.
CPAPI (0.10) functions for gears drag drop; one to extract thedrag type/data given an NPObject *event, one to override thedrop effect (drag cursor). Gears drag drop API receives a browser event as an NPObject* sothe event is untrusted. Provide IPC calls to the renderer sogears can pass the event to renderer/V8 for checking, prior todrag type/data extraction, or the setting of the drop effect. Original patch by Noel Gordon via: http://codereview.chromium.org/99240 BUG=7995 TEST=none Review URL: http://codereview.chromium.org/112056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_plugin_host.cc')
-rw-r--r--chrome/browser/chrome_plugin_host.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index 08ad7e7..a8b5b17 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -527,6 +527,20 @@ CPError STDCALL CPB_HandleCommand(
return CPERR_FAILURE;
}
+CPError STDCALL CPB_GetDragData(
+ CPID id, CPBrowsingContext context, struct NPObject* event, bool add_data,
+ int32* identity, int32* event_id, char** drag_type, char** drag_data) {
+ *identity = *event_id = 0;
+ NOTREACHED() << "Should not be called in the browser process.";
+ return CPERR_FAILURE;
+}
+
+CPError STDCALL CPB_SetDropEffect(
+ CPID id, CPBrowsingContext context, struct NPObject* event, int effect) {
+ NOTREACHED() << "Should not be called in the browser process.";
+ return CPERR_FAILURE;
+}
+
//
// Functions related to network interception
//
@@ -768,6 +782,8 @@ CPBrowserFuncs* GetCPBrowserFuncsForBrowser() {
browser_funcs.send_sync_message = CPB_SendSyncMessage;
browser_funcs.plugin_thread_async_call = CPB_PluginThreadAsyncCall;
browser_funcs.open_file_dialog = CPB_OpenFileDialog;
+ browser_funcs.get_drag_data = CPB_GetDragData;
+ browser_funcs.set_drop_effect = CPB_SetDropEffect;
request_funcs.size = sizeof(request_funcs);
request_funcs.start_request = CPR_StartRequest;