| Index: content/browser/render_widget_view_service_listener.h
|
| diff --git a/content/browser/render_widget_view_service_listener.h b/content/browser/render_widget_view_service_listener.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4aefaeadbf5bd3a04b0baf5f5b20aa8ac6f05cef
|
| --- /dev/null
|
| +++ b/content/browser/render_widget_view_service_listener.h
|
| @@ -0,0 +1,61 @@
|
| +// Copyright 2015 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_BROWSER_MOJO_CONNECTION_LISTENER_H_
|
| +#define CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_
|
| +
|
| +#include "content/public/common/mojo_shell_connection.h"
|
| +
|
| +#include "base/macros.h"
|
| +#include "content/browser/render_widget_view.mojom.h"
|
| +#include "mojo/application/public/cpp/interface_factory.h"
|
| +#include "mojo/common/weak_binding_set.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +
|
| +namespace content {
|
| +
|
| +class RenderWidgetViewFactoryImpl : public mojom::RenderWidgetViewFactory {
|
| + public:
|
| + RenderWidgetViewFactoryImpl(
|
| + int render_process_id,
|
| + mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request);
|
| + ~RenderWidgetViewFactoryImpl() override;
|
| +
|
| + private:
|
| + // mojom::RenderWidgetViewFactory implementation.
|
| + void CreateRenderWidgetView(
|
| + uint32_t routing_id,
|
| + mus::mojom::WindowTreeClientPtr tree_client) override;
|
| +
|
| + const int render_process_id_;
|
| + mojo::StrongBinding<RenderWidgetViewFactory> binding_;
|
| + DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewFactoryImpl);
|
| +};
|
| +
|
| +class RenderWidgetViewServiceListener :
|
| + public MojoShellConnection::Listener,
|
| + public mojo::InterfaceFactory<mojom::RenderWidgetViewFactory> {
|
| + public:
|
| + static void Create();
|
| +
|
| + private:
|
| + RenderWidgetViewServiceListener();
|
| + ~RenderWidgetViewServiceListener() override;
|
| +
|
| + // MojoShellConnection::Listener implementation:
|
| + bool ConfigureIncomingConnection(
|
| + mojo::ApplicationConnection* connection) override;
|
| + void OnDestroy() override;
|
| +
|
| + // mojo::InterfaceFactory<mojom::RenderWidgetViewFactory>:
|
| + void Create(
|
| + mojo::ApplicationConnection* connection,
|
| + mojo::InterfaceRequest<mojom::RenderWidgetViewFactory> request) override;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RenderWidgetViewServiceListener);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_MOJO_CONNECTION_LISTENER_H_
|
|
|