| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace | 73 } // namespace |
| 74 | 74 |
| 75 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls = | 75 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls = |
| 76 LAZY_INSTANCE_INITIALIZER; | 76 LAZY_INSTANCE_INITIALIZER; |
| 77 | 77 |
| 78 PluginThread::PluginThread() | 78 PluginThread::PluginThread() |
| 79 : preloaded_plugin_module_(NULL) { | 79 : preloaded_plugin_module_(NULL) { |
| 80 FilePath plugin_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 80 base::FilePath plugin_path = |
| 81 switches::kPluginPath); | 81 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 82 switches::kPluginPath); |
| 82 | 83 |
| 83 lazy_tls.Pointer()->Set(this); | 84 lazy_tls.Pointer()->Set(this); |
| 84 #if defined(USE_AURA) | 85 #if defined(USE_AURA) |
| 85 // TODO(saintlou): | 86 // TODO(saintlou): |
| 86 #elif defined(TOOLKIT_GTK) | 87 #elif defined(TOOLKIT_GTK) |
| 87 { | 88 { |
| 88 // XEmbed plugins assume they are hosted in a Gtk application, so we need | 89 // XEmbed plugins assume they are hosted in a Gtk application, so we need |
| 89 // to initialize Gtk in the plugin process. | 90 // to initialize Gtk in the plugin process. |
| 90 // g_thread_init API is deprecated since glib 2.31.0, see release note: | 91 // g_thread_init API is deprecated since glib 2.31.0, see release note: |
| 91 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.
html | 92 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.
html |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 181 } |
| 181 | 182 |
| 182 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 183 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
| 183 } | 184 } |
| 184 | 185 |
| 185 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 186 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
| 186 PluginChannel::NotifyRenderersOfPendingShutdown(); | 187 PluginChannel::NotifyRenderersOfPendingShutdown(); |
| 187 } | 188 } |
| 188 | 189 |
| 189 } // namespace content | 190 } // namespace content |
| OLD | NEW |