diff options
author | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-17 23:38:33 +0000 |
---|---|---|
committer | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-17 23:38:33 +0000 |
commit | 4f1cd759f5bc58dc12238df5b7d21610b8882dd0 (patch) | |
tree | a5d09af1a63b98f514ed299e8fe14cebf9059eeb /content/test | |
parent | 31bb9d89297b6e65590ae3d69a188411f9dbfa8d (diff) | |
download | chromium_src-4f1cd759f5bc58dc12238df5b7d21610b8882dd0.zip chromium_src-4f1cd759f5bc58dc12238df5b7d21610b8882dd0.tar.gz chromium_src-4f1cd759f5bc58dc12238df5b7d21610b8882dd0.tar.bz2 |
BrowserPlugin: Implement internal attach API
This API permits passing the browser process an arbitrary number of parameters
from the *view shims. This enables implementing attributes entirely in the chrome
layer.
BUG=166165
Test=WebViewTest.*, AdViewTest.*
TBR=miket@chromium.org for ad_view.js (which I will be OWNER of soon)
Review URL: https://chromiumcodereview.appspot.com/19290003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
4 files changed, 21 insertions, 3 deletions
diff --git a/content/test/data/browser_plugin_dragging.html b/content/test/data/browser_plugin_dragging.html index 66375e0..80cc14b 100644 --- a/content/test/data/browser_plugin_dragging.html +++ b/content/test/data/browser_plugin_dragging.html @@ -29,6 +29,11 @@ function SetSrc(src) { plugin = document.getElementById('plugin'); plugin.src = src; } + +var plugin = document.getElementById('plugin'); +plugin.addEventListener('-internal-instanceid-allocated', function(e) { + plugin['-internal-attach']({}); +}); </script> </body> diff --git a/content/test/data/browser_plugin_embedder.html b/content/test/data/browser_plugin_embedder.html index ec9e3fc..73ce463 100644 --- a/content/test/data/browser_plugin_embedder.html +++ b/content/test/data/browser_plugin_embedder.html @@ -54,7 +54,11 @@ function receiveMessage(event) { } } } - var plugin = document.getElementById('plugin'); - window.addEventListener('message', receiveMessage, false); - plugin.addEventListener('-internal-sizechanged', sizeChanged); + +var plugin = document.getElementById('plugin'); +window.addEventListener('message', receiveMessage, false); +plugin.addEventListener('-internal-sizechanged', sizeChanged); +plugin.addEventListener('-internal-instanceid-allocated', function(e) { + plugin['-internal-attach']({}); +}); </script> diff --git a/content/test/data/browser_plugin_embedder_guest_unresponsive.html b/content/test/data/browser_plugin_embedder_guest_unresponsive.html index 734878c..f6e819b 100644 --- a/content/test/data/browser_plugin_embedder_guest_unresponsive.html +++ b/content/test/data/browser_plugin_embedder_guest_unresponsive.html @@ -25,4 +25,7 @@ function GuestResponsive(evt) { var plugin = document.getElementById('plugin'); plugin.addEventListener('-internal-unresponsive', GuestUnresponsive); plugin.addEventListener('-internal-responsive', GuestResponsive); + plugin.addEventListener('-internal-instanceid-allocated', function(e) { + plugin['-internal-attach']({}); + }); </script> diff --git a/content/test/data/browser_plugin_focus.html b/content/test/data/browser_plugin_focus.html index 9d47cf3..b6b0dff 100644 --- a/content/test/data/browser_plugin_focus.html +++ b/content/test/data/browser_plugin_focus.html @@ -17,5 +17,11 @@ height="480" border="0px"></object> <button id="after" tabindex="0">After</button> +<script type="text/javascript"> +var plugin = document.getElementById('plugin'); +plugin.addEventListener('-internal-instanceid-allocated', function(e) { + plugin['-internal-attach']({}); +}); +</script> </body> </html> |