OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebPresentationController_h | 5 #ifndef WebPresentationController_h |
6 #define WebPresentationController_h | 6 #define WebPresentationController_h |
7 | 7 |
8 #include "public/platform/WebCommon.h" | 8 #include "public/platform/WebCommon.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class WebPresentationSessionClient; | 12 class WebPresentationSessionClient; |
13 class WebString; | 13 class WebString; |
14 enum class WebPresentationSessionState; | 14 enum class WebPresentationSessionState; |
15 | 15 |
16 // The delegate Blink provides to WebPresentationClient in order to get updates. | 16 // The delegate Blink provides to WebPresentationClient in order to get updates. |
17 class BLINK_PLATFORM_EXPORT WebPresentationController { | 17 class BLINK_PLATFORM_EXPORT WebPresentationController { |
18 public: | 18 public: |
19 virtual ~WebPresentationController() { } | 19 virtual ~WebPresentationController() { } |
20 | 20 |
21 // Called when the presentation session is started by the embedder using | 21 // Called when the presentation session is started by the embedder using |
22 // the default presentation URL and id. | 22 // the default presentation URL and id. |
23 virtual void didStartDefaultSession(WebPresentationSessionClient*) = 0; | 23 virtual void didStartDefaultSession(WebPresentationSessionClient*) = 0; |
24 | 24 |
25 // Called when the state of a session changes. | 25 // Called when the state of a session changes. |
26 virtual void didChangeSessionState(WebPresentationSessionClient*, WebPresent
ationSessionState) = 0; | 26 virtual void didChangeSessionState(WebPresentationSessionClient*, WebPresent
ationSessionState) = 0; |
27 | 27 |
28 // Called when a text message of a session is received. | 28 // Called when a text message of a session is received. |
29 virtual void didReceiveSessionTextMessage(WebPresentationSessionClient*, con
st WebString& message) = 0; | 29 virtual void didReceiveSessionTextMessage(WebPresentationSessionClient*, con
st WebString& message) = 0; |
| 30 |
| 31 // Called when a binary message of a session is received. |
| 32 virtual void didReceiveSessionBinaryMessage(WebPresentationSessionClient*, c
onst uint8_t* data, size_t length) = 0; |
30 }; | 33 }; |
31 | 34 |
32 } // namespace blink | 35 } // namespace blink |
33 | 36 |
34 #endif // WebPresentationController_h | 37 #endif // WebPresentationController_h |
OLD | NEW |