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

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
« no previous file with comments | « chrome/common/sandbox_policy.cc ('k') | content/ppapi_plugin/ppapi_plugin_main.cc » ('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) 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 // TODO(vtl): Stop passing flash args in the command line, on windows is
49 // going to explode.
48 static const char* kForwardSwitches[] = { 50 static const char* kForwardSwitches[] = {
49 switches::kPpapiFlashArgs, 51 switches::kPpapiFlashArgs,
52 switches::kPpapiStartupDialog
50 }; 53 };
51 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, 54 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches,
52 arraysize(kForwardSwitches)); 55 arraysize(kForwardSwitches));
53 56
54 if (!plugin_launcher.empty()) 57 if (!plugin_launcher.empty())
55 cmd_line->PrependWrapper(plugin_launcher); 58 cmd_line->PrependWrapper(plugin_launcher);
56 59
57 // On posix, having a plugin launcher means we need to use another process 60 // On posix, having a plugin launcher means we need to use another process
58 // instead of just forking the zygote. 61 // instead of just forking the zygote.
59 Launch( 62 Launch(
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ::DuplicateHandle(::GetCurrentProcess(), plugin_process, 176 ::DuplicateHandle(::GetCurrentProcess(), plugin_process,
174 renderer_process, &renderers_plugin_handle, 177 renderer_process, &renderers_plugin_handle,
175 0, FALSE, DUPLICATE_SAME_ACCESS); 178 0, FALSE, DUPLICATE_SAME_ACCESS);
176 #elif defined(OS_POSIX) 179 #elif defined(OS_POSIX)
177 // Don't need to duplicate anything on POSIX since it's just a PID. 180 // Don't need to duplicate anything on POSIX since it's just a PID.
178 base::ProcessHandle renderers_plugin_handle = plugin_process; 181 base::ProcessHandle renderers_plugin_handle = plugin_process;
179 #endif 182 #endif
180 183
181 client->OnChannelOpened(renderers_plugin_handle, channel_handle); 184 client->OnChannelOpened(renderers_plugin_handle, channel_handle);
182 } 185 }
OLDNEW
« no previous file with comments | « chrome/common/sandbox_policy.cc ('k') | content/ppapi_plugin/ppapi_plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698