OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <utility> | 5 #include <utility> |
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/macros.h" | 9 #include "base/macros.h" |
10 #include "mojo/public/cpp/bindings/weak_binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding_set.h" |
11 #include "mojo/shell/public/cpp/connection.h" | 11 #include "mojo/shell/public/cpp/connection.h" |
12 #include "mojo/shell/public/cpp/interface_factory.h" | 12 #include "mojo/shell/public/cpp/interface_factory.h" |
13 #include "mojo/shell/public/cpp/shell.h" | 13 #include "mojo/shell/public/cpp/shell.h" |
14 #include "mojo/shell/public/cpp/shell_client.h" | 14 #include "mojo/shell/public/cpp/shell_client.h" |
15 #include "mojo/shell/runner/child/test_native_main.h" | 15 #include "mojo/shell/runner/child/test_native_main.h" |
16 #include "mojo/shell/runner/child/test_native_service.mojom.h" | 16 #include "mojo/shell/runner/child/test_native_service.mojom.h" |
17 #include "mojo/shell/runner/init.h" | 17 #include "mojo/shell/runner/init.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
(...skipping 19 matching lines...) Expand all Loading... |
40 callback.Run(!from_driver); | 40 callback.Run(!from_driver); |
41 } | 41 } |
42 | 42 |
43 // mojo::InterfaceFactory<mojo::shell::test::TestNativeService>: | 43 // mojo::InterfaceFactory<mojo::shell::test::TestNativeService>: |
44 void Create(mojo::Connection* connection, | 44 void Create(mojo::Connection* connection, |
45 mojo::InterfaceRequest<mojo::shell::test::TestNativeService> | 45 mojo::InterfaceRequest<mojo::shell::test::TestNativeService> |
46 request) override { | 46 request) override { |
47 bindings_.AddBinding(this, std::move(request)); | 47 bindings_.AddBinding(this, std::move(request)); |
48 } | 48 } |
49 | 49 |
50 mojo::WeakBindingSet<mojo::shell::test::TestNativeService> bindings_; | 50 mojo::BindingSet<mojo::shell::test::TestNativeService> bindings_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace | 55 } // namespace |
56 | 56 |
57 int main(int argc, char** argv) { | 57 int main(int argc, char** argv) { |
58 base::AtExitManager at_exit; | 58 base::AtExitManager at_exit; |
59 base::CommandLine::Init(argc, argv); | 59 base::CommandLine::Init(argc, argv); |
60 | 60 |
61 mojo::shell::InitializeLogging(); | 61 mojo::shell::InitializeLogging(); |
62 | 62 |
63 TargetApplicationDelegate delegate; | 63 TargetApplicationDelegate delegate; |
64 return mojo::shell::TestNativeMain(&delegate); | 64 return mojo::shell::TestNativeMain(&delegate); |
65 } | 65 } |
OLD | NEW |