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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 scoped_refptr<PluginLib> plugin(PluginLib::CreatePluginLib(plugin_path)); | 117 scoped_refptr<PluginLib> plugin(PluginLib::CreatePluginLib(plugin_path)); |
118 if (plugin.get()) { | 118 if (plugin.get()) { |
119 plugin->NP_Initialize(); | 119 plugin->NP_Initialize(); |
120 // For OOP plugins the plugin dll will be unloaded during process shutdown | 120 // For OOP plugins the plugin dll will be unloaded during process shutdown |
121 // time. | 121 // time. |
122 plugin->set_defer_unload(true); | 122 plugin->set_defer_unload(true); |
123 } | 123 } |
124 | 124 |
125 GetContentClient()->plugin()->PluginProcessStarted( | 125 GetContentClient()->plugin()->PluginProcessStarted( |
126 plugin.get() ? plugin->plugin_info().name : string16()); | 126 plugin.get() ? plugin->plugin_info().name : base::string16()); |
127 | 127 |
128 // Certain plugins, such as flash, steal the unhandled exception filter | 128 // Certain plugins, such as flash, steal the unhandled exception filter |
129 // thus we never get crash reports when they fault. This call fixes it. | 129 // thus we never get crash reports when they fault. This call fixes it. |
130 message_loop()->set_exception_restoration(true); | 130 message_loop()->set_exception_restoration(true); |
131 channel()->AddFilter(new EnsureTerminateMessageFilter()); | 131 channel()->AddFilter(new EnsureTerminateMessageFilter()); |
132 } | 132 } |
133 | 133 |
134 PluginThread::~PluginThread() { | 134 PluginThread::~PluginThread() { |
135 } | 135 } |
136 | 136 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 187 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
188 } | 188 } |
189 | 189 |
190 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 190 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
191 PluginChannel::NotifyRenderersOfPendingShutdown(); | 191 PluginChannel::NotifyRenderersOfPendingShutdown(); |
192 } | 192 } |
193 | 193 |
194 } // namespace content | 194 } // namespace content |
OLD | NEW |