OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
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 "base/process/process.h" | 10 #include "base/process/process.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 connection->AddInterface<ClientProcessTest>(this); | 40 connection->AddInterface<ClientProcessTest>(this); |
41 return true; | 41 return true; |
42 } | 42 } |
43 bool OnStop() override { | 43 bool OnStop() override { |
44 // TODO(rockot): http://crbug.com/596621. Should be able to remove this | 44 // TODO(rockot): http://crbug.com/596621. Should be able to remove this |
45 // override entirely. | 45 // override entirely. |
46 _exit(1); | 46 _exit(1); |
47 } | 47 } |
48 | 48 |
49 // shell::InterfaceFactory<ConnectTestService>: | 49 // shell::InterfaceFactory<ConnectTestService>: |
50 void Create(shell::Connection* connection, | 50 void Create(const shell::Identity& remote_identity, |
51 ClientProcessTestRequest request) override { | 51 ClientProcessTestRequest request) override { |
52 bindings_.AddBinding(this, std::move(request)); | 52 bindings_.AddBinding(this, std::move(request)); |
53 } | 53 } |
54 | 54 |
55 // test::mojom::ClientProcessTest: | 55 // test::mojom::ClientProcessTest: |
56 void LaunchAndConnectToProcess( | 56 void LaunchAndConnectToProcess( |
57 const LaunchAndConnectToProcessCallback& callback) override { | 57 const LaunchAndConnectToProcessCallback& callback) override { |
58 base::Process process; | 58 base::Process process; |
59 std::unique_ptr<shell::Connection> connection = | 59 std::unique_ptr<shell::Connection> connection = |
60 shell::test::LaunchAndConnectToProcess( | 60 shell::test::LaunchAndConnectToProcess( |
(...skipping 19 matching lines...) Expand all Loading... |
80 | 80 |
81 int main(int argc, char** argv) { | 81 int main(int argc, char** argv) { |
82 base::AtExitManager at_exit; | 82 base::AtExitManager at_exit; |
83 base::CommandLine::Init(argc, argv); | 83 base::CommandLine::Init(argc, argv); |
84 | 84 |
85 shell::InitializeLogging(); | 85 shell::InitializeLogging(); |
86 | 86 |
87 Driver driver; | 87 Driver driver; |
88 return shell::TestNativeMain(&driver); | 88 return shell::TestNativeMain(&driver); |
89 } | 89 } |
OLD | NEW |