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

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

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_interface_provider.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('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.cc
diff --git a/ios/web/public/web_state/web_state_interface_provider.cc b/ios/web/public/web_state/web_state_interface_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..47542d8cc20cb71c5392346be26a2e86d6f63d71
--- /dev/null
+++ b/ios/web/public/web_state/web_state_interface_provider.cc
@@ -0,0 +1,26 @@
+// Copyright 2013 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.
+
+#include "ios/web/public/web_state/web_state_interface_provider.h"
+
+#include "services/service_manager/public/cpp/identity.h"
+
+namespace web {
+
+WebStateInterfaceProvider::WebStateInterfaceProvider() : binding_(this) {}
+WebStateInterfaceProvider::~WebStateInterfaceProvider() = default;
+
+void WebStateInterfaceProvider::Bind(
+ service_manager::mojom::InterfaceProviderRequest request) {
+ binding_.Bind(std::move(request));
+}
+
+void WebStateInterfaceProvider::GetInterface(
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle handle) {
+ registry_.BindInterface(service_manager::Identity(), interface_name,
+ std::move(handle));
+}
+
+} // namespace web
« no previous file with comments | « ios/web/public/web_state/web_state_interface_provider.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698