Changeset 74075 in webkit
- Timestamp:
- Dec 14, 2010 4:52:18 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 1 added
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74073 r74075 1 2010-12-14 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there 6 https://bugs.webkit.org/show_bug.cgi?id=51066 7 8 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp. 9 (WebKit::NetscapePluginModule::getPluginInfo): 10 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp: 11 (WebKit::PluginInfoStore::getPluginInfo): 12 * WebKit2.pro: 13 1 14 2010-12-14 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
r74073 r74075 24 24 */ 25 25 26 // Note: this file is only for UNIX. On other platforms we can reuse the native implementation. 27 28 #include "PluginInfoStore.h" 26 #include "NetscapePluginModule.h" 29 27 30 28 #include "PluginDatabase.h" … … 35 33 namespace WebKit { 36 34 37 Vector<String> PluginInfoStore::pluginsDirectories() 38 { 39 return PluginDatabase::defaultPluginDirectories(); 40 } 41 42 Vector<String> PluginInfoStore::pluginPathsInDirectory(const String& directory) 43 { 44 Vector<String> result; 45 Vector<String> pluginPaths = listDirectory(directory, String("*.so")); 46 Vector<String>::const_iterator end = pluginPaths.end(); 47 for (Vector<String>::const_iterator it = pluginPaths.begin(); it != end; ++it) { 48 if (fileExists(*it)) 49 result.append(*it); 50 } 51 52 return result; 53 } 54 55 Vector<String> PluginInfoStore::individualPluginPaths() 56 { 57 return Vector<String>(); 58 } 59 60 bool PluginInfoStore::getPluginInfo(const String& pluginPath, Plugin& plugin) 35 bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginInfoStore::Plugin& plugin) 61 36 { 62 37 // We are loading the plugin here since it does not seem to be a standardized way to … … 90 65 } 91 66 92 bool PluginInfoStore::shouldUsePlugin(const Plugin& plugin)93 {94 // We do not do any black-listing presently.95 return true;96 }97 98 67 } // namespace WebKit -
trunk/WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp
r71435 r74075 28 28 #include "PluginInfoStore.h" 29 29 30 #include "NetscapePluginModule.h" 30 31 #include "PluginDatabase.h" 31 32 #include "PluginPackage.h" … … 60 61 bool PluginInfoStore::getPluginInfo(const String& pluginPath, Plugin& plugin) 61 62 { 62 // We are loading the plugin here since it does not seem to be a standardized way to 63 // get the needed informations from a UNIX plugin without loading it. 64 65 RefPtr<PluginPackage> package = PluginPackage::createPackage(pluginPath, 0 /*lastModified*/); 66 if (!package) 67 return false; 68 69 plugin.path = pluginPath; 70 plugin.info.desc = package->description(); 71 plugin.info.file = package->fileName(); 72 73 const MIMEToDescriptionsMap& descriptions = package->mimeToDescriptions(); 74 const MIMEToExtensionsMap& extensions = package->mimeToExtensions(); 75 MIMEToDescriptionsMap::const_iterator descEnd = descriptions.end(); 76 plugin.info.mimes.reserveCapacity(descriptions.size()); 77 unsigned i = 0; 78 for (MIMEToDescriptionsMap::const_iterator it = descriptions.begin(); it != descEnd; ++it) { 79 plugin.info.mimes.uncheckedAppend(MimeClassInfo()); 80 MimeClassInfo& mime = plugin.info.mimes[i++]; 81 mime.type = it->first; 82 mime.desc = it->second; 83 MIMEToExtensionsMap::const_iterator extensionIt = extensions.find(it->first); 84 ASSERT(extensionIt != extensions.end()); 85 mime.extensions = extensionIt->second; 86 } 87 88 package->unload(); 89 return true; 63 return NetscapePluginModule::getPluginInfo(pluginPath, plugin); 90 64 } 91 65 -
trunk/WebKit2/WebKit2.pro
r74058 r74075 442 442 Shared/API/c/WKUserContentURLPattern.cpp \ 443 443 Shared/Plugins/Netscape/NetscapePluginModule.cpp \ 444 Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp \ 444 445 Shared/BackingStore.cpp \ 445 446 Shared/ChildProcess.cpp \
Note: See TracChangeset
for help on using the changeset viewer.