OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_USES_GTK) | 9 #if defined(TOOLKIT_USES_GTK) |
10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // GTK after 2.18 resets the environment variable. But if we're using | 92 // GTK after 2.18 resets the environment variable. But if we're using |
93 // nspluginwrapper, that means it'll spawn its subprocess without the | 93 // nspluginwrapper, that means it'll spawn its subprocess without the |
94 // environment variable! So set it again. | 94 // environment variable! So set it again. |
95 setenv("GDK_NATIVE_WINDOWS", "1", 1); | 95 setenv("GDK_NATIVE_WINDOWS", "1", 1); |
96 } | 96 } |
97 | 97 |
98 ui::SetDefaultX11ErrorHandlers(); | 98 ui::SetDefaultX11ErrorHandlers(); |
99 #endif | 99 #endif |
100 | 100 |
101 PatchNPNFunctions(); | 101 PatchNPNFunctions(plugin_path_); |
102 | 102 |
103 // Preload the library to avoid loading, unloading then reloading | 103 // Preload the library to avoid loading, unloading then reloading |
104 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_, NULL); | 104 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_, NULL); |
105 | 105 |
106 scoped_refptr<webkit::npapi::PluginLib> plugin( | 106 scoped_refptr<webkit::npapi::PluginLib> plugin( |
107 webkit::npapi::PluginLib::CreatePluginLib(plugin_path_)); | 107 webkit::npapi::PluginLib::CreatePluginLib(plugin_path_)); |
108 if (plugin.get()) { | 108 if (plugin.get()) { |
109 plugin->NP_Initialize(); | 109 plugin->NP_Initialize(); |
110 // For OOP plugins the plugin dll will be unloaded during process shutdown | 110 // For OOP plugins the plugin dll will be unloaded during process shutdown |
111 // time. | 111 // time. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 #endif | 164 #endif |
165 channel->set_incognito(incognito); | 165 channel->set_incognito(incognito); |
166 } | 166 } |
167 | 167 |
168 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 168 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
169 } | 169 } |
170 | 170 |
171 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 171 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
172 PluginChannel::NotifyRenderersOfPendingShutdown(); | 172 PluginChannel::NotifyRenderersOfPendingShutdown(); |
173 } | 173 } |
OLD | NEW |