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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (plugin.get()) { | 121 if (plugin.get()) { |
122 plugin->NP_Initialize(); | 122 plugin->NP_Initialize(); |
123 // For OOP plugins the plugin dll will be unloaded during process shutdown | 123 // For OOP plugins the plugin dll will be unloaded during process shutdown |
124 // time. | 124 // time. |
125 plugin->set_defer_unload(true); | 125 plugin->set_defer_unload(true); |
126 } | 126 } |
127 | 127 |
128 GetContentClient()->plugin()->PluginProcessStarted( | 128 GetContentClient()->plugin()->PluginProcessStarted( |
129 plugin.get() ? plugin->plugin_info().name : string16()); | 129 plugin.get() ? plugin->plugin_info().name : string16()); |
130 | 130 |
131 GetContentClient()->AddNPAPIPlugins( | |
132 webkit::npapi::PluginList::Singleton()); | |
133 | |
134 // Certain plugins, such as flash, steal the unhandled exception filter | 131 // Certain plugins, such as flash, steal the unhandled exception filter |
135 // thus we never get crash reports when they fault. This call fixes it. | 132 // thus we never get crash reports when they fault. This call fixes it. |
136 message_loop()->set_exception_restoration(true); | 133 message_loop()->set_exception_restoration(true); |
137 channel()->AddFilter(new EnsureTerminateMessageFilter()); | 134 channel()->AddFilter(new EnsureTerminateMessageFilter()); |
138 } | 135 } |
139 | 136 |
140 PluginThread::~PluginThread() { | 137 PluginThread::~PluginThread() { |
141 } | 138 } |
142 | 139 |
143 void PluginThread::Shutdown() { | 140 void PluginThread::Shutdown() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 182 } |
186 | 183 |
187 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 184 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
188 } | 185 } |
189 | 186 |
190 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 187 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
191 PluginChannel::NotifyRenderersOfPendingShutdown(); | 188 PluginChannel::NotifyRenderersOfPendingShutdown(); |
192 } | 189 } |
193 | 190 |
194 } // namespace content | 191 } // namespace content |
OLD | NEW |