| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 kPluginProcessTerminateTimeoutMs); | 58 kPluginProcessTerminateTimeoutMs); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void Terminate() { | 61 void Terminate() { |
| 62 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 62 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
| 63 } | 63 } |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace | 66 } // namespace |
| 67 | 67 |
| 68 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( | 68 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls = |
| 69 base::LINKER_INITIALIZED); | 69 LAZY_INSTANCE_INITIALIZER; |
| 70 | 70 |
| 71 PluginThread::PluginThread() | 71 PluginThread::PluginThread() |
| 72 : preloaded_plugin_module_(NULL) { | 72 : preloaded_plugin_module_(NULL) { |
| 73 FilePath plugin_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 73 FilePath plugin_path = 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(USE_AURA) | 77 #if defined(USE_AURA) |
| 78 // TODO(saintlou): | 78 // TODO(saintlou): |
| 79 #elif defined(TOOLKIT_USES_GTK) | 79 #elif defined(TOOLKIT_USES_GTK) |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 #endif | 167 #endif |
| 168 channel->set_incognito(incognito); | 168 channel->set_incognito(incognito); |
| 169 } | 169 } |
| 170 | 170 |
| 171 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 171 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 174 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
| 175 PluginChannel::NotifyRenderersOfPendingShutdown(); | 175 PluginChannel::NotifyRenderersOfPendingShutdown(); |
| 176 } | 176 } |
| OLD | NEW |