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

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

Issue 11092023: Browser Plugin: Implement CanGoBack/CanGoForward (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed creis@'s comments 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; 8 var redirectOldUrl;
9 var redirectNewUrl; 9 var redirectNewUrl;
10 function loadRedirect(event) { 10 function loadRedirect(event) {
11 document.title = "redirected"; 11 document.title = "redirected";
12 if (event.isTopLevel) { 12 if (event.isTopLevel) {
13 redirectOldUrl = event.oldUrl; 13 redirectOldUrl = event.oldUrl;
14 redirectNewUrl = event.newUrl; 14 redirectNewUrl = event.newUrl;
15 } 15 }
16 } 16 }
17 function SetSrc(src) { 17 function SetSrc(src) {
18 var plugin = document.getElementById('plugin'); 18 var plugin = document.getElementById('plugin');
19 plugin.src = src; 19 plugin.src = src;
20 } 20 }
21 function SetSize(w, h) { 21 function SetSize(w, h) {
22 var plugin = document.getElementById('plugin'); 22 var plugin = document.getElementById('plugin');
23 plugin.width = w; 23 plugin.width = w;
24 plugin.height = h; 24 plugin.height = h;
25 } 25 }
26 function Back() { 26 function Back() {
27 var plugin = document.getElementById('plugin'); 27 var plugin = document.getElementById('plugin');
28 plugin.back(); 28 plugin.back();
29 } 29 }
30 function CanGoBack() {
31 var plugin = document.getElementById('plugin');
32 return plugin.canGoBack();
33 }
34 function CanGoForward() {
35 var plugin = document.getElementById('plugin');
36 return plugin.canGoForward();
37 }
30 function Forward() { 38 function Forward() {
31 var plugin = document.getElementById('plugin'); 39 var plugin = document.getElementById('plugin');
32 plugin.forward(); 40 plugin.forward();
33 } 41 }
34 function Go(relativeIndex) { 42 function Go(relativeIndex) {
35 var plugin = document.getElementById('plugin'); 43 var plugin = document.getElementById('plugin');
36 plugin.go(relativeIndex); 44 plugin.go(relativeIndex);
37 } 45 }
38 function SetTitle(str) { 46 function SetTitle(str) {
39 document.title = str; 47 document.title = str;
40 } 48 }
41 document.title = 'embedder'; 49 document.title = 'embedder';
42 </script> 50 </script>
43 51
44 <object id="plugin" 52 <object id="plugin"
45 tabindex="0" 53 tabindex="0"
46 type="application/browser-plugin" 54 type="application/browser-plugin"
47 width="640" 55 width="640"
48 height="480" 56 height="480"
49 border="0px"></object> 57 border="0px"></object>
50 58
51 <script> 59 <script>
52 var plugin = document.getElementById('plugin'); 60 var plugin = document.getElementById('plugin');
53 plugin.addEventListener('loadStart', loadStart); 61 plugin.addEventListener('loadStart', loadStart);
54 plugin.addEventListener('loadAbort', loadAbort); 62 plugin.addEventListener('loadAbort', loadAbort);
55 plugin.addEventListener('loadRedirect', loadRedirect); 63 plugin.addEventListener('loadRedirect', loadRedirect);
56 </script> 64 </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