| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/app/mash/mash_runner.h" | 5 #include "chrome/app/mash/mash_runner.h" |
| 6 | 6 |
| 7 #include "ash/mus/sysui_application.h" | 7 #include "ash/mus/sysui_application.h" |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 class NativeRunnerDelegateImpl : public mojo::shell::NativeRunnerDelegate { | 131 class NativeRunnerDelegateImpl : public mojo::shell::NativeRunnerDelegate { |
| 132 public: | 132 public: |
| 133 NativeRunnerDelegateImpl() {} | 133 NativeRunnerDelegateImpl() {} |
| 134 ~NativeRunnerDelegateImpl() override {} | 134 ~NativeRunnerDelegateImpl() override {} |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 // mojo::shell::NativeRunnerDelegate: | 137 // mojo::shell::NativeRunnerDelegate: |
| 138 void AdjustCommandLineArgumentsForTarget( | 138 void AdjustCommandLineArgumentsForTarget( |
| 139 const mojo::Identity& target, | 139 const mojo::Identity& target, |
| 140 base::CommandLine* command_line) override { | 140 base::CommandLine* command_line) override { |
| 141 command_line->AppendSwitch(switches::kWaitForMojoShell); |
| 141 if (target.name() != "exe:chrome") { | 142 if (target.name() != "exe:chrome") { |
| 142 if (target.name() == "exe:chrome_mash") | 143 if (target.name() == "exe:chrome_mash") |
| 143 ChangeChromeMashToChrome(command_line); | 144 ChangeChromeMashToChrome(command_line); |
| 144 command_line->AppendSwitchASCII(switches::kProcessType, kMashChild); | 145 command_line->AppendSwitchASCII(switches::kProcessType, kMashChild); |
| 145 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
| 146 command_line->AppendArg(switches::kPrefetchArgumentOther); | 147 command_line->AppendArg(switches::kPrefetchArgumentOther); |
| 147 #endif | 148 #endif |
| 148 return; | 149 return; |
| 149 } | 150 } |
| 150 | 151 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 scoped_ptr<base::MessageLoop> message_loop; | 225 scoped_ptr<base::MessageLoop> message_loop; |
| 225 #if defined(OS_LINUX) | 226 #if defined(OS_LINUX) |
| 226 base::AtExitManager exit_manager; | 227 base::AtExitManager exit_manager; |
| 227 #endif | 228 #endif |
| 228 if (!IsChild()) | 229 if (!IsChild()) |
| 229 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 230 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
| 230 MashRunner mash_runner; | 231 MashRunner mash_runner; |
| 231 mash_runner.Run(); | 232 mash_runner.Run(); |
| 232 return 0; | 233 return 0; |
| 233 } | 234 } |
| OLD | NEW |