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

Unified Diff: third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.cc

Issue 1139123006: Fork the mojo shell interfaces used by Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 7 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: third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.cc
diff --git a/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.cc b/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.cc
deleted file mode 100644
index 17238bb1382030c458b99c990c2db0232af37047..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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/service_registry.h"
-
-#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/public/cpp/application/service_connector.h"
-
-namespace mojo {
-namespace internal {
-
-ServiceRegistry::ServiceRegistry(
- ApplicationImpl* application_impl,
- const std::string& connection_url,
- const std::string& remote_url,
- ServiceProviderPtr remote_services,
- InterfaceRequest<ServiceProvider> local_services)
- : application_impl_(application_impl),
- connection_url_(connection_url),
- remote_url_(remote_url),
- local_binding_(this),
- remote_service_provider_(remote_services.Pass()) {
- if (local_services.is_pending())
- local_binding_.Bind(local_services.Pass());
-}
-
-ServiceRegistry::ServiceRegistry()
- : application_impl_(nullptr), local_binding_(this) {
-}
-
-ServiceRegistry::~ServiceRegistry() {
-}
-
-void ServiceRegistry::SetServiceConnector(ServiceConnector* connector) {
- service_connector_registry_.set_service_connector(connector);
-}
-
-void ServiceRegistry::SetServiceConnectorForName(
- ServiceConnector* service_connector,
- const std::string& interface_name) {
- service_connector_registry_.SetServiceConnectorForName(service_connector,
- interface_name);
-}
-
-void ServiceRegistry::RemoveServiceConnectorForName(
- const std::string& interface_name) {
- service_connector_registry_.RemoveServiceConnectorForName(interface_name);
- if (service_connector_registry_.empty())
- remote_service_provider_.reset();
-}
-
-const std::string& ServiceRegistry::GetConnectionURL() {
- return connection_url_;
-}
-
-const std::string& ServiceRegistry::GetRemoteApplicationURL() {
- return remote_url_;
-}
-
-ServiceProvider* ServiceRegistry::GetServiceProvider() {
- return remote_service_provider_.get();
-}
-
-void ServiceRegistry::ConnectToService(const mojo::String& service_name,
- ScopedMessagePipeHandle client_handle) {
- service_connector_registry_.ConnectToService(this, service_name,
- client_handle.Pass());
-}
-
-} // namespace internal
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698