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

Unified Diff: content/browser/browser_plugin/example.html

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@'s comments Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_plugin/example.html
diff --git a/content/browser/browser_plugin/example.html b/content/browser/browser_plugin/example.html
new file mode 100644
index 0000000000000000000000000000000000000000..efc6772e6b5b17fb9e93a97bbf02cc568a150b12
--- /dev/null
+++ b/content/browser/browser_plugin/example.html
@@ -0,0 +1,40 @@
+<body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo.gif);
+ background-repeat:repeat"
+ onload="SetPluginSize(400, 400)">
+
+<script type="text/javascript">
+isPluginDefaultSize = true;
+
+function Test() {
+ plugin = document.getElementById('plugin');
+ // Confirm that this no longer segfaults.
+ alert(plugin.toString(new Array(10)));
+}
+
+function SetPluginSize(width, height) {
+ plugin = document.getElementById('plugin');
+ size = document.getElementById('size');
+ plugin.width = width;
+ plugin.height = height;
+ size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width;
+}
+
+function ToggleSize() {
+ if (!isPluginDefaultSize) {
+ SetPluginSize(400, 400);
+ isPluginDefaultSize = true;
+ } else {
+ SetPluginSize(1000, 800);
+ isPluginDefaultSize = false;
+ }
+}
+</script>
+
+ <button onclick='Test()'>Test</button>
+ <button onclick='ToggleSize()'>Toggle Size</button>
+ <div id="fps" style="background-color:white; font-weight:bold; padding:4px; width:200px;">FPS GOES HERE</div>
+ <div id="size" style="background-color:white; font-weight:bold; padding:4px; width:200px;"></div>
+ <object id="plugin" src="http://www.google.com/" type="application/browser-plugin" width="400" height="400" border="2px"></object>
+ <object id="plugin2" src="http://www.chromium.org/"type="application/browser-plugin" width="640" height="480" border="2px"></object>
+ <hr>
+</body>
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_host.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698