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

Side by Side Diff: ppapi/example/example.html

Issue 10697022: Delete the PPAPI example plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif); 1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif);
2 background-repeat:repeat" 2 background-repeat:repeat"
3 onload="SetPluginSize(400, 400)"> 3 onload="SetPluginSize(400, 400)">
4 4
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 isPluginDefaultSize = true; 6 isPluginDefaultSize = true;
7 7
8 function Test() {
9 var plugin = document.getElementById('plugin');
10 // Confirm that this no longer segfaults.
11 alert(plugin.toString(new Array(10)));
12
13 // Confirm that the renderer doesn't crash when the plugin module goes away
14 // while waiting for the reply to the HasPropery sync message.
15 plugin.removePluginWhenHasPropertyCalled;
16 }
17
18 function SetPluginSize(width, height) { 8 function SetPluginSize(width, height) {
19 plugin = document.getElementById('plugin'); 9 plugin = document.getElementById('plugin');
20 size = document.getElementById('size'); 10 size = document.getElementById('size');
21 plugin.width = width; 11 plugin.width = width;
22 plugin.height = height; 12 plugin.height = height;
23 size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width;
24 } 13 }
25 14
26 function ToggleSize() { 15 function ToggleSize() {
27 if (!isPluginDefaultSize) { 16 if (!isPluginDefaultSize) {
28 SetPluginSize(400, 400); 17 SetPluginSize(400, 400);
29 isPluginDefaultSize = true; 18 isPluginDefaultSize = true;
30 } else { 19 } else {
31 SetPluginSize(1000, 800); 20 SetPluginSize(1000, 800);
32 isPluginDefaultSize = false; 21 isPluginDefaultSize = false;
33 } 22 }
34 } 23 }
35 </script> 24 </script>
36 25
37 <button onclick='Test()'>Test</button> 26 <button onclick='ToggleSize()'>Toggle Size</button><br>
38 <button onclick='ToggleSize()'>Toggle Size</button>
39 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi dth:200px;">FPS GOES HERE</div>
40 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w idth:200px;"></div>
41 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object> 27 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object>
42 <hr>
43 </body> 28 </body>
OLDNEW
« ppapi/example/example.cc ('K') | « ppapi/example/example.cc ('k') | ppapi/ppapi_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698