Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h |
| diff --git a/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h b/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h |
| index 77dc785f3d7222c6273a88734a89b5fb74dd17be..565393739e456901b2b99f741bbf6977c624daad 100644 |
| --- a/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h |
| +++ b/third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h |
| @@ -15,20 +15,14 @@ namespace blink { |
| class WebPresentationAvailabilityObserver; |
| class WebPresentationController; |
| struct WebPresentationError; |
| +class WebPresentationConnectionCallbacks; |
| +class WebPresentationConnectionProxy; |
| class WebPresentationReceiver; |
| -struct WebPresentationSessionInfo; |
| class WebString; |
| class WebURL; |
| template <typename T> |
| class WebVector; |
| -// If session was created, callback's onSuccess() is invoked with the |
| -// information about the presentation session created by the embedder. |
| -// Otherwise, onError() is invoked with the error code and message. |
| -using WebPresentationConnectionCallback = |
| - WebCallbacks<const WebPresentationSessionInfo&, |
| - const WebPresentationError&>; |
| - |
| // Callback for .getAvailability(). |
| using WebPresentationAvailabilityCallbacks = |
| WebCallbacks<bool, const WebPresentationError&>; |
| @@ -48,33 +42,36 @@ class WebPresentationClient { |
| // Called when the frame requests to start a new session. |
| virtual void startSession( |
| const WebVector<WebURL>& presentationUrls, |
| - std::unique_ptr<WebPresentationConnectionCallback>) = 0; |
| + std::unique_ptr<WebPresentationConnectionCallbacks>) = 0; |
| // Called when the frame requests to join an existing session. |
| virtual void joinSession( |
| const WebVector<WebURL>& presentationUrls, |
| const WebString& presentationId, |
| - std::unique_ptr<WebPresentationConnectionCallback>) = 0; |
| + std::unique_ptr<WebPresentationConnectionCallbacks>) = 0; |
| // Called when the frame requests to send String message to an existing |
| // session. |
|
imcheng
2017/01/20 20:15:43
Please document the proxy argument.
zhaobin
2017/01/23 19:38:49
Done.
|
| virtual void sendString(const WebURL& presentationUrl, |
| const WebString& presentationId, |
| - const WebString& message) = 0; |
| + const WebString& message, |
| + const WebPresentationConnectionProxy*) = 0; |
| // Called when the frame requests to send ArrayBuffer/View data to an existing |
| // session. Embedder copies the |data| and the ownership is not transferred. |
| virtual void sendArrayBuffer(const WebURL& presentationUrl, |
| const WebString& presentationId, |
| const uint8_t* data, |
| - size_t length) = 0; |
| + size_t length, |
| + const WebPresentationConnectionProxy*) = 0; |
| // Called when the frame requests to send Blob data to an existing session. |
| // Embedder copies the |data| and the ownership is not transferred. |
| virtual void sendBlobData(const WebURL& presentationUrl, |
| const WebString& presentationId, |
| const uint8_t* data, |
| - size_t length) = 0; |
| + size_t length, |
| + const WebPresentationConnectionProxy*) = 0; |
| // Called when the frame requests to close an existing session. |
| virtual void closeSession(const WebURL& presentationUrl, |