Commit b8c01014 authored by jam's avatar jam Committed by Commit bot

Pass mojo_shell args to child processes.

This allows URL(s) sent as args to be passed to the window manager. Also send --override-use-gl-with-osmesa-for-tests since it's listed on the sites page.

Review URL: https://codereview.chromium.org/1108023002

Cr-Commit-Position: refs/heads/master@{#327056}
parent b9fee249
......@@ -123,6 +123,7 @@ source_set("lib") {
"//mojo/services/network/public/interfaces",
"//mojo/shell/application_manager",
"//mojo/services/tracing:bindings",
"//ui/gl",
"//url",
]
......
......@@ -22,6 +22,7 @@
#include "mojo/shell/context.h"
#include "mojo/shell/switches.h"
#include "mojo/shell/task_runners.h"
#include "ui/gl/gl_switches.h"
namespace mojo {
namespace shell {
......@@ -97,7 +98,10 @@ void ChildProcessHost::DidStart(bool success) {
bool ChildProcessHost::DoLaunch() {
static const char* kForwardSwitches[] = {
switches::kTraceToConsole, switches::kV, switches::kVModule,
switches::kOverrideUseGLWithOSMesaForTests,
switches::kTraceToConsole,
switches::kV,
switches::kVModule,
};
const base::CommandLine* parent_command_line =
......@@ -116,6 +120,10 @@ bool ChildProcessHost::DoLaunch() {
child_command_line.AppendSwitch(switches::kWaitForDebugger);
}
auto args = parent_command_line->GetArgs();
for (const auto& arg : args)
child_command_line.AppendArgNative(arg);
embedder::HandlePassingInformation handle_passing_info;
platform_channel_pair_.PrepareToPassClientHandleToChildProcess(
&child_command_line, &handle_passing_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment