| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/runner/child_process_host.h" | 5 #include "mojo/runner/child_process_host.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 if (!success) { | 92 if (!success) { |
| 93 LOG(ERROR) << "Failed to start child process"; | 93 LOG(ERROR) << "Failed to start child process"; |
| 94 AppCompleted(MOJO_RESULT_UNKNOWN); | 94 AppCompleted(MOJO_RESULT_UNKNOWN); |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool ChildProcessHost::DoLaunch() { | 99 bool ChildProcessHost::DoLaunch() { |
| 100 static const char* kForwardSwitches[] = { | 100 static const char* kForwardSwitches[] = { |
| 101 switches::kUserDataDir, |
| 101 switches::kOverrideUseGLWithOSMesaForTests, | 102 switches::kOverrideUseGLWithOSMesaForTests, |
| 102 switches::kTraceToConsole, | 103 switches::kTraceToConsole, |
| 103 switches::kV, | 104 switches::kV, |
| 104 switches::kVModule, | 105 switches::kVModule, |
| 105 switches::kWaitForDebugger, | 106 switches::kWaitForDebugger, |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 const base::CommandLine* parent_command_line = | 109 const base::CommandLine* parent_command_line = |
| 109 base::CommandLine::ForCurrentProcess(); | 110 base::CommandLine::ForCurrentProcess(); |
| 110 base::CommandLine child_command_line(parent_command_line->GetProgram()); | 111 base::CommandLine child_command_line(parent_command_line->GetProgram()); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 148 |
| 148 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) { | 149 void ChildProcessHost::DidCreateChannel(embedder::ChannelInfo* channel_info) { |
| 149 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; | 150 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; |
| 150 | 151 |
| 151 CHECK(channel_info); | 152 CHECK(channel_info); |
| 152 channel_info_ = channel_info; | 153 channel_info_ = channel_info; |
| 153 } | 154 } |
| 154 | 155 |
| 155 } // namespace runner | 156 } // namespace runner |
| 156 } // namespace mojo | 157 } // namespace mojo |
| OLD | NEW |