summaryrefslogtreecommitdiff
path: root/chromium/content/child/mojo
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/child/mojo')
-rw-r--r--chromium/content/child/mojo/mojo_application.cc38
-rw-r--r--chromium/content/child/mojo/mojo_application.h38
2 files changed, 0 insertions, 76 deletions
diff --git a/chromium/content/child/mojo/mojo_application.cc b/chromium/content/child/mojo/mojo_application.cc
deleted file mode 100644
index 7aa45979ac8..00000000000
--- a/chromium/content/child/mojo/mojo_application.cc
+++ /dev/null
@@ -1,38 +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 "content/child/mojo/mojo_application.h"
-
-#include <utility>
-
-#include "base/logging.h"
-#include "content/common/application_setup.mojom.h"
-#include "mojo/edk/embedder/embedder.h"
-
-namespace content {
-
-MojoApplication::MojoApplication() {
-}
-
-MojoApplication::~MojoApplication() {
-}
-
-void MojoApplication::InitWithToken(const std::string& token) {
- mojo::ScopedMessagePipeHandle handle =
- mojo::edk::CreateChildMessagePipe(token);
- DCHECK(handle.is_valid());
-
- mojom::ApplicationSetupPtr application_setup;
- application_setup.Bind(
- mojo::InterfacePtrInfo<mojom::ApplicationSetup>(std::move(handle), 0u));
-
- shell::mojom::InterfaceProviderPtr services;
- shell::mojom::InterfaceProviderPtr exposed_services;
- service_registry_.Bind(GetProxy(&exposed_services));
- application_setup->ExchangeInterfaceProviders(GetProxy(&services),
- std::move(exposed_services));
- service_registry_.BindRemoteServiceProvider(std::move(services));
-}
-
-} // namespace content
diff --git a/chromium/content/child/mojo/mojo_application.h b/chromium/content/child/mojo/mojo_application.h
deleted file mode 100644
index 68602c4fd36..00000000000
--- a/chromium/content/child/mojo/mojo_application.h
+++ /dev/null
@@ -1,38 +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_CHILD_MOJO_MOJO_APPLICATION_H_
-#define CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "content/common/mojo/service_registry_impl.h"
-
-namespace content {
-
-// MojoApplication represents the code needed to setup a child process as a
-// Mojo application. Instantiate MojoApplication and call InitWithToken() with
-// a token passed from the process host. It makes the ServiceRegistry interface
-// available.
-class MojoApplication {
- public:
- MojoApplication();
- virtual ~MojoApplication();
-
- // Initializes this MojoApplicaiton with a message pipe obtained using
- // |token|.
- void InitWithToken(const std::string& token);
-
- ServiceRegistry* service_registry() { return &service_registry_; }
-
- private:
- ServiceRegistryImpl service_registry_;
-
- DISALLOW_COPY_AND_ASSIGN(MojoApplication);
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_