| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/plugins/npapi/plugin_list.h" | 5 #include "webkit/plugins/npapi/plugin_list.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 53 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
| 54 { "0", "4", "3.0.50106.0" }, | 54 { "0", "4", "3.0.50106.0" }, |
| 55 { "4", "5", "" } | 55 { "4", "5", "" } |
| 56 }; | 56 }; |
| 57 static const VersionRangeDefinition kFlip4MacVersionRange[] = { | 57 static const VersionRangeDefinition kFlip4MacVersionRange[] = { |
| 58 { "", "", "2.2.1" } | 58 { "", "", "2.2.1" } |
| 59 }; | 59 }; |
| 60 static const VersionRangeDefinition kShockwaveVersionRange[] = { | 60 static const VersionRangeDefinition kShockwaveVersionRange[] = { |
| 61 { "", "", "11.5.9.615" } | 61 { "", "", "11.5.9.615" } |
| 62 }; | 62 }; |
| 63 // TODO(cevans) - I don't see Adobe Reader in here for Mac. |
| 63 static const PluginGroupDefinition kGroupDefinitions[] = { | 64 static const PluginGroupDefinition kGroupDefinitions[] = { |
| 64 kFlashDefinition, | 65 kFlashDefinition, |
| 65 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange, | 66 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
| 66 arraysize(kQuicktimeVersionRange), | 67 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
| 67 "http://www.apple.com/quicktime/download/" }, | 68 "http://www.apple.com/quicktime/download/" }, |
| 68 { "java-runtime-environment", "Java", "Java", kJavaVersionRange, | 69 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
| 69 arraysize(kJavaVersionRange), "http://support.apple.com/kb/HT1338" }, | 70 kJavaVersionRange, arraysize(kJavaVersionRange), |
| 71 "http://support.apple.com/kb/HT1338" }, |
| 70 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 72 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
| 71 arraysize(kSilverlightVersionRange), | 73 arraysize(kSilverlightVersionRange), |
| 72 "http://www.microsoft.com/getsilverlight/" }, | 74 "http://www.microsoft.com/getsilverlight/" }, |
| 73 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, | 75 { "flip4mac", "Flip4Mac", "Flip4Mac", kFlip4MacVersionRange, |
| 74 arraysize(kFlip4MacVersionRange), | 76 arraysize(kFlip4MacVersionRange), |
| 75 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, | 77 "http://www.telestream.net/flip4mac-wmv/overview.htm" }, |
| 76 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, | 78 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", |
| 77 arraysize(kShockwaveVersionRange), | 79 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), |
| 78 "http://www.adobe.com/shockwave/download/" } | 80 "http://www.adobe.com/shockwave/download/" } |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 #elif defined(OS_WIN) | 83 #elif defined(OS_WIN) |
| 82 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of | 84 // TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of |
| 83 // the RealPlayer files. | 85 // the RealPlayer files. |
| 84 static const VersionRangeDefinition kQuicktimeVersionRange[] = { | 86 static const VersionRangeDefinition kQuicktimeVersionRange[] = { |
| 85 { "", "", "7.6.8" } | 87 { "", "", "7.6.8" } |
| 86 }; | 88 }; |
| 87 static const VersionRangeDefinition kJavaVersionRange[] = { | 89 static const VersionRangeDefinition kJavaVersionRange[] = { |
| 88 { "0", "7", "6.0.220" } // "220" is not a typo. | 90 { "0", "7", "6.0.220" } // "220" is not a typo. |
| 89 }; | 91 }; |
| 90 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { | 92 static const VersionRangeDefinition kAdobeReaderVersionRange[] = { |
| 91 { "10", "11", "" }, | 93 { "10", "11", "" }, |
| 92 { "9", "10", "9.4.1" }, | 94 { "9", "10", "9.4.1" }, |
| 93 { "0", "9", "8.2.5" } | 95 { "0", "9", "8.2.5" } |
| 94 }; | 96 }; |
| 95 static const VersionRangeDefinition kSilverlightVersionRange[] = { | 97 static const VersionRangeDefinition kSilverlightVersionRange[] = { |
| 96 { "0", "4", "3.0.50106.0" }, | 98 { "0", "4", "3.0.50106.0" }, |
| 97 { "4", "5", "" } | 99 { "4", "5", "" } |
| 98 }; | 100 }; |
| 99 static const VersionRangeDefinition kShockwaveVersionRange[] = { | 101 static const VersionRangeDefinition kShockwaveVersionRange[] = { |
| 100 { "", "", "11.5.9.615" } | 102 { "", "", "11.5.9.615" } |
| 101 }; | 103 }; |
| 102 static const VersionRangeDefinition kDivXVersionRange[] = { | 104 static const VersionRangeDefinition kDivXVersionRange[] = { |
| 103 { "", "", "1.4.3.4" } | 105 { "", "", "1.4.3.4" } |
| 104 }; | 106 }; |
| 105 static const PluginGroupDefinition kGroupDefinitions[] = { | 107 static const PluginGroupDefinition kGroupDefinitions[] = { |
| 106 kFlashDefinition, | 108 kFlashDefinition, |
| 107 { "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange, | 109 { "apple-quicktime", PluginGroup::kQuickTimeGroupName, "QuickTime Plug-in", |
| 108 arraysize(kQuicktimeVersionRange), | 110 kQuicktimeVersionRange, arraysize(kQuicktimeVersionRange), |
| 109 "http://www.apple.com/quicktime/download/" }, | 111 "http://www.apple.com/quicktime/download/" }, |
| 110 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange, | 112 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
| 111 arraysize(kJavaVersionRange), "http://www.java.com/" }, | 113 kJavaVersionRange, arraysize(kJavaVersionRange), "http://www.java.com/" }, |
| 112 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", | 114 { "adobe-reader", PluginGroup::kAdobeReaderGroupName, "Adobe Acrobat", |
| 113 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), | 115 kAdobeReaderVersionRange, arraysize(kAdobeReaderVersionRange), |
| 114 "http://get.adobe.com/reader/" }, | 116 "http://get.adobe.com/reader/" }, |
| 115 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, | 117 { "silverlight", "Silverlight", "Silverlight", kSilverlightVersionRange, |
| 116 arraysize(kSilverlightVersionRange), | 118 arraysize(kSilverlightVersionRange), |
| 117 "http://www.microsoft.com/getsilverlight/" }, | 119 "http://www.microsoft.com/getsilverlight/" }, |
| 118 { "shockwave", "Shockwave", "Shockwave for Director", kShockwaveVersionRange, | 120 { "shockwave", PluginGroup::kShockwaveGroupName, "Shockwave for Director", |
| 119 arraysize(kShockwaveVersionRange), | 121 kShockwaveVersionRange, arraysize(kShockwaveVersionRange), |
| 120 "http://www.adobe.com/shockwave/download/" }, | 122 "http://www.adobe.com/shockwave/download/" }, |
| 121 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, | 123 { "divx-player", "DivX Player", "DivX Web Player", kDivXVersionRange, |
| 122 arraysize(kDivXVersionRange), | 124 arraysize(kDivXVersionRange), |
| 123 "http://download.divx.com/divx/autoupdate/player/" | 125 "http://download.divx.com/divx/autoupdate/player/" |
| 124 "DivXWebPlayerInstaller.exe" }, | 126 "DivXWebPlayerInstaller.exe" }, |
| 125 // These are here for grouping, no vulnerabilities known. | 127 // These are here for grouping, no vulnerabilities known. |
| 126 { "windows-media-player", "Windows Media Player", "Windows Media Player", | 128 { "windows-media-player", "Windows Media Player", "Windows Media Player", |
| 127 NULL, 0, "" }, | 129 NULL, 0, "" }, |
| 128 { "microsoft-office", "Microsoft Office", "Microsoft Office", | 130 { "microsoft-office", "Microsoft Office", "Microsoft Office", |
| 129 NULL, 0, "" }, | 131 NULL, 0, "" }, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 141 | 143 |
| 142 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { | 144 static const VersionRangeDefinition kRedhatIcedTeaVersionRange[] = { |
| 143 { "0", "1.9", "1.8.3" }, | 145 { "0", "1.9", "1.8.3" }, |
| 144 { "1.9", "1.10", "1.9.2" }, | 146 { "1.9", "1.10", "1.9.2" }, |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 static const PluginGroupDefinition kGroupDefinitions[] = { | 149 static const PluginGroupDefinition kGroupDefinitions[] = { |
| 148 // Flash on Linux is significant because there isn't yet a built-in Flash | 150 // Flash on Linux is significant because there isn't yet a built-in Flash |
| 149 // plug-in on the Linux 64-bit version of Chrome. | 151 // plug-in on the Linux 64-bit version of Chrome. |
| 150 kFlashDefinition, | 152 kFlashDefinition, |
| 151 { "java-runtime-environment", "Java 6", "Java", kJavaVersionRange, | 153 { "java-runtime-environment", PluginGroup::kJavaGroupName, "Java", |
| 152 arraysize(kJavaVersionRange), | 154 kJavaVersionRange, arraysize(kJavaVersionRange), |
| 153 "http://www.java.com/en/download/manual.jsp" }, | 155 "http://www.java.com/en/download/manual.jsp" }, |
| 154 { "redhat-icetea-java", "IcedTea", "IcedTea", kRedhatIcedTeaVersionRange, | 156 { "redhat-icetea-java", PluginGroup::kIcedTeaGroupName, "IcedTea", |
| 155 arraysize(kRedhatIcedTeaVersionRange), | 157 kRedhatIcedTeaVersionRange, arraysize(kRedhatIcedTeaVersionRange), |
| 156 "http://www.linuxsecurity.com/content/section/3/170/" }, | 158 "http://www.linuxsecurity.com/content/section/3/170/" }, |
| 157 }; | 159 }; |
| 158 #endif | 160 #endif |
| 159 | 161 |
| 160 // static | 162 // static |
| 161 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() { | 163 const PluginGroupDefinition* PluginList::GetPluginGroupDefinitions() { |
| 162 return kGroupDefinitions; | 164 return kGroupDefinitions; |
| 163 } | 165 } |
| 164 | 166 |
| 165 // static | 167 // static |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 Shutdown(); | 809 Shutdown(); |
| 808 } | 810 } |
| 809 | 811 |
| 810 void PluginList::Shutdown() { | 812 void PluginList::Shutdown() { |
| 811 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), | 813 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), |
| 812 plugin_groups_.end()); | 814 plugin_groups_.end()); |
| 813 } | 815 } |
| 814 | 816 |
| 815 } // namespace npapi | 817 } // namespace npapi |
| 816 } // namespace webkit | 818 } // namespace webkit |
| OLD | NEW |