Chromium Code Reviews| 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_USES_GTK) | 9 #if defined(TOOLKIT_USES_GTK) |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 FilePath plugin_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 75 FilePath plugin_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 76 switches::kPluginPath); | 76 switches::kPluginPath); |
| 77 | 77 |
| 78 lazy_tls.Pointer()->Set(this); | 78 lazy_tls.Pointer()->Set(this); |
| 79 #if defined(USE_AURA) | 79 #if defined(USE_AURA) |
| 80 // TODO(saintlou): | 80 // TODO(saintlou): |
| 81 #elif defined(TOOLKIT_USES_GTK) | 81 #elif defined(TOOLKIT_USES_GTK) |
| 82 { | 82 { |
| 83 // XEmbed plugins assume they are hosted in a Gtk application, so we need | 83 // XEmbed plugins assume they are hosted in a Gtk application, so we need |
| 84 // to initialize Gtk in the plugin process. | 84 // to initialize Gtk in the plugin process. |
| 85 g_thread_init(NULL); | 85 //g_thread_init(NULL); |
|
Elliot Glaysher
2012/03/28 17:49:00
This is a longer term thing to fix. As is, please
| |
| 86 | 86 |
| 87 // Flash has problems receiving clicks with newer GTKs due to the | 87 // Flash has problems receiving clicks with newer GTKs due to the |
| 88 // client-side windows change. To be safe, we just always set the | 88 // client-side windows change. To be safe, we just always set the |
| 89 // backwards-compat environment variable. | 89 // backwards-compat environment variable. |
| 90 setenv("GDK_NATIVE_WINDOWS", "1", 1); | 90 setenv("GDK_NATIVE_WINDOWS", "1", 1); |
| 91 | 91 |
| 92 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 92 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
| 93 | 93 |
| 94 // GTK after 2.18 resets the environment variable. But if we're using | 94 // GTK after 2.18 resets the environment variable. But if we're using |
| 95 // nspluginwrapper, that means it'll spawn its subprocess without the | 95 // nspluginwrapper, that means it'll spawn its subprocess without the |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 #endif | 169 #endif |
| 170 channel->set_incognito(incognito); | 170 channel->set_incognito(incognito); |
| 171 } | 171 } |
| 172 | 172 |
| 173 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 173 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 176 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
| 177 PluginChannel::NotifyRenderersOfPendingShutdown(); | 177 PluginChannel::NotifyRenderersOfPendingShutdown(); |
| 178 } | 178 } |
| OLD | NEW |