diff options
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/webkit_support.cc | 14 | ||||
-rw-r--r-- | webkit/support/webkit_support_glue.cc | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 87381b8..139c4b4 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -281,16 +281,16 @@ WebKit::WebKitClient* GetWebKitClient() { WebPlugin* CreateWebPlugin(WebFrame* frame, const WebPluginParams& params) { const bool kAllowWildcard = true; - webkit::npapi::WebPluginInfo info; - std::string actual_mime_type; - if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( - params.url, params.mimeType.utf8(), kAllowWildcard, &info, - &actual_mime_type) || !webkit::npapi::IsPluginEnabled(info)) { + std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<std::string> mime_types; + webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( + params.url, params.mimeType.utf8(), kAllowWildcard, + NULL, &plugins, &mime_types); + if (plugins.empty()) return NULL; - } return new WebPluginImplWithPageDelegate( - frame, params, info.path, actual_mime_type); + frame, params, plugins.front().path, mime_types.front()); } WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc index 02a2233..ef67877 100644 --- a/webkit/support/webkit_support_glue.cc +++ b/webkit/support/webkit_support_glue.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,9 @@ namespace webkit_glue { void GetPlugins(bool refresh, std::vector<webkit::npapi::WebPluginInfo>* plugins) { - webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); + if (refresh) + webkit::npapi::PluginList::Singleton()->RefreshPlugins(); + webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); // Don't load the forked npapi_layout_test_plugin in DRT, we only want to // use the upstream version TestNetscapePlugIn. const FilePath::StringType kPluginBlackList[] = { |