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

Unified Diff: services/shell/public/cpp/lib/interface_provider.cc

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 years, 6 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/lib/interface_provider.cc
diff --git a/services/shell/public/cpp/lib/interface_provider.cc b/services/shell/public/cpp/lib/interface_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f28f1ea8b396547636d426d7a97af16b33bfa6b6
--- /dev/null
+++ b/services/shell/public/cpp/lib/interface_provider.cc
@@ -0,0 +1,34 @@
+// Copyright 2016 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 "services/shell/public/cpp/interface_provider.h"
+
+namespace shell {
+
+ InterfaceProvider::InterfaceProvider(
Ken Rockot(use gerrit already) 2016/06/21 16:16:23 nit: bad indentation
+ mojom::InterfaceProviderPtr interface_provider)
+ : interface_provider_(std::move(interface_provider)),
+ weak_factory_(this) {}
+ InterfaceProvider::~InterfaceProvider() {}
Ken Rockot(use gerrit already) 2016/06/21 16:16:23 nit: bad indentation
+
+void InterfaceProvider::SetConnectionLostClosure(
+ const base::Closure& connection_lost_closure) {
+ interface_provider_.set_connection_error_handler(connection_lost_closure);
+}
+
+base::WeakPtr<InterfaceProvider> InterfaceProvider::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
+void InterfaceProvider::GetInterface(
+ const std::string& name,
+ mojo::ScopedMessagePipeHandle request_handle) {
+ interface_provider_->GetInterface(name, std::move(request_handle));
+}
+
+void InterfaceProvider::ClearBinders() {
+ binders_.clear();
+}
+
+} // namespace shell

Powered by Google App Engine
This is Rietveld 408576698