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

Unified Diff: trunk/src/content/common/mojo/service_registry_impl.h

Issue 352013002: Revert 279557 "Support exposing Mojo services between render fra..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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: trunk/src/content/common/mojo/service_registry_impl.h
===================================================================
--- trunk/src/content/common/mojo/service_registry_impl.h (revision 279559)
+++ trunk/src/content/common/mojo/service_registry_impl.h (working copy)
@@ -1,61 +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 CONTENT_COMMON_MOJO_SERVICE_REGISTRY_IMPL_H_
-#define CONTENT_COMMON_MOJO_SERVICE_REGISTRY_IMPL_H_
-
-#include <map>
-#include <queue>
-#include <string>
-#include <utility>
-
-#include "base/callback.h"
-#include "content/public/common/service_registry.h"
-#include "mojo/public/cpp/bindings/interface_impl.h"
-#include "mojo/public/cpp/system/core.h"
-#include "mojo/public/interfaces/interface_provider/interface_provider.mojom.h"
-
-namespace content {
-
-class ServiceRegistryImpl
- : public ServiceRegistry,
- public mojo::InterfaceImpl<mojo::IInterfaceProvider> {
- public:
- ServiceRegistryImpl();
- explicit ServiceRegistryImpl(mojo::ScopedMessagePipeHandle handle);
- virtual ~ServiceRegistryImpl();
-
- // Binds to a remote ServiceProvider. This will expose added services to the
- // remote ServiceProvider with the corresponding handle and enable
- // GetInterface to provide access to services exposed by the remote
- // ServiceProvider.
- void BindRemoteServiceProvider(mojo::ScopedMessagePipeHandle handle);
-
- // ServiceRegistry overrides.
- virtual void AddService(
- const std::string& service_name,
- const base::Callback<void(mojo::ScopedMessagePipeHandle)> service_factory)
- OVERRIDE;
- virtual void RemoveService(const std::string& service_name) OVERRIDE;
- virtual void GetRemoteInterface(
- const base::StringPiece& service_name,
- mojo::ScopedMessagePipeHandle handle) OVERRIDE;
-
- private:
- // mojo::InterfaceImpl<mojo::IInterfaceProvider> overrides.
- virtual void GetInterface(
- const mojo::String& name,
- mojo::ScopedMessagePipeHandle client_handle) OVERRIDE;
- virtual void OnConnectionError() OVERRIDE;
-
- std::map<std::string, base::Callback<void(mojo::ScopedMessagePipeHandle)> >
- service_factories_;
- std::queue<std::pair<std::string, mojo::MessagePipeHandle> >
- pending_connects_;
- bool bound_;
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_MOJO_SERVICE_REGISTRY_IMPL_H_
« no previous file with comments | « trunk/src/content/common/mojo/mojo_service_names.cc ('k') | trunk/src/content/common/mojo/service_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698