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

Unified Diff: services/shell/public/cpp/interface_registry.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 side-by-side diff with in-line comments
Download patch
Index: services/shell/public/cpp/interface_registry.h
diff --git a/services/shell/public/cpp/interface_registry.h b/services/shell/public/cpp/interface_registry.h
index c2e9a65f017b2c08bbc3b4c8a0e5b8084b109864..d869310b04a38ce87a2cab917a044756fa4f4e9b 100644
--- a/services/shell/public/cpp/interface_registry.h
+++ b/services/shell/public/cpp/interface_registry.h
@@ -9,11 +9,10 @@
#include "services/shell/public/cpp/lib/interface_factory_binder.h"
#include "services/shell/public/interfaces/interface_provider.mojom.h"
-namespace mojo {
-
+namespace shell {
class InterfaceBinder;
-// An implementation of shell::mojom::InterfaceProvider that allows the user to
+// An implementation of mojom::InterfaceProvider that allows the user to
// register services to be exposed to another application.
//
// To use, define a class that implements your specific interface. Then
@@ -35,7 +34,7 @@ class InterfaceBinder;
// InterfaceFactory, the default InterfaceBinder supplied must outlive
// InterfaceRegistry.
//
-class InterfaceRegistry : public shell::mojom::InterfaceProvider {
+class InterfaceRegistry : public mojom::InterfaceProvider {
public:
class TestApi {
public:
@@ -46,6 +45,7 @@ class InterfaceRegistry : public shell::mojom::InterfaceProvider {
const std::string& interface_name) {
registry_->SetInterfaceBinderForName(binder, interface_name);
}
+
void RemoveInterfaceBinderForName(const std::string& interface_name) {
registry_->RemoveInterfaceBinderForName(interface_name);
}
@@ -63,13 +63,13 @@ class InterfaceRegistry : public shell::mojom::InterfaceProvider {
explicit InterfaceRegistry(Connection* connection);
// Construct with an InterfaceProviderRequest and a Connection (which may be
// null, see note above about filtering).
- InterfaceRegistry(shell::mojom::InterfaceProviderRequest request,
+ InterfaceRegistry(mojom::InterfaceProviderRequest request,
Connection* connection);
~InterfaceRegistry() override;
// Takes the client end of the InterfaceProvider pipe created in the
// constructor.
- shell::mojom::InterfaceProviderPtr TakeClientHandle();
+ mojom::InterfaceProviderPtr TakeClientHandle();
template <typename Interface>
bool AddInterface(InterfaceFactory<Interface>* factory) {
@@ -83,9 +83,9 @@ class InterfaceRegistry : public shell::mojom::InterfaceProvider {
private:
using NameToInterfaceBinderMap = std::map<std::string, InterfaceBinder*>;
- // shell::mojom::InterfaceProvider:
- void GetInterface(const String& interface_name,
- ScopedMessagePipeHandle handle) override;
+ // mojom::InterfaceProvider:
+ void GetInterface(const mojo::String& interface_name,
+ mojo::ScopedMessagePipeHandle handle) override;
// Returns true if the binder was set, false if it was not set (e.g. by
// some filtering policy preventing this interface from being exposed).
@@ -94,8 +94,8 @@ class InterfaceRegistry : public shell::mojom::InterfaceProvider {
void RemoveInterfaceBinderForName(const std::string& interface_name);
- shell::mojom::InterfaceProviderPtr client_handle_;
- Binding<shell::mojom::InterfaceProvider> binding_;
+ mojom::InterfaceProviderPtr client_handle_;
+ mojo::Binding<mojom::InterfaceProvider> binding_;
Connection* connection_;
InterfaceBinder* default_binder_;
@@ -104,6 +104,6 @@ class InterfaceRegistry : public shell::mojom::InterfaceProvider {
DISALLOW_COPY_AND_ASSIGN(InterfaceRegistry);
};
-} // namespace mojo
+} // namespace shell
#endif // SERVICES_SHELL_PUBLIC_CPP_INTERFACE_REGISTRY_H_
« no previous file with comments | « services/shell/public/cpp/interface_factory_impl.h ('k') | services/shell/public/cpp/lib/application_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698