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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/base_paths.h" | 6 #include "base/base_paths.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "mojo/application/application_runner_chromium.h" |
11 #include "mojo/public/c/system/main.h" | 12 #include "mojo/public/c/system/main.h" |
12 #include "mojo/public/cpp/application/application_connection.h" | 13 #include "mojo/public/cpp/application/application_connection.h" |
13 #include "mojo/public/cpp/application/application_delegate.h" | 14 #include "mojo/public/cpp/application/application_delegate.h" |
14 #include "mojo/public/cpp/application/application_runner_chromium.h" | |
15 #include "mojo/public/cpp/application/interface_factory.h" | 15 #include "mojo/public/cpp/application/interface_factory.h" |
16 #include "mojo/public/cpp/bindings/interface_ptr.h" | 16 #include "mojo/public/cpp/bindings/interface_ptr.h" |
17 #include "mojo/services/network/network_context.h" | 17 #include "mojo/services/network/network_context.h" |
18 #include "mojo/services/network/network_service_impl.h" | 18 #include "mojo/services/network/network_service_impl.h" |
19 | 19 |
20 class Delegate : public mojo::ApplicationDelegate, | 20 class Delegate : public mojo::ApplicationDelegate, |
21 public mojo::InterfaceFactory<mojo::NetworkService> { | 21 public mojo::InterfaceFactory<mojo::NetworkService> { |
22 public: | 22 public: |
23 Delegate() {} | 23 Delegate() {} |
24 | 24 |
(...skipping 22 matching lines...) Expand all Loading... |
47 | 47 |
48 private: | 48 private: |
49 scoped_ptr<mojo::NetworkContext> context_; | 49 scoped_ptr<mojo::NetworkContext> context_; |
50 }; | 50 }; |
51 | 51 |
52 MojoResult MojoMain(MojoHandle shell_handle) { | 52 MojoResult MojoMain(MojoHandle shell_handle) { |
53 mojo::ApplicationRunnerChromium runner(new Delegate); | 53 mojo::ApplicationRunnerChromium runner(new Delegate); |
54 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); | 54 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); |
55 return runner.Run(shell_handle); | 55 return runner.Run(shell_handle); |
56 } | 56 } |
OLD | NEW |