Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Side by Side Diff: content/plugin/plugin_thread.cc

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Comments from avi. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/plugin/plugin_channel.cc ('k') | content/public/child/child_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 IPC_MESSAGE_HANDLER(PluginProcessMsg_NotifyRenderersOfPendingShutdown, 131 IPC_MESSAGE_HANDLER(PluginProcessMsg_NotifyRenderersOfPendingShutdown,
132 OnNotifyRenderersOfPendingShutdown) 132 OnNotifyRenderersOfPendingShutdown)
133 IPC_MESSAGE_UNHANDLED(handled = false) 133 IPC_MESSAGE_UNHANDLED(handled = false)
134 IPC_END_MESSAGE_MAP() 134 IPC_END_MESSAGE_MAP()
135 return handled; 135 return handled;
136 } 136 }
137 137
138 void PluginThread::OnCreateChannel(int renderer_id, 138 void PluginThread::OnCreateChannel(int renderer_id,
139 bool incognito) { 139 bool incognito) {
140 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( 140 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel(
141 renderer_id, ChildProcess::current()->io_task_runner(), 141 renderer_id, ChildProcess::current()->io_task_runner()));
142 GetAttachmentBroker()));
143 IPC::ChannelHandle channel_handle; 142 IPC::ChannelHandle channel_handle;
144 if (channel.get()) { 143 if (channel.get()) {
145 channel_handle.name = channel->channel_handle().name; 144 channel_handle.name = channel->channel_handle().name;
146 #if defined(OS_POSIX) 145 #if defined(OS_POSIX)
147 // On POSIX, pass the renderer-side FD. 146 // On POSIX, pass the renderer-side FD.
148 channel_handle.socket = 147 channel_handle.socket =
149 base::FileDescriptor(channel->TakeRendererFileDescriptor()); 148 base::FileDescriptor(channel->TakeRendererFileDescriptor());
150 #endif 149 #endif
151 channel->set_incognito(incognito); 150 channel->set_incognito(incognito);
152 } 151 }
153 152
154 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); 153 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle));
155 } 154 }
156 155
157 void PluginThread::OnNotifyRenderersOfPendingShutdown() { 156 void PluginThread::OnNotifyRenderersOfPendingShutdown() {
158 PluginChannel::NotifyRenderersOfPendingShutdown(); 157 PluginChannel::NotifyRenderersOfPendingShutdown();
159 } 158 }
160 159
161 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_channel.cc ('k') | content/public/child/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698