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

Unified Diff: mojo/application/public/cpp/lib/service_registry.h

Issue 1565343003: Move mojo/application/public -> mojo/shell/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fetcher
Patch Set: . Created 4 years, 11 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: mojo/application/public/cpp/lib/service_registry.h
diff --git a/mojo/application/public/cpp/lib/service_registry.h b/mojo/application/public/cpp/lib/service_registry.h
deleted file mode 100644
index b0339ddf3fb19de02c59dcf14ce5b56547d01ae1..0000000000000000000000000000000000000000
--- a/mojo/application/public/cpp/lib/service_registry.h
+++ /dev/null
@@ -1,83 +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.
-
-#ifndef MOJO_APPLICATION_PUBLIC_CPP_LIB_SERVICE_REGISTRY_H_
-#define MOJO_APPLICATION_PUBLIC_CPP_LIB_SERVICE_REGISTRY_H_
-
-#include <stdint.h>
-
-#include <set>
-#include <string>
-
-#include "mojo/application/public/cpp/application_connection.h"
-#include "mojo/application/public/cpp/lib/service_connector_registry.h"
-#include "mojo/application/public/interfaces/service_provider.mojom.h"
-#include "mojo/application/public/interfaces/shell.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
-
-namespace mojo {
-namespace internal {
-
-// A ServiceRegistry represents each half of a connection between two
-// applications, allowing customization of which services are published to the
-// other.
-class ServiceRegistry : public ServiceProvider, public ApplicationConnection {
- public:
- ServiceRegistry();
- // |allowed_interfaces| are the set of interfaces that the shell has allowed
- // an application to expose to another application. If this set contains only
- // the string value "*" all interfaces may be exposed.
- ServiceRegistry(const std::string& connection_url,
- const std::string& remote_url,
- ServiceProviderPtr remote_services,
- InterfaceRequest<ServiceProvider> local_services,
- const std::set<std::string>& allowed_interfaces);
- ~ServiceRegistry() override;
-
- Shell::ConnectToApplicationCallback GetConnectToApplicationCallback();
-
- // ApplicationConnection overrides.
- void SetServiceConnector(ServiceConnector* service_connector) override;
- bool SetServiceConnectorForName(ServiceConnector* service_connector,
- const std::string& interface_name) override;
- const std::string& GetConnectionURL() override;
- const std::string& GetRemoteApplicationURL() override;
- ServiceProvider* GetServiceProvider() override;
- ServiceProvider* GetLocalServiceProvider() override;
- void SetRemoteServiceProviderConnectionErrorHandler(
- const Closure& handler) override;
- bool GetContentHandlerID(uint32_t* target_id) override;
- void AddContentHandlerIDCallback(const Closure& callback) override;
- base::WeakPtr<ApplicationConnection> GetWeakPtr() override;
-
- void RemoveServiceConnectorForName(const std::string& interface_name);
-
- private:
- void OnGotContentHandlerID(uint32_t content_handler_id);
-
- // ServiceProvider method.
- void ConnectToService(const mojo::String& service_name,
- ScopedMessagePipeHandle client_handle) override;
-
- const std::string connection_url_;
- const std::string remote_url_;
- Binding<ServiceProvider> local_binding_;
- ServiceProviderPtr remote_service_provider_;
- ServiceConnectorRegistry service_connector_registry_;
- const std::set<std::string> allowed_interfaces_;
- const bool allow_all_interfaces_;
- // The id of the content_handler is only available once the callback from
- // establishing the connection is made.
- uint32_t content_handler_id_;
- bool is_content_handler_id_valid_;
- std::vector<Closure> content_handler_id_callbacks_;
- base::WeakPtrFactory<ServiceRegistry> weak_factory_;
-
- MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry);
-};
-
-} // namespace internal
-} // namespace mojo
-
-#endif // MOJO_APPLICATION_PUBLIC_CPP_LIB_SERVICE_REGISTRY_H_
« no previous file with comments | « mojo/application/public/cpp/lib/service_provider_impl.cc ('k') | mojo/application/public/cpp/lib/service_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698