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

Unified Diff: content/plugin/plugin_thread.cc

Issue 19844003: Remove webkit/plugins/npapi. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove GetDefaultWindowParent Created 7 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
Index: content/plugin/plugin_thread.cc
===================================================================
--- content/plugin/plugin_thread.cc (revision 212595)
+++ content/plugin/plugin_thread.cc (working copy)
@@ -23,13 +23,11 @@
#include "content/child/child_process.h"
#include "content/child/npapi/npobject_util.h"
#include "content/child/npapi/plugin_lib.h"
-#include "content/child/npapi/webplugin_delegate_impl.h"
#include "content/common/plugin_process_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/plugin/content_plugin_client.h"
#include "ipc/ipc_channel_handle.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/plugin_utils.h"
#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
@@ -76,7 +74,8 @@
LAZY_INSTANCE_INITIALIZER;
PluginThread::PluginThread()
- : preloaded_plugin_module_(NULL) {
+ : preloaded_plugin_module_(NULL),
+ forcefully_terminate_plugin_process_(false) {
base::FilePath plugin_path =
CommandLine::ForCurrentProcess()->GetSwitchValuePath(
switches::kPluginPath);
@@ -135,6 +134,10 @@
PluginThread::~PluginThread() {
}
+void PluginThread::SetForcefullyTerminatePluginProcess() {
+ forcefully_terminate_plugin_process_ = true;
+}
+
void PluginThread::Shutdown() {
if (preloaded_plugin_module_) {
base::UnloadNativeLibrary(preloaded_plugin_module_);
@@ -143,7 +146,7 @@
NPChannelBase::CleanupChannels();
PluginLib::UnloadAllPlugins();
- if (webkit::npapi::ShouldForcefullyTerminatePluginProcess())
+ if (forcefully_terminate_plugin_process_)
base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false);
lazy_tls.Pointer()->Set(NULL);

Powered by Google App Engine
This is Rietveld 408576698