From fff14f6e66a778ee2dc02be1621195355f50333b Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Sat, 5 Jun 2010 05:56:21 +0000 Subject: Revert 48997 [causes Windows unit_tests to hang] - Group plugins in about:plugins and show update link for out-of-date ones. Patch by mavrommatis, original review here: . Original description follows: (1) Group plugins with the same name together. (2) Show a download link for plugin versions with known security problems in about:plugins. BUG=3910 TEST=Open "chrome://plugins", see that plugins are grouped, and that any vulnerable plugins are marked red. Try enabling and disabling plugin groups. Review URL: http://codereview.chromium.org/2686001 TBR=viettrungluu@chromium.org Review URL: http://codereview.chromium.org/2652002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49003 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/resources/plugins.html | 230 +++++++++++----------------------- 1 file changed, 76 insertions(+), 154 deletions(-) (limited to 'chrome/browser/resources/plugins.html') diff --git a/chrome/browser/resources/plugins.html b/chrome/browser/resources/plugins.html index d1a8d46..ba0a4a2 100644 --- a/chrome/browser/resources/plugins.html +++ b/chrome/browser/resources/plugins.html @@ -162,7 +162,7 @@ html[dir=rtl] .tmi-mode { } .plugin-disabled > td { - background-color: #f0f0f0; + background: url('gray.png') 0px 0px; color: #a0a0a0; padding-bottom: 4px; padding-top: 5px; @@ -173,26 +173,10 @@ html[dir=rtl] .tmi-mode { padding-top: 5px; } -.plugin-file-disabled { - background-color: #f0f0f0; - color: #a0a0a0; - padding-top: 5px; - padding-bottom: 5px; -} - -.plugin-file-enabled { - padding-top: 5px; - padding-bottom: 5px; -} - .plugin { border-bottom: 1px solid #cdcdcd; } -.critical { - color: red; -} - /* Indent the text related to each plug-in. */ .plugin-text { padding-left: 5px; @@ -219,10 +203,6 @@ html[dir=rtl] .plugin-text { -webkit-border-vertical-spacing: 0; } -.plugin-details { - padding-left: 1em; -} - /* Separate the inital line, Description, Location, and MIME Types lines. */ .plugin-details > div { padding-top: 0.1em @@ -289,41 +269,32 @@ button { */ var pluginDataFormat = { 'plugins': [ - { 'name': 'Group Name', - 'description': 'description', - 'version': 'version', - 'update_url': 'http://update/', - 'critical': true, - 'enabled': true, - 'plugin_files': [ - { - 'path': '/blahblah/blahblah/MyCrappyPlugin.plugin', - 'name': 'MyCrappyPlugin', - 'version': '1.2.3', - 'description': 'My crappy plugin', - 'mimeTypes': [ - { 'description': 'Foo Media', - 'fileExtensions': [ 'foo' ], - 'mimeType': 'application/x-my-foo' }, - { 'description': 'Bar Stuff', - 'fileExtensions': [ 'bar','baz' ], - 'mimeType': 'application/my-bar' } - ], - 'enabled': true - }, - { - 'path': '/foobar/baz/YourGreatPlugin.plugin', - 'name': 'YourGreatPlugin', - 'version': '4.5', - 'description': 'Your great plugin', - 'mimeTypes': [ - { 'description': 'Baz Stuff', - 'fileExtensions': [ 'baz' ], - 'mimeType': 'application/x-your-baz' } - ], - 'enabled': false - } - ] + { + 'path': '/blahblah/blahblah/MyCrappyPlugin.plugin', + 'name': 'MyCrappyPlugin', + 'version': '1.2.3', + 'description': 'My crappy plugin', + 'mimeTypes': [ + { 'description': 'Foo Media', + 'fileExtensions': [ 'foo' ], + 'mimeType': 'application/x-my-foo' }, + { 'description': 'Bar Stuff', + 'fileExtensions': [ 'bar','baz' ], + 'mimeType': 'application/my-bar' } + ], + 'enabled': true + }, + { + 'path': '/foobar/baz/YourGreatPlugin.plugin', + 'name': 'YourGreatPlugin', + 'version': '4.5', + 'description': 'Your great plugin', + 'mimeTypes': [ + { 'description': 'Baz Stuff', + 'fileExtensions': [ 'baz' ], + 'mimeType': 'application/x-your-baz' } + ], + 'enabled': false } ] }; @@ -404,10 +375,9 @@ function returnPluginsData(pluginsData){ /** * Handles a 'enable' or 'disable' button getting clicked. */ -function handleEnablePlugin(node, enable, is_group) { +function handleEnablePlugin(node, enable) { // Tell the C++ PluginsDOMHandler to enable/disable the plugin. - chrome.send('enablePlugin', [String(node.path), String(enable), - String(is_group)]); + chrome.send('enablePlugin', [node.pluginPath, String(enable)]); requestPluginsData(); } @@ -433,7 +403,7 @@ function toggleTmiMode() { * Determines whether a plugin's version should be displayed. */ function shouldDisplayPluginVersion(plugin) { - return !!plugin.version && plugin.version != "0"; + return !!plugin.version; } /** @@ -510,118 +480,70 @@ document.addEventListener('DOMContentLoaded', requestPluginsData);
NAME - (x) + jscontent="name">PLUGIN NAME - VERSION - x.x.x.x + x.x.x.x - DOWNLOAD UPDATE (DISABLED) -
- -
-
+
+
+ + +
DESCRIPTION:
+
+ + +
PATH:
-
-
- - -
NAME:NAME
-
- - -
DESCRIPTION:
-
- - -
VERSION:x.x.x.x
-
- - -
PRIORITY:x
-
- - -
PATH:
-
- - -
  - (DISABLED) - - DISABLE - ENABLE - -
- - - -
MIME_TYPES: - - - - - - - - - - -
MIME typeDESCRIPTIONFILE_EXTENSIONS
- -
- -
-
+ + + +
MIME_TYPES: + + + + + + + + + + +
MIME typeDESCRIPTIONFILE_EXTENSIONS
+ +
+ +
+
DISABLE ENABLE -- cgit v1.1