| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebPresentationConnection_h | 5 #ifndef WebPresentationConnection_h |
| 6 #define WebPresentationConnection_h | 6 #define WebPresentationConnection_h |
| 7 | 7 |
| 8 #include "public/platform/WebCommon.h" | 8 #include "public/platform/WebCommon.h" |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Takes ownership of |proxy| and stores it in connection object. Should be | 23 // Takes ownership of |proxy| and stores it in connection object. Should be |
| 24 // called only once. | 24 // called only once. |
| 25 virtual void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) = 0; | 25 virtual void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) = 0; |
| 26 | 26 |
| 27 // Notifies the presentation about new message. | 27 // Notifies the presentation about new message. |
| 28 virtual void didReceiveTextMessage(const WebString& message) = 0; | 28 virtual void didReceiveTextMessage(const WebString& message) = 0; |
| 29 virtual void didReceiveBinaryMessage(const uint8_t* data, size_t length) = 0; | 29 virtual void didReceiveBinaryMessage(const uint8_t* data, size_t length) = 0; |
| 30 | 30 |
| 31 // Notifies the connection about its state change. | 31 // Notifies the connection about its state change. |
| 32 virtual void didChangeState(WebPresentationConnectionState) = 0; | 32 virtual void didChangeState(WebPresentationConnectionState) = 0; |
| 33 |
| 34 // Notifies the connection about its state change to 'closed' with "Closed" |
| 35 // reason. |
| 36 virtual void didClose() = 0; |
| 33 }; | 37 }; |
| 34 | 38 |
| 35 } // namespace blink | 39 } // namespace blink |
| 36 | 40 |
| 37 #endif // WebPresentationConnection_h | 41 #endif // WebPresentationConnection_h |
| OLD | NEW |