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

Unified Diff: chrome/browser/resources/plugins.js

Issue 9537014: Merge a bunch of CLs to whitelist the Google Talk plug-in when turning on click-to-play. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src
Patch Set: sync Created 8 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 | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/options/content_settings_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/plugins.js
diff --git a/chrome/browser/resources/plugins.js b/chrome/browser/resources/plugins.js
index 97f1e2679c77f1b09c11002197d9ffbd4c84b75c..77ec1aebd8571b0360e663816d62c7e676068739 100644
--- a/chrome/browser/resources/plugins.js
+++ b/chrome/browser/resources/plugins.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -125,33 +125,39 @@ function returnPluginsData(pluginsData){
// Add handlers to dynamically created HTML elements.
var links = document.getElementsByClassName('disable-plugin-link');
- for (var i = 0; i < links.length; ++i) {
+ for (var i = 0; i < links.length; i++) {
links[i].onclick = function () {
handleEnablePlugin(this, false, false);
return false;
};
}
links = document.getElementsByClassName('enable-plugin-link');
- for (var i = 0; i < links.length; ++i) {
+ for (var i = 0; i < links.length; i++) {
links[i].onclick = function () {
handleEnablePlugin(this, true, false);
return false;
};
}
links = document.getElementsByClassName('disable-group-link');
- for (var i = 0; i < links.length; ++i) {
+ for (var i = 0; i < links.length; i++) {
links[i].onclick = function () {
handleEnablePlugin(this, false, true);
return false;
};
}
links = document.getElementsByClassName('enable-group-link');
- for (var i = 0; i < links.length; ++i) {
+ for (var i = 0; i < links.length; i++) {
links[i].onclick = function () {
handleEnablePlugin(this, true, true);
return false;
};
}
+ var checkboxes = document.getElementsByClassName('always-allow');
+ for (var i = 0; i < checkboxes.length; i++) {
+ checkboxes[i].onclick = function () {
+ handleSetPluginAlwaysAllowed(this)
+ };
+ };
// Make sure the left column (with "Description:", "Location:", etc.) is the
// same size for all plugins.
@@ -209,6 +215,10 @@ function toggleTmiMode() {
chrome.send('saveShowDetailsToPrefs', [String(tmiModeExpanded)]);
}
+function handleSetPluginAlwaysAllowed(el) {
+ chrome.send('setPluginAlwaysAllowed', [el.identifier, el.checked]);
+}
+
/**
* Determines whether a plugin's version should be displayed.
*/
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/options/content_settings_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698