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

Unified Diff: ios/web/public/web_state/web_state_interface_provider.h

Issue 2847743003: Eliminate InterfaceRegistry (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/public/web_state/web_state_interface_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/web_state/web_state_interface_provider.h
diff --git a/ios/web/public/web_state/web_state_interface_provider.h b/ios/web/public/web_state/web_state_interface_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ad3dfc8218dcbeda2a9f9b801a2ea7598d48336
--- /dev/null
+++ b/ios/web/public/web_state/web_state_interface_provider.h
@@ -0,0 +1,39 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_WEB_STATE_WEB_STATE_INTERFACE_PROVIDER_H_
+#define IOS_WEB_WEB_STATE_WEB_STATE_INTERFACE_PROVIDER_H_
+
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "services/service_manager/public/cpp/binder_registry.h"
+#include "services/service_manager/public/interfaces/interface_provider.mojom.h"
+
+namespace web {
+
+class WebStateInterfaceProvider
+ : public service_manager::mojom::InterfaceProvider {
+ public:
+ WebStateInterfaceProvider();
+ ~WebStateInterfaceProvider() override;
+
+ void Bind(service_manager::mojom::InterfaceProviderRequest request);
+
+ service_manager::BinderRegistry* registry() { return &registry_; }
+
+ private:
+ // service_manager::mojom::InterfaceProvider:
+ void GetInterface(const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle handle) override;
+
+ service_manager::BinderRegistry registry_;
+
+ mojo::Binding<service_manager::mojom::InterfaceProvider> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebStateInterfaceProvider);
+};
+
+} // namespace web
+
+#endif // IOS_WEB_WEB_STATE_WEB_STATE_INTERFACE_PROVIDER_H_
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/public/web_state/web_state_interface_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698