<rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
* page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
* platform/PlugInInfoStore.h:
* platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
(PlugInInfoStore::pluginNameForMIMEType):
* platform/mac/PlugInInfoStoreMac.mm:
(WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
* platform/qt/PlugInInfoStoreQt.cpp:
(WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
* plugins/win/PlugInInfoStoreWin.cpp:
(WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
* WebCoreSupport/WebViewFactory.mm:
(-[WebViewFactory pluginNameForMIMEType:]): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28426
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
+
+ * page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
+ * platform/PlugInInfoStore.h:
+ * platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
+ (PlugInInfoStore::pluginNameForMIMEType):
+ * platform/mac/PlugInInfoStoreMac.mm:
+ (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
+ * platform/qt/PlugInInfoStoreQt.cpp:
+ (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
+ * plugins/win/PlugInInfoStoreWin.cpp:
+ (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
+
2007-12-04 Adele Peterson <adele@apple.com>
Reviewed by Darin.
2007-12-04 Adele Peterson <adele@apple.com>
Reviewed by Darin.
- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
- (void)refreshPlugins:(BOOL)reloadPages;
- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
- (void)refreshPlugins:(BOOL)reloadPages;
+- (NSString *)pluginNameForMIMEType:(NSString *)MIMEType;
- (BOOL)pluginSupportsMIMEType:(NSString *)MIMEType;
- (NSString *)inputElementAltText;
- (BOOL)pluginSupportsMIMEType:(NSString *)MIMEType;
- (NSString *)inputElementAltText;
public:
PluginInfo *createPluginInfoForPluginAtIndex(unsigned);
unsigned pluginCount() const;
public:
PluginInfo *createPluginInfoForPluginAtIndex(unsigned);
unsigned pluginCount() const;
+ static String PlugInInfoStore::pluginNameForMIMEType(const String& mimeType);
static bool supportsMIMEType(const String& mimeType);
};
static bool supportsMIMEType(const String& mimeType);
};
PluginInfo* PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;}
unsigned PlugInInfoStore::pluginCount() const { notImplemented(); return 0; }
PluginInfo* PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;}
unsigned PlugInInfoStore::pluginCount() const { notImplemented(); return 0; }
+String PlugInInfoStore::pluginNameForMIMEType(const String& mimeType) { notImplemented(); return String(); }
bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { notImplemented(); return false; }
void WebCore::refreshPlugins(bool) { notImplemented(); }
bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { notImplemented(); return false; }
void WebCore::refreshPlugins(bool) { notImplemented(); }
+String PlugInInfoStore::pluginNameForMIMEType(const String& mimeType)
+{
+ return [[WebCoreViewFactory sharedFactory] pluginNameForMIMEType:mimeType];
+}
+
PluginInfo *PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
{
PluginInfo *pluginInfo = new PluginInfo;
PluginInfo *PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
{
PluginInfo *pluginInfo = new PluginInfo;
return QWebFactoryLoader::self()->keys().count();
}
return QWebFactoryLoader::self()->keys().count();
}
+String PlugInInfoStore::pluginNameForMIMEType(const String& mimeType)
+{
+ // FIXME: This method is stubbed out and should really return the name of a plug-in package for
+ // a given MIME type.
+ return String();
+}
+
bool PlugInInfoStore::supportsMIMEType(const WebCore::String& string)
{
bool supports = QWebFactoryLoader::self()->supportsMimeType(string);
bool PlugInInfoStore::supportsMIMEType(const WebCore::String& string)
{
bool supports = QWebFactoryLoader::self()->supportsMimeType(string);
return PluginDatabaseWin::installedPlugins()->plugins().size();
}
return PluginDatabaseWin::installedPlugins()->plugins().size();
}
+
+String PlugInInfoStore::pluginNameForMIMEType(const String& mimeType)
+{
+ // FIXME 5629139: Implement this method on Windows.
+ return String();
+}
+
+
bool PlugInInfoStore::supportsMIMEType(const WebCore::String& mimeType)
{
return PluginDatabaseWin::installedPlugins()->isMIMETypeRegistered(mimeType);
bool PlugInInfoStore::supportsMIMEType(const WebCore::String& mimeType)
{
return PluginDatabaseWin::installedPlugins()->isMIMETypeRegistered(mimeType);
+2007-12-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
+
+ * WebCoreSupport/WebViewFactory.mm:
+ (-[WebViewFactory pluginNameForMIMEType:]): Added.
+
2007-12-04 Brady Eidson <beidson@apple.com>
Reviewed by Mark Rowe
2007-12-04 Brady Eidson <beidson@apple.com>
Reviewed by Mark Rowe
return [[WebPluginDatabase sharedDatabase] plugins];
}
return [[WebPluginDatabase sharedDatabase] plugins];
}
+- (NSString *)pluginNameForMIMEType:(NSString *)MIMEType
+{
+ return [[[WebPluginDatabase sharedDatabase] pluginForMIMEType:MIMEType] name];
+}
+
- (void)refreshPlugins:(BOOL)reloadPages
{
[[WebPluginDatabase sharedDatabase] refresh];
- (void)refreshPlugins:(BOOL)reloadPages
{
[[WebPluginDatabase sharedDatabase] refresh];