OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WebPresentationConnection_h | |
6 #define WebPresentationConnection_h | |
7 | |
8 #include "public/platform/WebCommon.h" | |
9 | |
10 #include <memory> | |
11 | |
12 namespace blink { | |
13 | |
14 enum class WebPresentationConnectionState; | |
15 class WebPresentationConnectionProxy; | |
16 class WebString; | |
17 | |
18 // Implemented by the embedder for a PresentationConnection. | |
19 class WebPresentationConnection { | |
20 public: | |
21 virtual ~WebPresentationConnection() = default; | |
22 | |
23 // Takes ownership of |proxy| and stores it in connection object. Should be | |
24 // called only once. | |
25 virtual void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) = 0; | |
26 // 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.
| |
27 virtual void didReceiveTextMessage(const WebString& message) = 0; | |
28 virtual void didReceiveBinaryMessage(const uint8_t* data, size_t length) = 0; | |
29 // Notifies the connection about its state change. | |
30 virtual void didChangeState(WebPresentationConnectionState) = 0; | |
31 }; | |
32 | |
33 } // namespace blink | |
34 | |
35 #endif // WebPresentationConnection_h | |
OLD | NEW |