Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Side by Side Diff: content/test/data/browser_plugin_embedder.html

Issue 11028019: Browser plugin: Implement loadRedirect event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script type="text/javascript"> 1 <script type="text/javascript">
2 function loadAbort(evt) { 2 function loadAbort(evt) {
3 document.title = evt.type; 3 document.title = evt.type;
4 } 4 }
5 function loadStart(evt) { 5 function loadStart(evt) {
6 document.title = evt.url; 6 document.title = evt.url;
7 } 7 }
8 var redirectOldUrl;
9 var redirectNewUrl;
10 function loadRedirect(event) {
11 document.title = "redirected";
12 if (event.isTopLevel) {
13 redirectOldUrl = event.oldUrl;
14 redirectNewUrl = event.newUrl;
15 }
16 }
8 function SetSrc(src) { 17 function SetSrc(src) {
9 var plugin = document.getElementById('plugin'); 18 var plugin = document.getElementById('plugin');
10 plugin.src = src; 19 plugin.src = src;
11 } 20 }
12 function SetSize(w, h) { 21 function SetSize(w, h) {
13 var plugin = document.getElementById('plugin'); 22 var plugin = document.getElementById('plugin');
14 plugin.width = w; 23 plugin.width = w;
15 plugin.height = h; 24 plugin.height = h;
16 } 25 }
17 function Back() { 26 function Back() {
(...skipping 18 matching lines...) Expand all
36 tabindex="0" 45 tabindex="0"
37 type="application/new-browser-plugin" 46 type="application/new-browser-plugin"
38 width="640" 47 width="640"
39 height="480" 48 height="480"
40 border="0px"></object> 49 border="0px"></object>
41 50
42 <script> 51 <script>
43 var plugin = document.getElementById('plugin'); 52 var plugin = document.getElementById('plugin');
44 plugin.addEventListener('loadStart', loadStart); 53 plugin.addEventListener('loadStart', loadStart);
45 plugin.addEventListener('loadAbort', loadAbort); 54 plugin.addEventListener('loadAbort', loadAbort);
55 plugin.addEventListener('loadRedirect', loadRedirect);
46 </script> 56 </script>
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698