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/application/application_runner_chromium.h" | 5 #include "mojo/application/application_runner_chromium.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #endif | 51 #endif |
52 | 52 |
53 { | 53 { |
54 std::unique_ptr<base::MessageLoop> loop; | 54 std::unique_ptr<base::MessageLoop> loop; |
55 if (message_loop_type_ == base::MessageLoop::TYPE_CUSTOM) | 55 if (message_loop_type_ == base::MessageLoop::TYPE_CUSTOM) |
56 loop.reset(new base::MessageLoop(common::MessagePumpMojo::Create())); | 56 loop.reset(new base::MessageLoop(common::MessagePumpMojo::Create())); |
57 else | 57 else |
58 loop.reset(new base::MessageLoop(message_loop_type_)); | 58 loop.reset(new base::MessageLoop(message_loop_type_)); |
59 | 59 |
60 ApplicationImpl impl(delegate_.get(), | 60 ApplicationImpl impl(delegate_.get(), |
61 MakeRequest<Application>(MakeScopedHandle( | 61 InterfaceRequest<Application>(MakeScopedHandle( |
62 MessagePipeHandle(application_request_handle)))); | 62 MessagePipeHandle(application_request_handle)))); |
63 loop->Run(); | 63 loop->Run(); |
64 } | 64 } |
65 delegate_.reset(); | 65 delegate_.reset(); |
66 return MOJO_RESULT_OK; | 66 return MOJO_RESULT_OK; |
67 } | 67 } |
68 | 68 |
69 } // namespace mojo | 69 } // namespace mojo |
OLD | NEW |