Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ | |
|
xhwang
2016/10/01 07:12:14
nit: media and player are two words.
xjz
2016/10/03 22:31:08
Renamed to MediaObserver.
| |
| 6 #define MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "media/base/audio_decoder_config.h" | |
| 10 #include "media/base/cdm_context.h" | |
| 11 #include "media/base/video_decoder_config.h" | |
| 12 | |
| 13 namespace media { | |
| 14 | |
| 15 // This class is an observer of media player events. | |
| 16 class MEDIA_EXPORT MediaPlayerObserver { | |
|
xhwang
2016/10/01 07:12:14
As commented before, we don't use "MediaPlayer" ou
xjz
2016/10/03 22:31:08
Renamed as "MediaObserver".
| |
| 17 public: | |
| 18 MediaPlayerObserver(); | |
| 19 virtual ~MediaPlayerObserver(); | |
| 20 | |
| 21 // Called when the media element or its ancestor is entered/exited fullscreen. | |
|
xhwang
2016/10/01 07:12:14
What if the ancestor (e.g. a <div>) entered fullsc
xjz
2016/10/03 22:31:08
We currently treat this scenario same as the media
| |
| 22 virtual void OnEnteredFullscreen() = 0; | |
| 23 virtual void OnExitedFullscreen() = 0; | |
| 24 | |
| 25 // Called when CDM is attached to the media element. | |
|
xhwang
2016/10/01 07:12:14
Add a comment that the |cdm_context| is only guara
xjz
2016/10/03 22:31:08
Done.
| |
| 26 virtual void OnSetCdm(CdmContext* cdm_context) = 0; | |
| 27 | |
| 28 // Set video/audio config after demuxer is initialized. | |
|
xhwang
2016/10/01 07:12:14
nit: "Set" is ambiguous. This is really just notif
xjz
2016/10/03 22:31:08
Changed to pass PipelineMetadata instead to know i
| |
| 29 virtual void OnDecoderConfigChanged( | |
| 30 const AudioDecoderConfig& audio_config, | |
| 31 const VideoDecoderConfig& video_config) = 0; | |
| 32 }; | |
| 33 | |
| 34 } // namespace media | |
| 35 | |
| 36 #endif // MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_ | |
| OLD | NEW |