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 #ifndef MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ |
6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
10 #include "mojo/shell/public/cpp/connector.h" | 10 #include "services/shell/public/cpp/connector.h" |
11 #include "mojo/shell/public/interfaces/connector.mojom.h" | 11 #include "services/shell/public/interfaces/connector.mojom.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 | 14 |
15 class ConnectorImpl : public Connector { | 15 class ConnectorImpl : public Connector { |
16 public: | 16 public: |
17 explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state); | 17 explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state); |
18 explicit ConnectorImpl(shell::mojom::ConnectorPtr connector); | 18 explicit ConnectorImpl(shell::mojom::ConnectorPtr connector); |
19 ~ConnectorImpl() override; | 19 ~ConnectorImpl() override; |
20 | 20 |
21 private: | 21 private: |
22 // Connector: | 22 // Connector: |
23 scoped_ptr<Connection> Connect(const std::string& name) override; | 23 scoped_ptr<Connection> Connect(const std::string& name) override; |
24 scoped_ptr<Connection> Connect(ConnectParams* params) override; | 24 scoped_ptr<Connection> Connect(ConnectParams* params) override; |
25 scoped_ptr<Connector> Clone() override; | 25 scoped_ptr<Connector> Clone() override; |
26 | 26 |
27 shell::mojom::ConnectorPtrInfo unbound_state_; | 27 shell::mojom::ConnectorPtrInfo unbound_state_; |
28 shell::mojom::ConnectorPtr connector_; | 28 shell::mojom::ConnectorPtr connector_; |
29 | 29 |
30 scoped_ptr<base::ThreadChecker> thread_checker_; | 30 scoped_ptr<base::ThreadChecker> thread_checker_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); | 32 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace mojo | 35 } // namespace mojo |
36 | 36 |
37 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ | 37 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ |
OLD | NEW |