| Index: content/browser/plugin_service_impl.cc
|
| diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
|
| index 99924b14420e42b8b8c7aad34138d6e90260cd12..29909c240bd16c2ab3ccd46b2169f23912a3e3ec 100644
|
| --- a/content/browser/plugin_service_impl.cc
|
| +++ b/content/browser/plugin_service_impl.cc
|
| @@ -342,7 +342,7 @@ void PluginServiceImpl::OpenChannelToPpapiPlugin(
|
| } else {
|
| // Send error.
|
| client->OnPpapiChannelOpened(base::kNullProcessHandle,
|
| - IPC::ChannelHandle());
|
| + IPC::ChannelHandle(), 0);
|
| }
|
| }
|
|
|
| @@ -355,7 +355,7 @@ void PluginServiceImpl::OpenChannelToPpapiBroker(
|
| } else {
|
| // Send error.
|
| client->OnPpapiChannelOpened(base::kNullProcessHandle,
|
| - IPC::ChannelHandle());
|
| + IPC::ChannelHandle(), 0);
|
| }
|
| }
|
|
|
| @@ -483,6 +483,23 @@ bool PluginServiceImpl::GetPluginInfoByPath(const FilePath& plugin_path,
|
| return false;
|
| }
|
|
|
| +string16 PluginServiceImpl::GetPluginDisplayNameByPath(const FilePath& path) {
|
| + string16 plugin_name = path.LossyDisplayName();
|
| + webkit::WebPluginInfo info;
|
| + if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) &&
|
| + !info.name.empty()) {
|
| + plugin_name = info.name;
|
| +#if defined(OS_MACOSX)
|
| + // Many plugins on the Mac have .plugin in the actual name, which looks
|
| + // terrible, so look for that and strip it off if present.
|
| + const std::string kPluginExtension = ".plugin";
|
| + if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true))
|
| + plugin_name.erase(plugin_name.length() - kPluginExtension.length());
|
| +#endif // OS_MACOSX
|
| + }
|
| + return plugin_name;
|
| +}
|
| +
|
| void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) {
|
| scoped_refptr<base::MessageLoopProxy> target_loop(
|
| MessageLoop::current()->message_loop_proxy());
|
|
|