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_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ | 5 #ifndef MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ |
6 #define MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ | 6 #define MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ |
7 | 7 |
8 // This file contains interfaces modeled after classes in | 8 // This file contains interfaces modeled after classes in |
9 // content/renderer/media/android for the purposes of letting clases in | 9 // content/renderer/media/android for the purposes of letting clases in |
10 // this directory implement and/or interact with those classes. | 10 // this directory implement and/or interact with those classes. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const std::string& remote_playback_message) = 0; | 54 const std::string& remote_playback_message) = 0; |
55 virtual void OnDisconnectedFromRemoteDevice() = 0; | 55 virtual void OnDisconnectedFromRemoteDevice() = 0; |
56 virtual void OnRemotePlaybackStarted() = 0; | 56 virtual void OnRemotePlaybackStarted() = 0; |
57 virtual void OnCancelledRemotePlaybackRequest() = 0; | 57 virtual void OnCancelledRemotePlaybackRequest() = 0; |
58 virtual void OnDidExitFullscreen() = 0; | 58 virtual void OnDidExitFullscreen() = 0; |
59 virtual void OnMediaPlayerPlay() = 0; | 59 virtual void OnMediaPlayerPlay() = 0; |
60 virtual void OnMediaPlayerPause() = 0; | 60 virtual void OnMediaPlayerPause() = 0; |
61 virtual void OnRemoteRouteAvailabilityChanged( | 61 virtual void OnRemoteRouteAvailabilityChanged( |
62 blink::WebRemotePlaybackAvailability availability) = 0; | 62 blink::WebRemotePlaybackAvailability availability) = 0; |
63 | 63 |
64 // Getters of playback state. | |
65 virtual bool paused() const = 0; | |
66 | |
67 // True if the loaded media has a playable video track. | |
68 virtual bool hasVideo() const = 0; | |
69 | |
70 // This function is called by the RendererMediaPlayerManager to pause the | 64 // This function is called by the RendererMediaPlayerManager to pause the |
71 // video and release the media player and surface texture when we switch tabs. | 65 // video and release the media player and surface texture when we switch tabs. |
72 // However, the actual GlTexture is not released to keep the video screenshot. | 66 // However, the actual GlTexture is not released to keep the video screenshot. |
73 virtual void SuspendAndReleaseResources() = 0; | 67 virtual void SuspendAndReleaseResources() = 0; |
74 }; | 68 }; |
75 | 69 |
76 class RendererMediaPlayerManagerInterface { | 70 class RendererMediaPlayerManagerInterface { |
77 public: | 71 public: |
78 // Initializes a MediaPlayerAndroid object in browser process. | 72 // Initializes a MediaPlayerAndroid object in browser process. |
79 virtual void Initialize(MediaPlayerHostMsg_Initialize_Type type, | 73 virtual void Initialize(MediaPlayerHostMsg_Initialize_Type type, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 virtual void RequestRemotePlaybackStop(int player_id) = 0; | 113 virtual void RequestRemotePlaybackStop(int player_id) = 0; |
120 | 114 |
121 // Registers and unregisters a RendererMediaPlayerInterface object. | 115 // Registers and unregisters a RendererMediaPlayerInterface object. |
122 virtual int RegisterMediaPlayer(RendererMediaPlayerInterface* player) = 0; | 116 virtual int RegisterMediaPlayer(RendererMediaPlayerInterface* player) = 0; |
123 virtual void UnregisterMediaPlayer(int player_id) = 0; | 117 virtual void UnregisterMediaPlayer(int player_id) = 0; |
124 }; | 118 }; |
125 | 119 |
126 } // namespace media | 120 } // namespace media |
127 | 121 |
128 #endif // MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ | 122 #endif // MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ |
OLD | NEW |