| 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 MEDIA_BASE_MEDIA_OBSERVER_H_ | 5 #ifndef MEDIA_BASE_MEDIA_OBSERVER_H_ |
| 6 #define MEDIA_BASE_MEDIA_OBSERVER_H_ | 6 #define MEDIA_BASE_MEDIA_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "media/base/cdm_context.h" | 8 #include "media/base/cdm_context.h" |
| 9 #include "media/base/pipeline_metadata.h" | 9 #include "media/base/pipeline_metadata.h" |
| 10 #include "url/gurl.h" |
| 10 | 11 |
| 11 namespace media { | 12 namespace media { |
| 12 | 13 |
| 13 // This class is an observer of media player events. | 14 // This class is an observer of media player events. |
| 14 class MEDIA_EXPORT MediaObserver { | 15 class MEDIA_EXPORT MediaObserver { |
| 15 public: | 16 public: |
| 16 MediaObserver(); | 17 MediaObserver(); |
| 17 virtual ~MediaObserver(); | 18 virtual ~MediaObserver(); |
| 18 | 19 |
| 19 // Called when the media element entered/exited fullscreen. | 20 // Called when the media element entered/exited fullscreen. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 | 34 |
| 34 // Called to indicate whether the site requests that remote playback be | 35 // Called to indicate whether the site requests that remote playback be |
| 35 // disabled. The "disabled" naming corresponds with the | 36 // disabled. The "disabled" naming corresponds with the |
| 36 // "disableRemotePlayback" media element attribute, as described in the | 37 // "disableRemotePlayback" media element attribute, as described in the |
| 37 // Remote Playback API spec: https://w3c.github.io/remote-playback | 38 // Remote Playback API spec: https://w3c.github.io/remote-playback |
| 38 virtual void OnRemotePlaybackDisabled(bool disabled) = 0; | 39 virtual void OnRemotePlaybackDisabled(bool disabled) = 0; |
| 39 | 40 |
| 40 // Called when the media is playing/paused. | 41 // Called when the media is playing/paused. |
| 41 virtual void OnPlaying() = 0; | 42 virtual void OnPlaying() = 0; |
| 42 virtual void OnPaused() = 0; | 43 virtual void OnPaused() = 0; |
| 44 |
| 45 // Called when a poster image URL is set, which happens when media is loaded |
| 46 // or the poster attribute is changed. |
| 47 virtual void OnSetPoster(const GURL& poster) = 0; |
| 43 }; | 48 }; |
| 44 | 49 |
| 45 } // namespace media | 50 } // namespace media |
| 46 | 51 |
| 47 #endif // MEDIA_BASE_MEDIA_OBSERVER_H_ | 52 #endif // MEDIA_BASE_MEDIA_OBSERVER_H_ |
| OLD | NEW |