| 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 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // The implementation the embedder has to provide for the Presentation API to wo
rk. | 27 // The implementation the embedder has to provide for the Presentation API to wo
rk. |
| 28 class WebPresentationClient { | 28 class WebPresentationClient { |
| 29 public: | 29 public: |
| 30 virtual ~WebPresentationClient() { } | 30 virtual ~WebPresentationClient() { } |
| 31 | 31 |
| 32 // Passes the Blink-side delegate to the embedder. | 32 // Passes the Blink-side delegate to the embedder. |
| 33 virtual void setController(WebPresentationController*) = 0; | 33 virtual void setController(WebPresentationController*) = 0; |
| 34 | 34 |
| 35 // Called when the frame requests to start a new session. | 35 // Called when the frame requests to start a new session. |
| 36 // The ownership of the |callbacks| argument is transferred to the embedder. | 36 // The ownership of the |callbacks| argument is transferred to the embedder. |
| 37 virtual void startSession(const WebString& presentationUrl, const WebString&
presentationId, WebPresentationSessionClientCallbacks*) = 0; | 37 virtual void startSession(const WebString& presentationUrl, WebPresentationS
essionClientCallbacks*) = 0; |
| 38 | 38 |
| 39 // Called when the frame requests to join an existing session. | 39 // Called when the frame requests to join an existing session. |
| 40 // The ownership of the |callbacks| argument is transferred to the embedder. | 40 // The ownership of the |callbacks| argument is transferred to the embedder. |
| 41 virtual void joinSession(const WebString& presentationUrl, const WebString&
presentationId, WebPresentationSessionClientCallbacks*) = 0; | 41 virtual void joinSession(const WebString& presentationUrl, const WebString&
presentationId, WebPresentationSessionClientCallbacks*) = 0; |
| 42 | 42 |
| 43 // Called when the frame requests to send String message to an existing sess
ion. | 43 // Called when the frame requests to send String message to an existing sess
ion. |
| 44 virtual void sendString(const WebString& presentationUrl, const WebString& p
resentationId, const WebString& message) = 0; | 44 virtual void sendString(const WebString& presentationUrl, const WebString& p
resentationId, const WebString& message) = 0; |
| 45 | 45 |
| 46 // Called when the frame requests to send ArrayBuffer/View data to an existi
ng session. | 46 // Called when the frame requests to send ArrayBuffer/View data to an existi
ng session. |
| 47 // Embedder copies the |data| and the ownership is not transferred. | 47 // Embedder copies the |data| and the ownership is not transferred. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 65 virtual void startListening(WebPresentationAvailabilityObserver*) = 0; | 65 virtual void startListening(WebPresentationAvailabilityObserver*) = 0; |
| 66 | 66 |
| 67 // Stop listening to changes in presentation displays availability. The | 67 // Stop listening to changes in presentation displays availability. The |
| 68 // observer will no longer be notified in case of a change. | 68 // observer will no longer be notified in case of a change. |
| 69 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; | 69 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace blink | 72 } // namespace blink |
| 73 | 73 |
| 74 #endif // WebPresentationClient_h | 74 #endif // WebPresentationClient_h |
| OLD | NEW |