OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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/command_line.h" |
| 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" |
| 10 #include "mojo/shell/app_container.h" |
| 11 #include "mojo/shell/switches.h" |
| 12 #include "mojo/system/core_impl.h" |
| 13 |
| 14 int main(int argc, char** argv) { |
| 15 base::AtExitManager at_exit; |
| 16 CommandLine::Init(argc, argv); |
| 17 |
| 18 mojo::system::CoreImpl::Init(); |
| 19 |
| 20 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 21 |
| 22 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 23 if (!command_line.HasSwitch(switches::kApp)) { |
| 24 LOG(ERROR) << "No app path specified."; |
| 25 return 0; |
| 26 } |
| 27 |
| 28 scoped_ptr<mojo::shell::AppContainer> container( |
| 29 new mojo::shell::AppContainer); |
| 30 container->LaunchApp(command_line.GetSwitchValuePath(switches::kApp)); |
| 31 message_loop.Run(); |
| 32 return 0; |
| 33 } |
OLD | NEW |