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 WebPresentationClient_h | 5 #ifndef WebPresentationClient_h |
6 #define WebPresentationClient_h | 6 #define WebPresentationClient_h |
7 | 7 |
8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
9 #include "public/platform/WebCommon.h" | 9 #include "public/platform/WebCommon.h" |
10 #include "public/platform/WebPassOwnPtr.h" | 10 #include "public/platform/WebPassOwnPtr.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 virtual void sendString(const WebString& presentationUrl, const WebString& p
resentationId, const WebString& message) = 0; | 45 virtual void sendString(const WebString& presentationUrl, const WebString& p
resentationId, const WebString& message) = 0; |
46 | 46 |
47 // Called when the frame requests to send ArrayBuffer/View data to an existi
ng session. | 47 // Called when the frame requests to send ArrayBuffer/View data to an existi
ng session. |
48 // Embedder copies the |data| and the ownership is not transferred. | 48 // Embedder copies the |data| and the ownership is not transferred. |
49 virtual void sendArrayBuffer(const WebString& presentationUrl, const WebStri
ng& presentationId, const uint8_t* data, size_t length) = 0; | 49 virtual void sendArrayBuffer(const WebString& presentationUrl, const WebStri
ng& presentationId, const uint8_t* data, size_t length) = 0; |
50 | 50 |
51 // Called when the frame requests to send Blob data to an existing session. | 51 // Called when the frame requests to send Blob data to an existing session. |
52 // Embedder copies the |data| and the ownership is not transferred. | 52 // Embedder copies the |data| and the ownership is not transferred. |
53 virtual void sendBlobData(const WebString& presentationUrl, const WebString&
presentationId, const uint8_t* data, size_t length) = 0; | 53 virtual void sendBlobData(const WebString& presentationUrl, const WebString&
presentationId, const uint8_t* data, size_t length) = 0; |
54 | 54 |
| 55 // Called when the frame requests to close an existing session. |
| 56 virtual void closeSession(const WebString& presentationUrl, const WebString&
presentationId) = 0; |
| 57 |
55 // Called when the frame requests to terminate an existing session. | 58 // Called when the frame requests to terminate an existing session. |
56 virtual void terminateSession(const WebString& presentationUrl, const WebStr
ing& presentationId) = 0; | 59 virtual void terminateSession(const WebString& presentationUrl, const WebStr
ing& presentationId) = 0; |
57 | 60 |
58 // Called when the frame wants to know the availability of a presentation | 61 // Called when the frame wants to know the availability of a presentation |
59 // display for |availabilityUrl|. The ownership of the callbacks argument | 62 // display for |availabilityUrl|. The ownership of the callbacks argument |
60 // is transferred to the embedder. | 63 // is transferred to the embedder. |
61 virtual void getAvailability(const WebString& availabilityUrl, WebPresentati
onAvailabilityCallbacks*) = 0; | 64 virtual void getAvailability(const WebString& availabilityUrl, WebPresentati
onAvailabilityCallbacks*) = 0; |
62 | 65 |
63 // Start listening to changes in presentation displays availability. The | 66 // Start listening to changes in presentation displays availability. The |
64 // observer will be notified in case of a change. The observer is | 67 // observer will be notified in case of a change. The observer is |
65 // respensible to call stopListening() before being destroyed. | 68 // respensible to call stopListening() before being destroyed. |
66 virtual void startListening(WebPresentationAvailabilityObserver*) = 0; | 69 virtual void startListening(WebPresentationAvailabilityObserver*) = 0; |
67 | 70 |
68 // Stop listening to changes in presentation displays availability. The | 71 // Stop listening to changes in presentation displays availability. The |
69 // observer will no longer be notified in case of a change. | 72 // observer will no longer be notified in case of a change. |
70 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; | 73 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; |
71 | 74 |
72 // Called when a defaultRequest has been set. It sends the url associated | 75 // Called when a defaultRequest has been set. It sends the url associated |
73 // with it for the embedder. | 76 // with it for the embedder. |
74 virtual void setDefaultPresentationUrl(const WebString&) = 0; | 77 virtual void setDefaultPresentationUrl(const WebString&) = 0; |
75 }; | 78 }; |
76 | 79 |
77 } // namespace blink | 80 } // namespace blink |
78 | 81 |
79 #endif // WebPresentationClient_h | 82 #endif // WebPresentationClient_h |
OLD | NEW |