Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1052)

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate.cc
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 61cc8605af8cbc77da3e0ecc8e4712c946c69662..d32700641643c52c8edc541e80720ed26c668951 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -592,15 +592,16 @@ WebScreenInfo TestWebViewDelegate::screenInfo() {
WebPlugin* TestWebViewDelegate::createPlugin(WebFrame* frame,
const WebPluginParams& params) {
bool allow_wildcard = true;
- webkit::npapi::WebPluginInfo info;
- std::string actual_mime_type;
- if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
- params.url, params.mimeType.utf8(), allow_wildcard, &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(), allow_wildcard,
+ NULL, &plugins, &mime_types);
+ if (plugins.empty())
return NULL;
return new webkit::npapi::WebPluginImpl(
- frame, params, info.path, actual_mime_type, AsWeakPtr());
+ frame, params, plugins.front().path, mime_types.front(), AsWeakPtr());
}
WebWorker* TestWebViewDelegate::createWorker(WebFrame* frame,
« no previous file with comments | « webkit/tools/test_shell/test_shell_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698