| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/shell/app_container.h" |
| 6 |
| 5 #include "base/bind.h" | 7 #include "base/bind.h" |
| 6 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 7 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 8 #include "base/native_library.h" | 10 #include "base/native_library.h" |
| 9 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
| 10 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 11 #include "mojo/public/system/core.h" | 13 #include "mojo/public/system/core.h" |
| 12 #include "mojo/shell/app_container.h" | |
| 13 | 14 |
| 14 typedef MojoResult (*MojoMainFunction)(mojo::Handle pipe); | 15 typedef MojoResult (*MojoMainFunction)(mojo::Handle pipe); |
| 15 | 16 |
| 16 namespace mojo { | 17 namespace mojo { |
| 17 namespace shell { | 18 namespace shell { |
| 18 | 19 |
| 19 void LaunchAppOnThread( | 20 void LaunchAppOnThread( |
| 20 const base::FilePath& app_path, | 21 const base::FilePath& app_path, |
| 21 Handle app_handle) { | 22 Handle app_handle) { |
| 22 MojoResult result = MOJO_RESULT_OK; | 23 MojoResult result = MOJO_RESULT_OK; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 thread_.reset(); | 85 thread_.reset(); |
| 85 Close(shell_handle_); | 86 Close(shell_handle_); |
| 86 | 87 |
| 87 // Probably want to do something more sophisticated here, like notify someone | 88 // Probably want to do something more sophisticated here, like notify someone |
| 88 // else to do this. | 89 // else to do this. |
| 89 base::MessageLoop::current()->Quit(); | 90 base::MessageLoop::current()->Quit(); |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace shell | 93 } // namespace shell |
| 93 } // namespace mojo | 94 } // namespace mojo |
| OLD | NEW |