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

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

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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 <utility> 10 #include <utility>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
15 #include "services/shell/public/cpp/lib/callback_binder.h" 15 #include "services/shell/public/cpp/lib/callback_binder.h"
16 #include "services/shell/public/cpp/lib/interface_factory_binder.h" 16 #include "services/shell/public/cpp/lib/interface_factory_binder.h"
17 #include "services/shell/public/interfaces/interface_provider.mojom.h" 17 #include "services/shell/public/interfaces/interface_provider.mojom.h"
18 18
19 namespace shell { 19 namespace shell {
20 class Connection;
20 class InterfaceBinder; 21 class InterfaceBinder;
21 22
22 // An implementation of mojom::InterfaceProvider that allows the user to 23 // An implementation of mojom::InterfaceProvider that allows the user to
23 // register services to be exposed to another application. 24 // register services to be exposed to another application.
24 // 25 //
25 // To use, define a class that implements your specific interface. Then 26 // To use, define a class that implements your specific interface. Then
26 // implement an InterfaceFactory<Foo> that binds instances of FooImpl to 27 // implement an InterfaceFactory<Foo> that binds instances of FooImpl to
27 // InterfaceRequest<Foo>s and register that on the registry like this: 28 // InterfaceRequest<Foo>s and register that on the registry like this:
28 // 29 //
29 // registry.AddInterface(&factory); 30 // registry.AddInterface(&factory);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 pending_interface_requests_; 153 pending_interface_requests_;
153 154
154 base::WeakPtrFactory<InterfaceRegistry> weak_factory_; 155 base::WeakPtrFactory<InterfaceRegistry> weak_factory_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry); 157 DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry);
157 }; 158 };
158 159
159 } // namespace shell 160 } // namespace shell
160 161
161 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_ 162 #endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/interface_factory_impl.h ('k') | services/shell/public/cpp/lib/callback_binder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698