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

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

Issue 2775483003: Use public Service Manager Connector API in Blink (Closed)
Patch Set: . Created 3 years, 9 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_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 18 matching lines...) Expand all
29 mojom::ServicePtr service, 29 mojom::ServicePtr service,
30 mojom::PIDReceiverRequest pid_receiver_request) override; 30 mojom::PIDReceiverRequest pid_receiver_request) override;
31 std::unique_ptr<Connection> Connect(const std::string& name) override; 31 std::unique_ptr<Connection> Connect(const std::string& name) override;
32 std::unique_ptr<Connection> Connect(const Identity& target) override; 32 std::unique_ptr<Connection> Connect(const Identity& target) override;
33 void BindInterface(const Identity& target, 33 void BindInterface(const Identity& target,
34 const std::string& interface_name, 34 const std::string& interface_name,
35 mojo::ScopedMessagePipeHandle interface_pipe) override; 35 mojo::ScopedMessagePipeHandle interface_pipe) override;
36 std::unique_ptr<Connector> Clone() override; 36 std::unique_ptr<Connector> Clone() override;
37 void BindConnectorRequest(mojom::ConnectorRequest request) override; 37 void BindConnectorRequest(mojom::ConnectorRequest request) override;
38 base::WeakPtr<Connector> GetWeakPtr() override; 38 base::WeakPtr<Connector> GetWeakPtr() override;
39 void OverrideBinderForTesting(const std::string& interface_name, 39 void OverrideBinderForTesting(const std::string& service_name,
40 const std::string& interface_name,
40 const TestApi::Binder& binder) override; 41 const TestApi::Binder& binder) override;
41 void ClearBinderOverrides() override; 42 void ClearBinderOverrides() override;
42 43
43 bool BindConnectorIfNecessary(); 44 bool BindConnectorIfNecessary();
44 45
46 using BinderOverrideMap = std::map<std::string, TestApi::Binder>;
47
45 mojom::ConnectorPtrInfo unbound_state_; 48 mojom::ConnectorPtrInfo unbound_state_;
46 mojom::ConnectorPtr connector_; 49 mojom::ConnectorPtr connector_;
47 50
48 base::ThreadChecker thread_checker_; 51 base::ThreadChecker thread_checker_;
49 52
50 std::map<std::string, TestApi::Binder> local_binder_overrides_; 53 std::map<std::string, BinderOverrideMap> local_binder_overrides_;
51 54
52 base::WeakPtrFactory<Connector> weak_factory_; 55 base::WeakPtrFactory<Connector> weak_factory_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); 57 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl);
55 }; 58 };
56 59
57 } // namespace service_manager 60 } // namespace service_manager
58 61
59 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 62 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/connector.h ('k') | services/service_manager/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698