Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 WebRemotePlaybackClient_h | 5 #ifndef WebRemotePlaybackClient_h |
| 6 #define WebRemotePlaybackClient_h | 6 #define WebRemotePlaybackClient_h |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 enum class WebRemotePlaybackState; | 10 enum class WebRemotePlaybackState; |
| 11 | 11 |
| 12 // The interface between the HTMLMediaElement and its | 12 // The interface between the HTMLMediaElement and its |
| 13 // HTMLMediaElementRemotePlayback supplement. | 13 // HTMLMediaElementRemotePlayback supplement. |
| 14 class WebRemotePlaybackClient { | 14 class WebRemotePlaybackClient { |
| 15 public: | 15 public: |
| 16 virtual ~WebRemotePlaybackClient() = default; | 16 virtual ~WebRemotePlaybackClient() = default; |
| 17 | 17 |
| 18 // Notifies the client that the media element state has changed. | 18 // Notifies the client that the media element state has changed. |
| 19 virtual void stateChanged(WebRemotePlaybackState) = 0; | 19 virtual void stateChanged(WebRemotePlaybackState) = 0; |
| 20 | 20 |
| 21 // Notifies the client of the remote playback device availability change. | 21 // Notifies the client of the remote playback device availability change. |
| 22 virtual void availabilityChanged(bool availability) = 0; | 22 virtual void availabilityChanged(bool isRouteAvailable, |
| 23 bool isSourceCompatible) = 0; | |
|
dcheng
2016/11/08 07:40:00
Let's pass enums instead of bools; it makes the ca
whywhat
2016/11/09 01:38:11
Done.
| |
| 23 | 24 |
| 24 // Notifies the client that the user cancelled the prompt shown via the API. | 25 // Notifies the client that the user cancelled the prompt shown via the API. |
| 25 virtual void promptCancelled() = 0; | 26 virtual void promptCancelled() = 0; |
| 27 | |
| 28 // Returns if the remote playback available for this media element. | |
| 29 virtual bool remotePlaybackAvailable() const = 0; | |
| 26 }; | 30 }; |
| 27 | 31 |
| 28 } // namespace blink | 32 } // namespace blink |
| 29 | 33 |
| 30 #endif // WebRemotePlaybackState_h | 34 #endif // WebRemotePlaybackState_h |
| OLD | NEW |