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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class Driver : public shell::Service, | 25 class Driver : public shell::Service, |
26 public shell::InterfaceFactory<ClientProcessTest>, | 26 public shell::InterfaceFactory<ClientProcessTest>, |
27 public ClientProcessTest { | 27 public ClientProcessTest { |
28 public: | 28 public: |
29 Driver() {} | 29 Driver() {} |
30 ~Driver() override {} | 30 ~Driver() override {} |
31 | 31 |
32 private: | 32 private: |
33 // shell::Service: | 33 // shell::Service: |
34 bool OnConnect(shell::Connection* connection) override { | 34 bool OnConnect(const shell::Identity& remote_identity, |
35 connection->AddInterface<ClientProcessTest>(this); | 35 shell::InterfaceRegistry* registry) override { |
| 36 registry->AddInterface<ClientProcessTest>(this); |
36 return true; | 37 return true; |
37 } | 38 } |
38 bool OnStop() override { | 39 bool OnStop() override { |
39 // TODO(rockot): http://crbug.com/596621. Should be able to remove this | 40 // TODO(rockot): http://crbug.com/596621. Should be able to remove this |
40 // override entirely. | 41 // override entirely. |
41 _exit(1); | 42 _exit(1); |
42 } | 43 } |
43 | 44 |
44 // shell::InterfaceFactory<ConnectTestService>: | 45 // shell::InterfaceFactory<ConnectTestService>: |
45 void Create(const shell::Identity& remote_identity, | 46 void Create(const shell::Identity& remote_identity, |
(...skipping 28 matching lines...) Expand all Loading... |
74 | 75 |
75 int main(int argc, char** argv) { | 76 int main(int argc, char** argv) { |
76 base::AtExitManager at_exit; | 77 base::AtExitManager at_exit; |
77 base::CommandLine::Init(argc, argv); | 78 base::CommandLine::Init(argc, argv); |
78 | 79 |
79 shell::InitializeLogging(); | 80 shell::InitializeLogging(); |
80 | 81 |
81 Driver driver; | 82 Driver driver; |
82 return shell::TestNativeMain(&driver); | 83 return shell::TestNativeMain(&driver); |
83 } | 84 } |
OLD | NEW |