Reviewed by Anders.
authorkdecker@apple.com <kdecker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2007 01:46:33 +0000 (01:46 +0000)
committerkdecker@apple.com <kdecker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2007 01:46:33 +0000 (01:46 +0000)
        <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

WebCore/ChangeLog
WebCore/page/mac/WebCoreViewFactory.h
WebCore/platform/PlugInInfoStore.h
WebCore/platform/gtk/TemporaryLinkStubs.cpp
WebCore/platform/mac/PlugInInfoStoreMac.mm
WebCore/platform/qt/PlugInInfoStoreQt.cpp
WebCore/plugins/win/PlugInInfoStoreWin.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebViewFactory.mm

index 59996ff..49cae2c 100644 (file)
@@ -1,3 +1,20 @@
+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.
index 332074b..55514ed 100644 (file)
@@ -36,6 +36,7 @@
 
 - (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;
index 356456f..e91b43e 100644 (file)
@@ -51,6 +51,7 @@ class PlugInInfoStore {
 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);
 };
 
index ec63186..1136cd4 100644 (file)
@@ -60,6 +60,7 @@ bool WebCore::historyContains(DeprecatedString const&) { return false; }
 
 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(); }
 
index 9254241..b5930b7 100644 (file)
 
 namespace WebCore {
 
 
 namespace WebCore {
 
+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;
index d5a9e46..303b9e4 100644 (file)
@@ -54,6 +54,13 @@ unsigned PlugInInfoStore::pluginCount() const
     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);
index 8a5517f..ad51a2d 100644 (file)
@@ -68,6 +68,14 @@ unsigned PlugInInfoStore::pluginCount() const
     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);
index 7a28e56..cf71046 100644 (file)
@@ -1,3 +1,12 @@
+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
index 27da454..e7174fe 100644 (file)
     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];