Commit d351836c authored by aroben@apple.com's avatar aroben@apple.com

Always say "plugins directory" when referring to a directory containing one or more plugins

Fixes <http://webkit.org/b/43197> WebKit2 often says "plugin
directory" when it means "plugins directory"

Reviewed by John Sullivan.

WebKit2:

* UIProcess/API/C/WKContext.cpp:
(_WKContextSetAdditionalPluginsDirectory):
* UIProcess/API/C/WKContextPrivate.h:
Renamed from _WKContextSetAdditionalPluginDirectory.

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::setAdditionalPluginsDirectories): Renamed
from setAdditionalPluginDirectories.
(WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.

* UIProcess/Plugins/PluginInfoStore.h: Renamed
m_additionalPluginDirectories to m_additionalPluginsDirectories.

* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::pluginsDirectories):
* UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
Renamed from pluginDirectories.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAdditionalPluginsDirectory):
* UIProcess/WebContext.h:
Renamed from setAdditionalPluginDirectory.

WebKitTools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Updated for rename.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f94f82b2
2010-07-29 Adam Roben <aroben@apple.com>
Always say "plugins directory" when referring to a directory
containing one or more plugins
Fixes <http://webkit.org/b/43197> WebKit2 often says "plugin
directory" when it means "plugins directory"
Reviewed by John Sullivan.
* UIProcess/API/C/WKContext.cpp:
(_WKContextSetAdditionalPluginsDirectory):
* UIProcess/API/C/WKContextPrivate.h:
Renamed from _WKContextSetAdditionalPluginDirectory.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::setAdditionalPluginsDirectories): Renamed
from setAdditionalPluginDirectories.
(WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.
* UIProcess/Plugins/PluginInfoStore.h: Renamed
m_additionalPluginDirectories to m_additionalPluginsDirectories.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::pluginsDirectories):
* UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
Renamed from pluginDirectories.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAdditionalPluginsDirectory):
* UIProcess/WebContext.h:
Renamed from setAdditionalPluginDirectory.
2010-07-29 Adam Roben <aroben@apple.com>
Always say "directory" when referring to a plugin directory
......
......@@ -105,9 +105,9 @@ void WKContextRelease(WKContextRef contextRef)
toWK(contextRef)->deref();
}
void _WKContextSetAdditionalPluginDirectory(WKContextRef contextRef, WKStringRef pluginDirectory)
void _WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory)
{
toWK(contextRef)->setAdditionalPluginDirectory(toWK(pluginDirectory)->string());
toWK(contextRef)->setAdditionalPluginsDirectory(toWK(pluginsDirectory)->string());
}
void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme)
......
......@@ -44,7 +44,7 @@ WK_EXPORT void WKContextGetStatistics(WKContextRef context, WKContextStatistics*
WK_EXPORT WKContextRef WKContextGetSharedThreadContext();
WK_EXPORT void _WKContextSetAdditionalPluginDirectory(WKContextRef context, WKStringRef pluginDirectory);
WK_EXPORT void _WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory);
WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme);
......
......@@ -40,9 +40,9 @@ PluginInfoStore::PluginInfoStore()
{
}
void PluginInfoStore::setAdditionalPluginDirectories(const Vector<WebCore::String>& directories)
void PluginInfoStore::setAdditionalPluginsDirectories(const Vector<WebCore::String>& directories)
{
m_additionalPluginDirectories = directories;
m_additionalPluginsDirectories = directories;
refresh();
}
......@@ -58,11 +58,11 @@ void PluginInfoStore::loadPluginsIfNecessary()
m_plugins.clear();
// First, load plug-ins from the additional plug-in directories specified.
for (size_t i = 0; i < m_additionalPluginDirectories.size(); ++i)
loadPluginsInDirectory(m_additionalPluginDirectories[i]);
// First, load plug-ins from the additional plug-ins directories specified.
for (size_t i = 0; i < m_additionalPluginsDirectories.size(); ++i)
loadPluginsInDirectory(m_additionalPluginsDirectories[i]);
Vector<String> directories = pluginDirectories();
Vector<String> directories = pluginsDirectories();
for (size_t i = 0; i < directories.size(); ++i)
loadPluginsInDirectory(directories[i]);
......
......@@ -38,7 +38,7 @@ class PluginInfoStore {
public:
PluginInfoStore();
void setAdditionalPluginDirectories(const Vector<WebCore::String>&);
void setAdditionalPluginsDirectories(const Vector<WebCore::String>&);
void refresh();
void getPlugins(Vector<WebCore::PluginInfo>& plugins);
......@@ -69,12 +69,12 @@ private:
void loadPlugin(const WebCore::String& pluginPath);
// Platform specific member functions.
static Vector<WebCore::String> pluginDirectories();
static Vector<WebCore::String> pluginsDirectories();
static Vector<WebCore::String> pluginPathsInDirectory(const WebCore::String& directory);
static bool getPluginInfo(const WebCore::String& pluginPath, Plugin& plugin);
static bool shouldUsePlugin(const Plugin& plugin, const Vector<Plugin>& loadedPlugins);
Vector<WebCore::String> m_additionalPluginDirectories;
Vector<WebCore::String> m_additionalPluginsDirectories;
Vector<Plugin> m_plugins;
bool m_pluginListIsUpToDate;
};
......
......@@ -33,14 +33,14 @@ using namespace WebCore;
namespace WebKit {
Vector<String> PluginInfoStore::pluginDirectories()
Vector<String> PluginInfoStore::pluginsDirectories()
{
Vector<String> pluginDirectories;
Vector<String> pluginsDirectories;
pluginDirectories.append([NSHomeDirectory() stringByAppendingPathComponent:@"Library/Internet Plug-Ins"]);
pluginDirectories.append("/Library/Internet Plug-Ins");
pluginsDirectories.append([NSHomeDirectory() stringByAppendingPathComponent:@"Library/Internet Plug-Ins"]);
pluginsDirectories.append("/Library/Internet Plug-Ins");
return pluginDirectories;
return pluginsDirectories;
}
// FIXME: Once the UI process knows the difference between the main thread and the web thread we can drop this and just use
......
......@@ -31,7 +31,7 @@ using namespace WebCore;
namespace WebKit {
Vector<String> PluginInfoStore::pluginDirectories()
Vector<String> PluginInfoStore::pluginsDirectories()
{
notImplemented();
return Vector<String>();
......
......@@ -31,7 +31,7 @@ using namespace WebCore;
namespace WebKit {
Vector<String> PluginInfoStore::pluginDirectories()
Vector<String> PluginInfoStore::pluginsDirectories()
{
notImplemented();
return Vector<String>();
......
......@@ -218,12 +218,12 @@ void WebContext::getStatistics(WKContextStatistics* statistics)
(*it)->getStatistics(statistics);
}
void WebContext::setAdditionalPluginDirectory(const WebCore::String& directory)
void WebContext::setAdditionalPluginsDirectory(const WebCore::String& directory)
{
Vector<String> directories;
directories.append(directory);
m_pluginInfoStore.setAdditionalPluginDirectories(directories);
m_pluginInfoStore.setAdditionalPluginsDirectories(directories);
}
void WebContext::registerURLSchemeAsEmptyDocument(const String& urlScheme)
......
......@@ -89,7 +89,7 @@ public:
void populateVisitedLinks();
void getStatistics(WKContextStatistics* statistics);
void setAdditionalPluginDirectory(const WebCore::String&);
void setAdditionalPluginsDirectory(const WebCore::String&);
PluginInfoStore* pluginInfoStore() { return &m_pluginInfoStore; }
WebCore::String applicationCacheDirectory();
......
2010-07-29 Adam Roben <aroben@apple.com>
Always say "plugins directory" when referring to a directory
containing one or more plugins
Fixes <http://webkit.org/b/43197> WebKit2 often says "plugin
directory" when it means "plugins directory"
Reviewed by John Sullivan.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Updated for rename.
2010-07-29 Adam Roben <aroben@apple.com>
Always say "directory" when referring to a plugin directory
......
......@@ -86,7 +86,7 @@ void TestController::initialize(int argc, const char* argv[])
};
WKContextSetInjectedBundleClient(m_context.get(), &injectedBundlePathClient);
_WKContextSetAdditionalPluginDirectory(m_context.get(), testPluginDirectory());
_WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory());
m_pageNamespace.adopt(WKPageNamespaceCreate(m_context.get()));
m_mainWebView = new PlatformWebView(m_pageNamespace.get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment