Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h |
| diff --git a/third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h b/third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..72c9196c14b618a9e7d7f5c494ffb4741e2841df |
| --- /dev/null |
| +++ b/third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2017 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 WebPresentationConnection_h |
| +#define WebPresentationConnection_h |
| + |
| +#include "public/platform/WebCommon.h" |
| + |
| +#include <memory> |
| + |
| +namespace blink { |
| + |
| +enum class WebPresentationConnectionState; |
| +class WebPresentationConnectionProxy; |
| +class WebString; |
| + |
| +// Implemented by the embedder for a PresentationConnection. |
| +class WebPresentationConnection { |
| + public: |
| + virtual ~WebPresentationConnection() = default; |
| + |
| + // Takes ownership of |proxy| and stores it in connection object. Should be |
| + // called only once. |
| + virtual void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) = 0; |
| + // Notifies the presentation about new message. |
|
imcheng
2017/01/23 22:02:35
nit: blank line before comment, here and below.
zhaobin
2017/01/24 01:23:24
Done.
|
| + virtual void didReceiveTextMessage(const WebString& message) = 0; |
| + virtual void didReceiveBinaryMessage(const uint8_t* data, size_t length) = 0; |
| + // Notifies the connection about its state change. |
| + virtual void didChangeState(WebPresentationConnectionState) = 0; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WebPresentationConnection_h |