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

Unified Diff: chrome/renderer/resources/plugin_poster.html

Issue 977653002: Plugin Power Saver: Accept SPACE or ENTER to unthrottle plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/plugin_poster.html
diff --git a/chrome/renderer/resources/plugin_poster.html b/chrome/renderer/resources/plugin_poster.html
index e75a59885b895897862a363ff2fe1f4cf596c86d..1dd5664ba01dc019109f122bcc0bc13c0d3d6b3d 100644
--- a/chrome/renderer/resources/plugin_poster.html
+++ b/chrome/renderer/resources/plugin_poster.html
@@ -8,6 +8,12 @@ function notifyDidFinishLoading() {
if (plugin.didFinishLoading)
plugin.didFinishLoading();
}
+
+document.onkeypress = function(e) {
Dan Beam 2015/03/03 19:51:51 nit: maybe do this onkeydown instead
tommycli 2015/03/03 20:02:00 Done.
+ if (e.keyCode == 13 || e.keyCode == 32) {
Dan Beam 2015/03/03 19:51:51 nit: e.keyIdentifier == 'Enter' || e.keyIdentifier
tommycli 2015/03/03 20:02:00 Done.
+ plugin.load();
Dan Beam 2015/03/03 19:51:51 e.preventDefault();
tommycli 2015/03/03 20:02:00 Done.
+ }
Dan Beam 2015/03/03 19:51:51 nit: no curlies
tommycli 2015/03/03 20:02:00 Added back due to adding e.preventDefault().
+};
</script>
<link rel="stylesheet" href="plugin_placeholders.css"></link>
<style>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698