Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: services/shell/public/cpp/lib/connector_impl.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
6 #define SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 6 #define SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
10 #include "services/shell/public/cpp/connector.h" 12 #include "services/shell/public/cpp/connector.h"
11 #include "services/shell/public/interfaces/connector.mojom.h" 13 #include "services/shell/public/interfaces/connector.mojom.h"
12 14
13 namespace mojo { 15 namespace shell {
14 16
15 class ConnectorImpl : public Connector { 17 class ConnectorImpl : public Connector {
16 public: 18 public:
17 explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state); 19 explicit ConnectorImpl(mojom::ConnectorPtrInfo unbound_state);
18 explicit ConnectorImpl(shell::mojom::ConnectorPtr connector); 20 explicit ConnectorImpl(mojom::ConnectorPtr connector);
19 ~ConnectorImpl() override; 21 ~ConnectorImpl() override;
20 22
21 private: 23 private:
22 // Connector: 24 // Connector:
23 scoped_ptr<Connection> Connect(const std::string& name) override; 25 std::unique_ptr<Connection> Connect(const std::string& name) override;
24 scoped_ptr<Connection> Connect(ConnectParams* params) override; 26 std::unique_ptr<Connection> Connect(ConnectParams* params) override;
25 scoped_ptr<Connector> Clone() override; 27 std::unique_ptr<Connector> Clone() override;
26 28
27 shell::mojom::ConnectorPtrInfo unbound_state_; 29 mojom::ConnectorPtrInfo unbound_state_;
28 shell::mojom::ConnectorPtr connector_; 30 mojom::ConnectorPtr connector_;
29 31
30 scoped_ptr<base::ThreadChecker> thread_checker_; 32 std::unique_ptr<base::ThreadChecker> thread_checker_;
31 33
32 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); 34 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl);
33 }; 35 };
34 36
35 } // namespace mojo 37 } // namespace shell
36 38
37 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 39 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/lib/connection_impl.cc ('k') | services/shell/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698