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

Side by Side Diff: services/shell/public/cpp/interface_registry.h

Issue 2209943002: Eliminate outgoing InterfaceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tracing
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
« no previous file with comments | « services/shell/public/cpp/connector.h ('k') | services/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_INTERFACE_REGISTRY_H_ 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_
6 #define SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_ 6 #define SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // requests will be queued internally and dispatched once ResumeBinding() is 120 // requests will be queued internally and dispatched once ResumeBinding() is
121 // called. 121 // called.
122 void PauseBinding(); 122 void PauseBinding();
123 123
124 // Resumes incoming interface request binding. 124 // Resumes incoming interface request binding.
125 void ResumeBinding(); 125 void ResumeBinding();
126 126
127 // Populates a set with the interface names this registry can bind. 127 // Populates a set with the interface names this registry can bind.
128 void GetInterfaceNames(std::set<std::string>* interface_names); 128 void GetInterfaceNames(std::set<std::string>* interface_names);
129 129
130 // Sets a closure to be run when the InterfaceProvider pipe is closed.
131 void SetConnectionLostClosure(const base::Closure& connection_lost_closure);
132
130 private: 133 private:
131 using NameToInterfaceBinderMap = 134 using NameToInterfaceBinderMap =
132 std::map<std::string, std::unique_ptr<InterfaceBinder>>; 135 std::map<std::string, std::unique_ptr<InterfaceBinder>>;
133 136
134 // mojom::InterfaceProvider: 137 // mojom::InterfaceProvider:
135 void GetInterface(const mojo::String& interface_name, 138 void GetInterface(const mojo::String& interface_name,
136 mojo::ScopedMessagePipeHandle handle) override; 139 mojo::ScopedMessagePipeHandle handle) override;
137 140
138 // Returns true if the binder was set, false if it was not set (e.g. by 141 // Returns true if the binder was set, false if it was not set (e.g. by
139 // some filtering policy preventing this interface from being exposed). 142 // some filtering policy preventing this interface from being exposed).
(...skipping 17 matching lines...) Expand all
157 pending_interface_requests_; 160 pending_interface_requests_;
158 161
159 base::WeakPtrFactory<InterfaceRegistry> weak_factory_; 162 base::WeakPtrFactory<InterfaceRegistry> weak_factory_;
160 163
161 DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry); 164 DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry);
162 }; 165 };
163 166
164 } // namespace shell 167 } // namespace shell
165 168
166 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_ 169 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/connector.h ('k') | services/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698