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

Side by Side Diff: services/shell/service_manager.h

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVICE_MANAGER_H_ 5 #ifndef SERVICES_SHELL_SERVICE_MANAGER_H_
6 #define SERVICES_SHELL_SERVICE_MANAGER_H_ 6 #define SERVICES_SHELL_SERVICE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Creates a new Instance identified as |name|. This is intended for use by 71 // Creates a new Instance identified as |name|. This is intended for use by
72 // the Service Manager's embedder to register itself. This must only be called 72 // the Service Manager's embedder to register itself. This must only be called
73 // once. 73 // once.
74 mojom::ServiceRequest StartEmbedderService(const std::string& name); 74 mojom::ServiceRequest StartEmbedderService(const std::string& name);
75 75
76 private: 76 private:
77 class Instance; 77 class Instance;
78 78
79 // Service: 79 // Service:
80 bool OnConnect(Connection* connection) override; 80 bool OnConnect(const Identity& remote_identity,
81 InterfaceRegistry* registry) override;
81 82
82 void InitCatalog(mojom::ServicePtr catalog); 83 void InitCatalog(mojom::ServicePtr catalog);
83 84
84 // Returns the resolver to use for the specified identity. 85 // Returns the resolver to use for the specified identity.
85 // NOTE: Resolvers are cached to ensure we service requests in order. If 86 // NOTE: Resolvers are cached to ensure we service requests in order. If
86 // we use a separate Resolver for each request ordering is not 87 // we use a separate Resolver for each request ordering is not
87 // guaranteed and can lead to random flake. 88 // guaranteed and can lead to random flake.
88 mojom::Resolver* GetResolver(const Identity& identity); 89 mojom::Resolver* GetResolver(const Identity& identity);
89 90
90 // Destroys all Service Manager-ends of connections established with Services. 91 // Destroys all Service Manager-ends of connections established with Services.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; 166 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_;
166 167
167 DISALLOW_COPY_AND_ASSIGN(ServiceManager); 168 DISALLOW_COPY_AND_ASSIGN(ServiceManager);
168 }; 169 };
169 170
170 mojom::Connector::ConnectCallback EmptyConnectCallback(); 171 mojom::Connector::ConnectCallback EmptyConnectCallback();
171 172
172 } // namespace shell 173 } // namespace shell
173 174
174 #endif // SERVICES_SHELL_SERVICE_MANAGER_H_ 175 #endif // SERVICES_SHELL_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/tests/interface_registry_unittest.cc ('k') | services/shell/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698