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 11 matching lines...) Expand all Loading... |
22 #include "base/threading/thread_local.h" | 22 #include "base/threading/thread_local.h" |
23 #include "content/common/child_process.h" | 23 #include "content/common/child_process.h" |
24 #include "content/common/npobject_util.h" | 24 #include "content/common/npobject_util.h" |
25 #include "content/common/plugin_messages.h" | 25 #include "content/common/plugin_messages.h" |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 #include "content/public/plugin/content_plugin_client.h" | 27 #include "content/public/plugin/content_plugin_client.h" |
28 #include "ipc/ipc_channel_handle.h" | 28 #include "ipc/ipc_channel_handle.h" |
29 #include "webkit/glue/webkit_glue.h" | 29 #include "webkit/glue/webkit_glue.h" |
30 #include "webkit/plugins/npapi/plugin_lib.h" | 30 #include "webkit/plugins/npapi/plugin_lib.h" |
31 #include "webkit/plugins/npapi/plugin_list.h" | 31 #include "webkit/plugins/npapi/plugin_list.h" |
| 32 #include "webkit/plugins/npapi/plugin_utils.h" |
32 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 33 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
33 | 34 |
34 #if defined(TOOLKIT_GTK) | 35 #if defined(TOOLKIT_GTK) |
35 #include "ui/gfx/gtk_util.h" | 36 #include "ui/gfx/gtk_util.h" |
36 #endif | 37 #endif |
37 | 38 |
38 #if defined(USE_X11) | 39 #if defined(USE_X11) |
39 #include "ui/base/x/x11_util.h" | 40 #include "ui/base/x/x11_util.h" |
40 #endif | 41 #endif |
41 | 42 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 141 } |
141 | 142 |
142 void PluginThread::Shutdown() { | 143 void PluginThread::Shutdown() { |
143 if (preloaded_plugin_module_) { | 144 if (preloaded_plugin_module_) { |
144 base::UnloadNativeLibrary(preloaded_plugin_module_); | 145 base::UnloadNativeLibrary(preloaded_plugin_module_); |
145 preloaded_plugin_module_ = NULL; | 146 preloaded_plugin_module_ = NULL; |
146 } | 147 } |
147 NPChannelBase::CleanupChannels(); | 148 NPChannelBase::CleanupChannels(); |
148 webkit::npapi::PluginLib::UnloadAllPlugins(); | 149 webkit::npapi::PluginLib::UnloadAllPlugins(); |
149 | 150 |
150 if (webkit_glue::ShouldForcefullyTerminatePluginProcess()) | 151 if (webkit::npapi::ShouldForcefullyTerminatePluginProcess()) |
151 base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false); | 152 base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false); |
152 | 153 |
153 lazy_tls.Pointer()->Set(NULL); | 154 lazy_tls.Pointer()->Set(NULL); |
154 } | 155 } |
155 | 156 |
156 PluginThread* PluginThread::current() { | 157 PluginThread* PluginThread::current() { |
157 return lazy_tls.Pointer()->Get(); | 158 return lazy_tls.Pointer()->Get(); |
158 } | 159 } |
159 | 160 |
160 bool PluginThread::OnControlMessageReceived(const IPC::Message& msg) { | 161 bool PluginThread::OnControlMessageReceived(const IPC::Message& msg) { |
(...skipping 23 matching lines...) Expand all Loading... |
184 } | 185 } |
185 | 186 |
186 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 187 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
187 } | 188 } |
188 | 189 |
189 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 190 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
190 PluginChannel::NotifyRenderersOfPendingShutdown(); | 191 PluginChannel::NotifyRenderersOfPendingShutdown(); |
191 } | 192 } |
192 | 193 |
193 } // namespace content | 194 } // namespace content |
OLD | NEW |