OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/plugin/plugin_thread.h" | 5 #include "content/plugin/plugin_thread.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(TOOLKIT_GTK) | 9 #if defined(TOOLKIT_GTK) |
10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 PluginThread::~PluginThread() { | 134 PluginThread::~PluginThread() { |
135 } | 135 } |
136 | 136 |
137 void PluginThread::SetForcefullyTerminatePluginProcess() { | 137 void PluginThread::SetForcefullyTerminatePluginProcess() { |
138 forcefully_terminate_plugin_process_ = true; | 138 forcefully_terminate_plugin_process_ = true; |
139 } | 139 } |
140 | 140 |
141 void PluginThread::Shutdown() { | 141 void PluginThread::Shutdown() { |
| 142 ChildThread::Shutdown(); |
| 143 |
142 if (preloaded_plugin_module_) { | 144 if (preloaded_plugin_module_) { |
143 base::UnloadNativeLibrary(preloaded_plugin_module_); | 145 base::UnloadNativeLibrary(preloaded_plugin_module_); |
144 preloaded_plugin_module_ = NULL; | 146 preloaded_plugin_module_ = NULL; |
145 } | 147 } |
146 NPChannelBase::CleanupChannels(); | 148 NPChannelBase::CleanupChannels(); |
147 PluginLib::UnloadAllPlugins(); | 149 PluginLib::UnloadAllPlugins(); |
148 | 150 |
149 if (forcefully_terminate_plugin_process_) | 151 if (forcefully_terminate_plugin_process_) |
150 base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false); | 152 base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false); |
151 | 153 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 185 } |
184 | 186 |
185 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 187 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
186 } | 188 } |
187 | 189 |
188 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 190 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
189 PluginChannel::NotifyRenderersOfPendingShutdown(); | 191 PluginChannel::NotifyRenderersOfPendingShutdown(); |
190 } | 192 } |
191 | 193 |
192 } // namespace content | 194 } // namespace content |
OLD | NEW |