| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/plugin/plugin_thread.h" | 5 #include "chrome/plugin/plugin_thread.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(USE_X11) | 9 #if defined(USE_X11) |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // GTK after 2.18 resets the environment variable. But if we're using | 80 // GTK after 2.18 resets the environment variable. But if we're using |
| 81 // nspluginwrapper, that means it'll spawn its subprocess without the | 81 // nspluginwrapper, that means it'll spawn its subprocess without the |
| 82 // environment variable! So set it again. | 82 // environment variable! So set it again. |
| 83 setenv("GDK_NATIVE_WINDOWS", "1", 1); | 83 setenv("GDK_NATIVE_WINDOWS", "1", 1); |
| 84 | 84 |
| 85 for (size_t i = 0; i < args.size(); ++i) { | 85 for (size_t i = 0; i < args.size(); ++i) { |
| 86 free(argv[i]); | 86 free(argv[i]); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 x11_util::SetX11ErrorHandlers(); | 90 x11_util::SetDefaultX11ErrorHandlers(); |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 PatchNPNFunctions(); | 93 PatchNPNFunctions(); |
| 94 | 94 |
| 95 // Preload the library to avoid loading, unloading then reloading | 95 // Preload the library to avoid loading, unloading then reloading |
| 96 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_); | 96 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_); |
| 97 | 97 |
| 98 ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin()); | 98 ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin()); |
| 99 | 99 |
| 100 scoped_refptr<NPAPI::PluginLib> plugin = | 100 scoped_refptr<NPAPI::PluginLib> plugin = |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 if (!result || net_error != net::OK) | 237 if (!result || net_error != net::OK) |
| 238 return false; | 238 return false; |
| 239 | 239 |
| 240 *proxy_list = proxy_result; | 240 *proxy_list = proxy_result; |
| 241 return true; | 241 return true; |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace webkit_glue | 244 } // namespace webkit_glue |
| OLD | NEW |