| 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/public/cpp/application/application_runner.h" | 5 #include "mojo/public/cpp/application/application_runner.h" |
| 6 | 6 |
| 7 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/application_delegate.h" |
| 8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/public/cpp/environment/environment.h" | 9 #include "mojo/public/cpp/environment/environment.h" |
| 10 #include "mojo/public/cpp/utility/run_loop.h" | 10 #include "mojo/public/cpp/utility/run_loop.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 MojoResult ApplicationRunner::Run(MojoHandle shell_handle) { | 23 MojoResult ApplicationRunner::Run(MojoHandle shell_handle) { |
| 24 Environment env; | 24 Environment env; |
| 25 { | 25 { |
| 26 RunLoop loop; | 26 RunLoop loop; |
| 27 ApplicationImpl app(delegate_, | 27 ApplicationImpl app(delegate_, |
| 28 MakeScopedHandle(MessagePipeHandle(shell_handle))); | 28 MakeScopedHandle(MessagePipeHandle(shell_handle))); |
| 29 loop.Run(); | 29 loop.Run(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 delete delegate_; | 32 delete delegate_; |
| 33 delegate_ = NULL; | 33 delegate_ = nullptr; |
| 34 return MOJO_RESULT_OK; | 34 return MOJO_RESULT_OK; |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace mojo | 37 } // namespace mojo |
| OLD | NEW |