Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: third_party/WebKit/public/platform/modules/remoteplayback/WebRemotePlaybackClient.h

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed failing tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698