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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( | 67 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( |
68 base::LINKER_INITIALIZED); | 68 base::LINKER_INITIALIZED); |
69 | 69 |
70 PluginThread::PluginThread() | 70 PluginThread::PluginThread() |
71 : preloaded_plugin_module_(NULL) { | 71 : preloaded_plugin_module_(NULL) { |
72 plugin_path_ = | 72 plugin_path_ = |
73 CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 73 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
74 switches::kPluginPath); | 74 switches::kPluginPath); |
75 | 75 |
76 lazy_tls.Pointer()->Set(this); | 76 lazy_tls.Pointer()->Set(this); |
77 #if defined(TOOLKIT_USES_GTK) | 77 #if defined(USE_AURA) |
| 78 // TODO(saintlou): |
| 79 #elif defined(TOOLKIT_USES_GTK) |
78 { | 80 { |
79 // XEmbed plugins assume they are hosted in a Gtk application, so we need | 81 // XEmbed plugins assume they are hosted in a Gtk application, so we need |
80 // to initialize Gtk in the plugin process. | 82 // to initialize Gtk in the plugin process. |
81 g_thread_init(NULL); | 83 g_thread_init(NULL); |
82 | 84 |
83 // Flash has problems receiving clicks with newer GTKs due to the | 85 // Flash has problems receiving clicks with newer GTKs due to the |
84 // client-side windows change. To be safe, we just always set the | 86 // client-side windows change. To be safe, we just always set the |
85 // backwards-compat environment variable. | 87 // backwards-compat environment variable. |
86 setenv("GDK_NATIVE_WINDOWS", "1", 1); | 88 setenv("GDK_NATIVE_WINDOWS", "1", 1); |
87 | 89 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 #endif | 163 #endif |
162 channel->set_incognito(incognito); | 164 channel->set_incognito(incognito); |
163 } | 165 } |
164 | 166 |
165 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 167 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
166 } | 168 } |
167 | 169 |
168 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 170 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
169 PluginChannel::NotifyRenderersOfPendingShutdown(); | 171 PluginChannel::NotifyRenderersOfPendingShutdown(); |
170 } | 172 } |
OLD | NEW |