summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/plugin_service_impl.cc14
-rw-r--r--content/browser/plugin_service_impl.h14
2 files changed, 22 insertions, 6 deletions
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index fad5d5e..397ac1e 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -613,6 +613,20 @@ content::PluginServiceFilter* PluginServiceImpl::GetFilter() {
return filter_;
}
+void PluginServiceImpl::ForcePluginShutdown(const FilePath& plugin_path) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&PluginServiceImpl::ForcePluginShutdown,
+ base::Unretained(this), plugin_path));
+ return;
+ }
+
+ PluginProcessHost* plugin = FindNpapiPluginProcess(plugin_path);
+ if (plugin)
+ plugin->ForceShutdown();
+}
+
void PluginServiceImpl::RefreshPlugins() {
plugin_list_->RefreshPlugins();
}
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index fc96968..4b74b58 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -68,8 +68,6 @@ class CONTENT_EXPORT PluginServiceImpl
// content::PluginService implementation:
virtual void Init() OVERRIDE;
virtual void StartWatchingPlugins() OVERRIDE;
- virtual PluginProcessHost* FindNpapiPluginProcess(
- const FilePath& plugin_path) OVERRIDE;
virtual bool GetPluginInfoArray(
const GURL& url,
const std::string& mime_type,
@@ -95,6 +93,7 @@ class CONTENT_EXPORT PluginServiceImpl
const FilePath& plugin_path) OVERRIDE;
virtual void SetFilter(content::PluginServiceFilter* filter) OVERRIDE;
virtual content::PluginServiceFilter* GetFilter() OVERRIDE;
+ virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE;
virtual void RefreshPlugins() OVERRIDE;
virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE;
virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE;
@@ -107,10 +106,6 @@ class CONTENT_EXPORT PluginServiceImpl
virtual void SetPluginListForTesting(
webkit::npapi::PluginList* plugin_list) OVERRIDE;
- // Like FindNpapiPluginProcess but for Pepper.
- PpapiPluginProcessHost* FindPpapiPluginProcess(const FilePath& plugin_path);
- PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path);
-
// Returns the plugin process host corresponding to the plugin process that
// has been started by this service. This will start a process to host the
// 'plugin_path' if needed. If the process fails to start, the return value
@@ -157,6 +152,13 @@ class CONTENT_EXPORT PluginServiceImpl
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // Returns the plugin process host corresponding to the plugin process that
+ // has been started by this service. Returns NULL if no process has been
+ // started.
+ PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path);
+ PpapiPluginProcessHost* FindPpapiPluginProcess(const FilePath& plugin_path);
+ PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path);
+
void RegisterPepperPlugins();
// Function that is run on the FILE thread to load the plugins synchronously.