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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 10014013: Add a hang monitor for Pepper plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « content/browser/plugin_service_impl.h ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « content/browser/plugin_service_impl.h ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698