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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "mojo/application/public/cpp/application_delegate.h" |
| 13 #include "mojo/application/public/cpp/application_impl.h" |
12 #include "mojo/common/message_pump_mojo.h" | 14 #include "mojo/common/message_pump_mojo.h" |
13 #include "mojo/public/cpp/application/application_delegate.h" | |
14 #include "mojo/public/cpp/application/application_impl.h" | |
15 | 15 |
16 int g_argc; | 16 int g_argc; |
17 const char* const* g_argv; | 17 const char* const* g_argv; |
18 #if !defined(OS_WIN) | 18 #if !defined(OS_WIN) |
19 extern "C" { | 19 extern "C" { |
20 __attribute__((visibility("default"))) void InitCommandLineArgs( | 20 __attribute__((visibility("default"))) void InitCommandLineArgs( |
21 int argc, const char* const* argv) { | 21 int argc, const char* const* argv) { |
22 g_argc = argc; | 22 g_argc = argc; |
23 g_argv = argv; | 23 g_argv = argv; |
24 } | 24 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ApplicationImpl impl(delegate_.get(), | 75 ApplicationImpl impl(delegate_.get(), |
76 MakeRequest<Application>(MakeScopedHandle( | 76 MakeRequest<Application>(MakeScopedHandle( |
77 MessagePipeHandle(application_request_handle)))); | 77 MessagePipeHandle(application_request_handle)))); |
78 loop->Run(); | 78 loop->Run(); |
79 } | 79 } |
80 delegate_.reset(); | 80 delegate_.reset(); |
81 return MOJO_RESULT_OK; | 81 return MOJO_RESULT_OK; |
82 } | 82 } |
83 | 83 |
84 } // namespace mojo | 84 } // namespace mojo |
OLD | NEW |