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

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 6930059: Make Pepper work out-of-process in the windows sandbox (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
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/browser/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 27 matching lines...) Expand all
38 38
39 FilePath exe_path = ChildProcessHost::GetChildPath(plugin_launcher.empty()); 39 FilePath exe_path = ChildProcessHost::GetChildPath(plugin_launcher.empty());
40 if (exe_path.empty()) 40 if (exe_path.empty())
41 return false; 41 return false;
42 42
43 CommandLine* cmd_line = new CommandLine(exe_path); 43 CommandLine* cmd_line = new CommandLine(exe_path);
44 cmd_line->AppendSwitchASCII(switches::kProcessType, 44 cmd_line->AppendSwitchASCII(switches::kProcessType,
45 switches::kPpapiPluginProcess); 45 switches::kPpapiPluginProcess);
46 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); 46 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
47 47
48 // Propagate debugger flag.
49 if (browser_command_line.HasSwitch(switches::kPpapiStartupDialog))
50 cmd_line->AppendSwitch(switches::kPpapiStartupDialog);
51
48 SetCrashReporterCommandLine(cmd_line); 52 SetCrashReporterCommandLine(cmd_line);
49 53
50 if (!plugin_launcher.empty()) 54 if (!plugin_launcher.empty())
51 cmd_line->PrependWrapper(plugin_launcher); 55 cmd_line->PrependWrapper(plugin_launcher);
52 56
53 // On posix, having a plugin launcher means we need to use another process 57 // On posix, having a plugin launcher means we need to use another process
54 // instead of just forking the zygote. 58 // instead of just forking the zygote.
55 Launch( 59 Launch(
56 #if defined(OS_WIN) 60 #if defined(OS_WIN)
57 FilePath(), 61 FilePath(),
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ::DuplicateHandle(::GetCurrentProcess(), plugin_process, 173 ::DuplicateHandle(::GetCurrentProcess(), plugin_process,
170 renderer_process, &renderers_plugin_handle, 174 renderer_process, &renderers_plugin_handle,
171 0, FALSE, DUPLICATE_SAME_ACCESS); 175 0, FALSE, DUPLICATE_SAME_ACCESS);
172 #elif defined(OS_POSIX) 176 #elif defined(OS_POSIX)
173 // Don't need to duplicate anything on POSIX since it's just a PID. 177 // Don't need to duplicate anything on POSIX since it's just a PID.
174 base::ProcessHandle renderers_plugin_handle = plugin_process; 178 base::ProcessHandle renderers_plugin_handle = plugin_process;
175 #endif 179 #endif
176 180
177 client->OnChannelOpened(renderers_plugin_handle, channel_handle); 181 client->OnChannelOpened(renderers_plugin_handle, channel_handle);
178 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698