diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 00:19:03 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 00:19:03 +0000 |
commit | 972cdd84b75d4d6378233d5532d384985b23c56d (patch) | |
tree | f774318cb733aefc0f190c7e096706a5c58aa673 /content/test | |
parent | 6fe635d08fc4956cdfc26d2a9ac46f85f5b36214 (diff) | |
download | chromium_src-972cdd84b75d4d6378233d5532d384985b23c56d.zip chromium_src-972cdd84b75d4d6378233d5532d384985b23c56d.tar.gz chromium_src-972cdd84b75d4d6378233d5532d384985b23c56d.tar.bz2 |
browser-plugin: Allow accepting drag-n-drop events.
This allows dragging content from within the embedder (or other windows) into
the browser-tag plugin.
BUG=120264
Review URL: https://codereview.chromium.org/11088043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
-rw-r--r-- | content/test/data/browser_plugin_dragging.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/content/test/data/browser_plugin_dragging.html b/content/test/data/browser_plugin_dragging.html new file mode 100644 index 0000000..cecfd14 --- /dev/null +++ b/content/test/data/browser_plugin_dragging.html @@ -0,0 +1,29 @@ +<textarea id='id_message'> +</textarea> + +<object id="plugin" + tabindex="0" + type="application/browser-plugin" + width="240" + height="120" + style='border: solid 1px red' + contentEditable + > +</object> + +<script> +function dragLocation() { + return [id_message.offsetLeft + id_message.offsetWidth / 2, + id_message.offsetTop + id_message.offsetHeight / 2]; +} + +function dropLocation() { + return [plugin.offsetLeft + plugin.offsetWidth / 2, + plugin.offsetTop + plugin.offsetHeight / 2]; +} + +function SetSrc(src) { + plugin = document.getElementById('plugin'); + plugin.src = src; +} +</script> |