diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 23:00:09 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 23:00:09 +0000 |
commit | cc21fb5b4e675a86c8862b934aa8e100643e75e4 (patch) | |
tree | f5055650bc147382260bc397f417560c6090812e /webkit/glue/npruntime_util.h | |
parent | 5abb7f799f538318c702f0f26372b38464ab888a (diff) | |
download | chromium_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 'webkit/glue/npruntime_util.h')
-rw-r--r-- | webkit/glue/npruntime_util.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/webkit/glue/npruntime_util.h b/webkit/glue/npruntime_util.h index 1135246..1e27191 100644 --- a/webkit/glue/npruntime_util.h +++ b/webkit/glue/npruntime_util.h @@ -9,6 +9,10 @@ class Pickle; +namespace WebKit { +class WebDragData; +} + namespace webkit_glue { // Efficiently serialize/deserialize a NPIdentifier @@ -16,6 +20,17 @@ bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle); bool DeserializeNPIdentifier(const Pickle& pickle, void** pickle_iter, NPIdentifier* identifier); +// Return true (success) if the given npobj is the current +// drag event in browser dispatch, and is accessible based on context execution +// frames and their security origins and WebKit clipboard access policy. If so, +// return the event id and the clipboard data (WebDragData). +bool GetDragData(NPObject* npobj, int* event_id, WebKit::WebDragData* data); + +// Invoke the event access policy checks listed above with +// GetDragData(). No need for clipboard data or event_id outputs, just confirm +// the given npobj is the current & accessible drag event. +bool IsDragEvent(NPObject* npobj); + } // namespace webkit_glue #endif // WEBKIT_GLUE_NPRUNTIME_UTIL_H_ |