77 |
77 |
78 static Vector<String> defaultPluginDirectories(); |
78 static Vector<String> defaultPluginDirectories(); |
79 Vector<String> pluginDirectories() const { return m_pluginDirectories; } |
79 Vector<String> pluginDirectories() const { return m_pluginDirectories; } |
80 |
80 |
81 String MIMETypeForExtension(const String& extension) const; |
81 String MIMETypeForExtension(const String& extension) const; |
|
82 #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE) |
|
83 static bool isPersistentMetadataCacheEnabled(); |
|
84 static void setPersistentMetadataCacheEnabled(bool isEnabled); |
|
85 static String persistentMetadataCachePath(); |
|
86 static void setPersistentMetadataCachePath(const String& persistentMetadataCachePath); |
|
87 #endif |
82 |
88 |
83 private: |
89 private: |
84 void getPluginPathsInDirectories(HashSet<String>&) const; |
90 void getPluginPathsInDirectories(HashSet<String>&) const; |
85 void getDeletedPlugins(PluginSet&) const; |
91 void getDeletedPlugins(PluginSet&) const; |
86 |
92 |
87 // Returns whether the plugin was actually added or not (it won't be added if it's a duplicate of an existing plugin). |
93 // Returns whether the plugin was actually added or not (it won't be added if it's a duplicate of an existing plugin). |
88 bool add(PassRefPtr<PluginPackage>); |
94 bool add(PassRefPtr<PluginPackage>); |
89 void remove(PluginPackage*); |
95 void remove(PluginPackage*); |
|
96 #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE) |
|
97 void loadPersistentMetadataCache(); |
|
98 void updatePersistentMetadataCache(); |
|
99 #endif |
90 |
100 |
91 Vector<String> m_pluginDirectories; |
101 Vector<String> m_pluginDirectories; |
92 HashSet<String> m_registeredMIMETypes; |
102 HashSet<String> m_registeredMIMETypes; |
93 PluginSet m_plugins; |
103 PluginSet m_plugins; |
94 HashMap<String, RefPtr<PluginPackage> > m_pluginsByPath; |
104 HashMap<String, RefPtr<PluginPackage> > m_pluginsByPath; |
95 HashMap<String, time_t> m_pluginPathsWithTimes; |
105 HashMap<String, time_t> m_pluginPathsWithTimes; |
96 HashMap<String, RefPtr<PluginPackage> > m_preferredPlugins; |
106 HashMap<String, RefPtr<PluginPackage> > m_preferredPlugins; |
|
107 #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE) |
|
108 bool m_persistentMetadataCacheIsLoaded; |
|
109 #endif |
97 }; |
110 }; |
98 |
111 |
99 } // namespace WebCore |
112 } // namespace WebCore |
100 |
113 |
101 #endif |
114 #endif |