| Index: content/renderer/presentation/renderer_presentation_connection.h
|
| diff --git a/content/renderer/presentation/renderer_presentation_connection.h b/content/renderer/presentation/renderer_presentation_connection.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aafeb73415eb7fdf419246e72db2402e9eb77fb2
|
| --- /dev/null
|
| +++ b/content/renderer/presentation/renderer_presentation_connection.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2016 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_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
|
| +#define CONTENT_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h"
|
| +#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionProxy.h"
|
| +#include "third_party/WebKit/public/platform/modules/presentation/presentation.mojom.h"
|
| +
|
| +namespace content {
|
| +
|
| +class RendererPresentationConnection
|
| + : public blink::WebPresentationConnectionProxy,
|
| + public NON_EXPORTED_BASE(blink::mojom::PresentationConnection) {
|
| + public:
|
| + RendererPresentationConnection();
|
| + ~RendererPresentationConnection() override;
|
| +
|
| + blink::mojom::PresentationConnectionPtr Bind();
|
| +
|
| + // WebPresentationConnectionProxy Implementation
|
| + void SetConnection(blink::WebPresentationConnection* connection) override;
|
| + void SendString(const blink::WebString& message) override;
|
| + void SendArrayBuffer(const uint8_t* data, size_t length) override;
|
| +
|
| + // blink::mojom::PresentationConnection implementation
|
| + void SetTargetConnection(
|
| + blink::mojom::PresentationConnectionPtr connection) override;
|
| + void OnSessionMessageReceived(
|
| + blink::mojom::SessionMessagePtr message) override;
|
| +
|
| + private:
|
| + mojo::Binding<blink::mojom::PresentationConnection> binding_;
|
| + blink::mojom::PresentationConnectionPtr target_connection_;
|
| + blink::WebPresentationConnection* connection_;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
|
|
|