diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_lib.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 105 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 50 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list_linux.cc | 10 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list_mac.mm | 14 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list_win.cc | 59 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.h | 2 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_worker/test_worker_main.cc | 3 |
12 files changed, 129 insertions, 131 deletions
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index 9e8a681..11f8675 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -36,7 +36,7 @@ PluginLib* PluginLib::CreatePluginLib(const FilePath& filename) { WebPluginInfo info; const PluginEntryPoints* entry_points = NULL; - if (!PluginList::ReadPluginInfo(filename, &info, &entry_points)) + if (!PluginList::Singleton()->ReadPluginInfo(filename, &info, &entry_points)) return NULL; return new PluginLib(info, entry_points); diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index f443364..44f7428 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -25,49 +25,44 @@ base::LazyInstance<PluginList> g_singleton(base::LINKER_INITIALIZED); // static PluginList* PluginList::Singleton() { - PluginList* singleton = g_singleton.Pointer(); - if (!singleton->plugins_loaded_) { - singleton->LoadPlugins(false); - DCHECK(singleton->plugins_loaded_); - } - return singleton; + return g_singleton.Pointer(); +} + +bool PluginList::PluginsLoaded() { + AutoLock lock(lock_); + return plugins_loaded_; } -// static void PluginList::ResetPluginsLoaded() { - // We access the singleton directly, and not through Singleton(), since - // we don't want LoadPlugins() to be called. - g_singleton.Pointer()->plugins_loaded_ = false; + AutoLock lock(lock_); + plugins_loaded_ = false; } -// static void PluginList::AddExtraPluginPath(const FilePath& plugin_path) { - DCHECK(!g_singleton.Pointer()->plugins_loaded_); - g_singleton.Pointer()->extra_plugin_paths_.push_back(plugin_path); + AutoLock lock(lock_); + extra_plugin_paths_.push_back(plugin_path); } -// static void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) { - DCHECK(!g_singleton.Pointer()->plugins_loaded_); - g_singleton.Pointer()->extra_plugin_dirs_.push_back(plugin_dir); + AutoLock lock(lock_); + extra_plugin_dirs_.push_back(plugin_dir); } void PluginList::RegisterInternalPlugin(const PluginVersionInfo& info) { - DCHECK(!g_singleton.Pointer()->plugins_loaded_); - g_singleton.Pointer()->internal_plugins_.push_back(info); + AutoLock lock(lock_); + internal_plugins_.push_back(info); } bool PluginList::ReadPluginInfo(const FilePath &filename, WebPluginInfo* info, const PluginEntryPoints** entry_points) { - // We access the singleton directly, and not through Singleton(), since - // we might be in a LoadPlugins call and don't want to call it recursively! - const std::vector<PluginVersionInfo>& internal_plugins = - g_singleton.Pointer()->internal_plugins_; - for (size_t i = 0; i < internal_plugins.size(); ++i) { - if (filename == internal_plugins[i].path) { - *entry_points = &internal_plugins[i].entry_points; - return CreateWebPluginInfo(internal_plugins[i], info); + { + AutoLock lock(lock_); + for (size_t i = 0; i < internal_plugins_.size(); ++i) { + if (filename == internal_plugins_[i].path) { + *entry_points = &internal_plugins_[i].entry_points; + return CreateWebPluginInfo(internal_plugins_[i], info); + } } } @@ -146,46 +141,60 @@ PluginList::PluginList() : plugins_loaded_(false) { } void PluginList::LoadPlugins(bool refresh) { - if (plugins_loaded_ && !refresh) - return; - - plugins_.clear(); - plugins_loaded_ = true; + // Don't want to hold the lock while loading new plugins, so we don't block + // other methods if they're called on other threads. + std::vector<FilePath> extra_plugin_paths; + std::vector<FilePath> extra_plugin_dirs; + { + AutoLock lock(lock_); + if (plugins_loaded_ && !refresh) + return; + + extra_plugin_paths = extra_plugin_paths_; + extra_plugin_dirs = extra_plugin_dirs_; + } base::TimeTicks start_time = base::TimeTicks::Now(); + std::vector<WebPluginInfo> new_plugins; + std::vector<FilePath> directories_to_scan; GetPluginDirectories(&directories_to_scan); - for (size_t i = 0; i < extra_plugin_paths_.size(); ++i) - LoadPlugin(extra_plugin_paths_[i]); + for (size_t i = 0; i < extra_plugin_paths.size(); ++i) + LoadPlugin(extra_plugin_paths[i], &new_plugins); - for (size_t i = 0; i < extra_plugin_dirs_.size(); ++i) { - LoadPluginsFromDir(extra_plugin_dirs_[i]); + for (size_t i = 0; i < extra_plugin_dirs.size(); ++i) { + LoadPluginsFromDir(extra_plugin_dirs[i], &new_plugins); } for (size_t i = 0; i < directories_to_scan.size(); ++i) { - LoadPluginsFromDir(directories_to_scan[i]); + LoadPluginsFromDir(directories_to_scan[i], &new_plugins); } - LoadInternalPlugins(); + LoadInternalPlugins(&new_plugins); if (webkit_glue::IsDefaultPluginEnabled()) - LoadPlugin(FilePath(kDefaultPluginLibraryName)); + LoadPlugin(FilePath(kDefaultPluginLibraryName), &new_plugins); base::TimeTicks end_time = base::TimeTicks::Now(); base::TimeDelta elapsed = end_time - start_time; DLOG(INFO) << "Loaded plugin list in " << elapsed.InMilliseconds() << " ms."; + + AutoLock lock(lock_); + plugins_ = new_plugins; + plugins_loaded_ = true; } -void PluginList::LoadPlugin(const FilePath &path) { +void PluginList::LoadPlugin(const FilePath &path, + std::vector<WebPluginInfo>* plugins) { WebPluginInfo plugin_info; const PluginEntryPoints* entry_points; if (!ReadPluginInfo(path, &plugin_info, &entry_points)) return; - if (!ShouldLoadPlugin(plugin_info)) + if (!ShouldLoadPlugin(plugin_info, plugins)) return; if (path.value() != kDefaultPluginLibraryName @@ -203,7 +212,7 @@ void PluginList::LoadPlugin(const FilePath &path) { } } - plugins_.push_back(plugin_info); + plugins->push_back(plugin_info); } bool PluginList::FindPlugin(const std::string& mime_type, @@ -212,6 +221,8 @@ bool PluginList::FindPlugin(const std::string& mime_type, WebPluginInfo* info) { DCHECK(mime_type == StringToLowerASCII(mime_type)); + LoadPlugins(false); + AutoLock lock(lock_); for (size_t i = 0; i < plugins_.size(); ++i) { if (SupportsType(plugins_[i], mime_type, allow_wildcard)) { #if defined(OS_WIN) @@ -232,6 +243,8 @@ bool PluginList::FindPlugin(const std::string& mime_type, bool PluginList::FindPlugin(const GURL &url, std::string* actual_mime_type, WebPluginInfo* info) { + LoadPlugins(false); + AutoLock lock(lock_); std::string path = url.path(); std::string::size_type last_dot = path.rfind('.'); if (last_dot == std::string::npos) @@ -286,13 +299,11 @@ bool PluginList::SupportsExtension(const WebPluginInfo& info, } -bool PluginList::GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { - if (refresh) - LoadPlugins(true); +void PluginList::GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { + LoadPlugins(refresh); + AutoLock lock(lock_); *plugins = plugins_; - - return true; } bool PluginList::GetPluginInfo(const GURL& url, @@ -322,6 +333,8 @@ bool PluginList::GetPluginInfo(const GURL& url, bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, WebPluginInfo* info) { + LoadPlugins(false); + AutoLock lock(lock_); for (size_t i = 0; i < plugins_.size(); ++i) { if (plugins_[i].path == plugin_path) { *info = plugins_[i]; diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 9faf899..4c103c0 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/file_path.h" +#include "base/lock.h" #include "webkit/glue/webplugininfo.h" #include "webkit/glue/plugins/nphostapi.h" @@ -66,39 +67,39 @@ struct PluginVersionInfo { // the machine-wide and user plugin directories and loads anything that has // the correct types. On Linux, it walks the plugin directories as well // (e.g. /usr/lib/browser-plugins/). +// This object is thread safe. class PluginList { public: - // Gets the one instance of the PluginList. Accessing the singleton causes - // the PluginList to look on disk for existing plugins. It does not actually - // load libraries, that will only happen when you initialize the plugin for - // the first time. + // Gets the one instance of the PluginList. static PluginList* Singleton(); + // Returns true iff the plugin list has been loaded already. + bool PluginsLoaded(); + // Clear the plugins_loaded_ bit to force a refresh next time we retrieve // plugins. - static void ResetPluginsLoaded(); + void ResetPluginsLoaded(); - // Add an extra plugin to load when we actually do the loading. This is - // static because we want to be able to add to it without searching the disk - // for plugins. Must be called before the plugins have been loaded. - static void AddExtraPluginPath(const FilePath& plugin_path); + // Add an extra plugin to load when we actually do the loading. Must be + // called before the plugins have been loaded. + void AddExtraPluginPath(const FilePath& plugin_path); // Same as above, but specifies a directory in which to search for plugins. - static void AddExtraPluginDir(const FilePath& plugin_dir); + void AddExtraPluginDir(const FilePath& plugin_dir); // Register an internal plugin with the specified plugin information and // function pointers. An internal plugin must be registered before it can // be loaded using PluginList::LoadPlugin(). - static void RegisterInternalPlugin(const PluginVersionInfo& info); + void RegisterInternalPlugin(const PluginVersionInfo& info); // Creates a WebPluginInfo structure given a plugin's path. On success // returns true, with the information being put into "info". If it's an // internal plugin, "entry_points" is filled in as well with a // internally-owned PluginEntryPoints pointer. // Returns false if the library couldn't be found, or if it's not a plugin. - static bool ReadPluginInfo(const FilePath& filename, - WebPluginInfo* info, - const PluginEntryPoints** entry_points); + bool ReadPluginInfo(const FilePath& filename, + WebPluginInfo* info, + const PluginEntryPoints** entry_points); // Populate a WebPluginInfo from a PluginVersionInfo. static bool CreateWebPluginInfo(const PluginVersionInfo& pvi, @@ -108,7 +109,7 @@ class PluginList { void Shutdown(); // Get all the plugins - bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); + void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); // Returns true if a plugin is found for the given url and mime type. // The mime type which corresponds to the URL is optionally returned @@ -128,7 +129,8 @@ class PluginList { WebPluginInfo* info); // Load a specific plugin with full path. - void LoadPlugin(const FilePath& filename); + void LoadPlugin(const FilePath& filename, + std::vector<WebPluginInfo>* plugins); private: // Constructors are private for singletons @@ -138,13 +140,17 @@ class PluginList { void LoadPlugins(bool refresh); // Load all plugins from a specific directory - void LoadPluginsFromDir(const FilePath& path); + void LoadPluginsFromDir(const FilePath& path, + std::vector<WebPluginInfo>* plugins); // Returns true if we should load the given plugin, or false otherwise. - bool ShouldLoadPlugin(const WebPluginInfo& info); + // plugins is the list of plugins we have crawled in the current plugin + // loading run. + bool ShouldLoadPlugin(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins); // Load internal plugins. - void LoadInternalPlugins(); + void LoadInternalPlugins(std::vector<WebPluginInfo>* plugins); // Find a plugin by mime type, and clsid. // If clsid is empty, we will just find the plugin that supports mime type. @@ -216,9 +222,13 @@ class PluginList { // Holds information about internal plugins. std::vector<PluginVersionInfo> internal_plugins_; + // Need synchronization for the above members since this object can be + // accessed on multiple threads. + Lock lock_; + friend struct base::DefaultLazyInstanceTraits<PluginList>; - DISALLOW_EVIL_CONSTRUCTORS(PluginList); + DISALLOW_COPY_AND_ASSIGN(PluginList); }; } // namespace NPAPI diff --git a/webkit/glue/plugins/plugin_list_linux.cc b/webkit/glue/plugins/plugin_list_linux.cc index 0d9b577..2a92bbd 100644 --- a/webkit/glue/plugins/plugin_list_linux.cc +++ b/webkit/glue/plugins/plugin_list_linux.cc @@ -44,7 +44,8 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { plugin_dirs->push_back(FilePath("/usr/lib/mozilla/plugins")); } -void PluginList::LoadPluginsFromDir(const FilePath& path) { +void PluginList::LoadPluginsFromDir(const FilePath& path, + std::vector<WebPluginInfo>* plugins) { file_util::FileEnumerator enumerator(path, false, // not recursive file_util::FileEnumerator::FILES); @@ -52,11 +53,12 @@ void PluginList::LoadPluginsFromDir(const FilePath& path) { path = enumerator.Next()) { // Skip over Mozilla .xpt files. if (!path.MatchesExtension(FILE_PATH_LITERAL(".xpt"))) - LoadPlugin(path); + LoadPlugin(path, plugins); } } -bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { +bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins) { // The equivalent Windows code verifies we haven't loaded a newer version // of the same plugin, and then blacklists some known bad plugins. // The equivalent Mac code verifies that plugins encountered first in the @@ -66,7 +68,7 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { return true; } -void PluginList::LoadInternalPlugins() { +void PluginList::LoadInternalPlugins(std::vector<WebPluginInfo>* plugins) { // none for now } diff --git a/webkit/glue/plugins/plugin_list_mac.mm b/webkit/glue/plugins/plugin_list_mac.mm index 5e8d250..c3d216f 100644 --- a/webkit/glue/plugins/plugin_list_mac.mm +++ b/webkit/glue/plugins/plugin_list_mac.mm @@ -56,17 +56,19 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { GetPluginPrivateDirectory(plugin_dirs); } -void PluginList::LoadPluginsFromDir(const FilePath &path) { +void PluginList::LoadPluginsFromDir(const FilePath &path, + std::vector<WebPluginInfo>* plugins) { file_util::FileEnumerator enumerator(path, false, // not recursive file_util::FileEnumerator::DIRECTORIES); for (FilePath path = enumerator.Next(); !path.value().empty(); path = enumerator.Next()) { - LoadPlugin(path); + LoadPlugin(path, plugins); } } -bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { +bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins) { // The Gears plugin is Safari-specific, and causes crashes, so don't load it. for (std::vector<WebPluginMimeType>::const_iterator i = info.mime_types.begin(); i != info.mime_types.end(); ++i) { @@ -87,8 +89,8 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { // Hierarchy check // (we're loading plugins hierarchically from Library folders, so plugins we // encounter earlier must override plugins we encounter later) - for (size_t i = 0; i < plugins_.size(); ++i) { - if (plugins_[i].path.BaseName() == info.path.BaseName()) { + for (size_t i = 0; i < plugins->size(); ++i) { + if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { return false; // We already have a loaded plugin higher in the hierarchy. } } @@ -96,7 +98,7 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { return true; } -void PluginList::LoadInternalPlugins() { +void PluginList::LoadInternalPlugins(std::vector<WebPluginInfo>* plugins) { // none for now } diff --git a/webkit/glue/plugins/plugin_list_win.cc b/webkit/glue/plugins/plugin_list_win.cc index 94104c8..b92e2f2 100644 --- a/webkit/glue/plugins/plugin_list_win.cc +++ b/webkit/glue/plugins/plugin_list_win.cc @@ -39,13 +39,6 @@ const TCHAR kRegistryBrowserJavaVersion[] = _T("BrowserJavaVersion"); const TCHAR kRegistryCurrentJavaVersion[] = _T("CurrentVersion"); const TCHAR kRegistryJavaHome[] = _T("JavaHome"); -#ifdef GEARS_STATIC_LIB -// defined in gears/base/common/module.cc -NPError API_CALL Gears_NP_GetEntryPoints(NPPluginFuncs* funcs); -NPError API_CALL Gears_NP_Initialize(NPNetscapeFuncs* funcs); -NPError API_CALL Gears_NP_Shutdown(void); -#endif - // The application path where we expect to find plugins. void GetAppDirectory(std::set<FilePath>* plugin_dirs) { std::wstring app_path; @@ -226,22 +219,6 @@ void PluginList::PlatformInit() { activex_shim::ActiveX_Shim_NP_Shutdown } }, -#ifdef GEARS_STATIC_LIB - { - FilePath(kGearsPluginLibraryName), - L"Gears", - L"Statically linked Gears", - L"1, 0, 0, 1", - L"application/x-googlegears", - L"", - L"", - { - Gears_NP_GetEntryPoints, - Gears_NP_Initialize, - Gears_NP_Shutdown - } - }, -#endif }; for (int i = 0; i < arraysize(builtin_plugins); ++i) @@ -275,7 +252,8 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { plugin_dirs->push_back(*i); } -void PluginList::LoadPluginsFromDir(const FilePath &path) { +void PluginList::LoadPluginsFromDir(const FilePath &path, + std::vector<WebPluginInfo>* plugins) { WIN32_FIND_DATA find_file_data; HANDLE find_handle; @@ -290,7 +268,7 @@ void PluginList::LoadPluginsFromDir(const FilePath &path) { do { if (!(find_file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { FilePath filename = path.Append(find_file_data.cFileName); - LoadPlugin(filename); + LoadPlugin(filename, plugins); } } while (FindNextFile(find_handle, &find_file_data) != 0); @@ -317,13 +295,13 @@ bool IsNewerVersion(const std::wstring& a, const std::wstring& b) { return false; } -bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { - +bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins) { // Version check - for (size_t i = 0; i < plugins_.size(); ++i) { - if (plugins_[i].path.BaseName() == info.path.BaseName() && - !IsNewerVersion(plugins_[i].version, info.version)) { + for (size_t i = 0; i < plugins->size(); ++i) { + if ((*plugins)[i].path.BaseName() == info.path.BaseName() && + !IsNewerVersion((*plugins)[i].version, info.version)) { return false; // We already have a loaded plugin whose version is newer. } } @@ -360,15 +338,15 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { if (dont_load_new_wmp_) return false; - for (size_t i = 0; i < plugins_.size(); ++i) { - if (plugins_[i].path.BaseName().value() == kOldWMPPlugin) { - plugins_.erase(plugins_.begin() + i); + for (size_t i = 0; i < plugins->size(); ++i) { + if ((*plugins)[i].path.BaseName().value() == kOldWMPPlugin) { + plugins->erase(plugins->begin() + i); break; } } } else if (filename == kOldWMPPlugin) { - for (size_t i = 0; i < plugins_.size(); ++i) { - if (plugins_[i].path.BaseName().value() == kNewWMPPlugin) + for (size_t i = 0; i < plugins->size(); ++i) { + if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) return false; } } @@ -377,16 +355,11 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { return true; } -void PluginList::LoadInternalPlugins() { -#ifdef GEARS_STATIC_LIB - LoadPlugin(FilePath(kGearsPluginLibraryName)); -#endif - +void PluginList::LoadInternalPlugins(std::vector<WebPluginInfo>* plugins) { if (!use_internal_activex_shim_) - return; - LoadPlugin(FilePath(kActiveXShimFileName)); - LoadPlugin(FilePath(kActiveXShimFileNameForMediaPlayer)); + LoadPlugin(FilePath(kActiveXShimFileName), plugins); + LoadPlugin(FilePath(kActiveXShimFileNameForMediaPlayer), plugins); } } // namespace NPAPI diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 998fbce..686e676 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -174,7 +174,7 @@ std::string GetUIResourceProtocol(); bool GetExeDirectory(std::wstring* path); // Embedders implement this function to return the list of plugins to Webkit. -bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); +void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); // Returns true if the plugins run in the same process as the renderer, and // false otherwise. diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index afc4f80..d257d53 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -108,8 +108,7 @@ WebURLLoader* WebKitClientImpl::createURLLoader() { void WebKitClientImpl::getPluginList(bool refresh, WebPluginListBuilder* builder) { std::vector<WebPluginInfo> plugins; - if (!GetPlugins(refresh, &plugins)) - return; + GetPlugins(refresh, &plugins); for (size_t i = 0; i < plugins.size(); ++i) { const WebPluginInfo& plugin = plugins[i]; diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index 2659f7b..cf35788 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -692,8 +692,8 @@ StringPiece GetDataResource(int resource_id) { return TestShell::NetResourceProvider(resource_id); } -bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { - return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); +void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { + NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); } } // namespace webkit_glue diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index dff44c9..e2a9139 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -700,8 +700,8 @@ StringPiece GetDataResource(int resource_id) { return StringPiece(); } -bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { - return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); +void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { + NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); } bool DownloadUrl(const std::string& url, NSWindow* caller_window) { diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index 7c682b2..0a9e141 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -758,8 +758,8 @@ HCURSOR LoadCursor(int cursor_id) { return NULL; } -bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { - return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); +void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { + NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); } bool EnsureFontLoaded(HFONT font) { diff --git a/webkit/tools/test_shell/test_worker/test_worker_main.cc b/webkit/tools/test_shell/test_worker/test_worker_main.cc index e20f772..aefbccb 100644 --- a/webkit/tools/test_shell/test_worker/test_worker_main.cc +++ b/webkit/tools/test_shell/test_worker/test_worker_main.cc @@ -208,8 +208,7 @@ bool SpellCheckWord(const wchar_t* word, int word_len, return true; } -bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { - return false; +void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { } bool IsPluginRunningInRendererProcess() { |