| Index: webkit/tools/test_shell/test_webview_delegate_gtk.cc
|
| diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
|
| index 831691a77776622b8d97970f13c52aea6fb3f4a4..8482080b8e6dba8cd62006d62bc044adff163de1 100644
|
| --- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
|
| +++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
|
| @@ -22,7 +22,9 @@
|
| #include "webkit/glue/weburlrequest.h"
|
| #include "webkit/glue/webkit_glue.h"
|
| #include "webkit/glue/webview.h"
|
| +#include "webkit/glue/plugins/plugin_list.h"
|
| #include "webkit/glue/window_open_disposition.h"
|
| +#include "webkit/glue/plugins/webplugin_delegate_impl.h"
|
| #include "webkit/tools/test_shell/test_navigation_controller.h"
|
| #include "webkit/tools/test_shell/test_shell.h"
|
|
|
| @@ -77,8 +79,19 @@ WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
|
| const std::string& mime_type,
|
| const std::string& clsid,
|
| std::string* actual_mime_type) {
|
| - NOTIMPLEMENTED();
|
| - return NULL;
|
| + bool allow_wildcard = true;
|
| + WebPluginInfo info;
|
| + if (!NPAPI::PluginList::Singleton()->GetPluginInfo(url, mime_type, clsid,
|
| + allow_wildcard, &info,
|
| + actual_mime_type))
|
| + return NULL;
|
| +
|
| + if (actual_mime_type && !actual_mime_type->empty())
|
| + return WebPluginDelegateImpl::Create(info.path, *actual_mime_type,
|
| + shell_->webViewHost()->view_handle());
|
| + else
|
| + return WebPluginDelegateImpl::Create(info.path, mime_type,
|
| + shell_->webViewHost()->view_handle());
|
| }
|
|
|
| void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
|
|
|