| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/at_exit.h" | |
| 6 #include "base/bind.h" | |
| 7 #include "base/command_line.h" | |
| 8 #include "components/arc/standalone/arc_standalone_bridge_runner.h" | |
| 9 #include "components/arc/standalone/service_helper.h" | |
| 10 #include "mojo/edk/embedder/embedder.h" | |
| 11 | |
| 12 // This is experimental only. Do not use in production. | |
| 13 // All threads in the standalone runner must be I/O threads. | |
| 14 int main(int argc, char** argv) { | |
| 15 base::CommandLine::Init(argc, argv); | |
| 16 base::AtExitManager at_exit_manager; | |
| 17 mojo::edk::Init(); | |
| 18 | |
| 19 // Instantiate runner, which instantiates message loop. | |
| 20 arc::ArcStandaloneBridgeRunner runner; | |
| 21 arc::ServiceHelper helper; | |
| 22 helper.Init(base::Bind(&arc::ArcStandaloneBridgeRunner::Stop, | |
| 23 base::Unretained(&runner), | |
| 24 1)); | |
| 25 | |
| 26 // Spin the message loop. | |
| 27 int exit_code = runner.Run(); | |
| 28 return exit_code; | |
| 29 } | |
| OLD | NEW |