Index: mojo/public/cpp/application/lib/remote_service_provider.cc |
diff --git a/mojo/public/cpp/application/lib/remote_service_provider.cc b/mojo/public/cpp/application/lib/remote_service_provider.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6bfac396dd499f8c822cc9b43cf1f58cc8790c7e |
--- /dev/null |
+++ b/mojo/public/cpp/application/lib/remote_service_provider.cc |
@@ -0,0 +1,28 @@ |
+// Copyright 2014 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 "mojo/public/cpp/application/lib/remote_service_provider.h" |
+#include "mojo/public/interfaces/application/service_provider.mojom.h" |
+ |
+namespace mojo { |
+namespace internal { |
+ |
+RemoteServiceProvider::RemoteServiceProvider(ServiceProvider* service_provider) |
+ : service_provider_(service_provider) {} |
+ |
+RemoteServiceProvider::~RemoteServiceProvider() {} |
+ |
+void RemoteServiceProvider::Clear() { |
+ service_provider_ = NULL; |
+} |
+ |
+void RemoteServiceProvider::ConnectToService( |
+ const String& service_name, |
+ ScopedMessagePipeHandle client_handle) { |
+ if (service_provider_) |
+ service_provider_->ConnectToService(service_name, client_handle.Pass()); |
+} |
+ |
+} // namespace internal |
+} // namespace mojo |