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(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include <CoreFoundation/CoreFoundation.h> | 10 #include <CoreFoundation/CoreFoundation.h> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void PluginThread::OnCreateChannel(int renderer_id, | 139 void PluginThread::OnCreateChannel(int renderer_id, |
140 bool incognito) { | 140 bool incognito) { |
141 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( | 141 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( |
142 renderer_id, ChildProcess::current()->io_message_loop_proxy())); | 142 renderer_id, ChildProcess::current()->io_message_loop_proxy())); |
143 IPC::ChannelHandle channel_handle; | 143 IPC::ChannelHandle channel_handle; |
144 if (channel.get()) { | 144 if (channel.get()) { |
145 channel_handle.name = channel->channel_handle().name; | 145 channel_handle.name = channel->channel_handle().name; |
146 #if defined(OS_POSIX) | 146 #if defined(OS_POSIX) |
147 // On POSIX, pass the renderer-side FD. | 147 // On POSIX, pass the renderer-side FD. |
148 channel_handle.socket = | 148 channel_handle.socket = |
149 base::FileDescriptor(channel->TakeRendererFileDescriptor(), true); | 149 base::FileDescriptor(channel->TakeRendererFileDescriptor()); |
150 #endif | 150 #endif |
151 channel->set_incognito(incognito); | 151 channel->set_incognito(incognito); |
152 } | 152 } |
153 | 153 |
154 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 154 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
155 } | 155 } |
156 | 156 |
157 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 157 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
158 PluginChannel::NotifyRenderersOfPendingShutdown(); | 158 PluginChannel::NotifyRenderersOfPendingShutdown(); |
159 } | 159 } |
160 | 160 |
161 } // namespace content | 161 } // namespace content |
OLD | NEW |