OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 ~RendererMediaPlayerManager() override; | 39 ~RendererMediaPlayerManager() override; |
40 | 40 |
41 // RenderFrameObserver overrides. | 41 // RenderFrameObserver overrides. |
42 bool OnMessageReceived(const IPC::Message& msg) override; | 42 bool OnMessageReceived(const IPC::Message& msg) override; |
43 | 43 |
44 // Initializes a MediaPlayerAndroid object in browser process. | 44 // Initializes a MediaPlayerAndroid object in browser process. |
45 void Initialize(MediaPlayerHostMsg_Initialize_Type type, | 45 void Initialize(MediaPlayerHostMsg_Initialize_Type type, |
46 int player_id, | 46 int player_id, |
47 const GURL& url, | 47 const GURL& url, |
48 const GURL& first_party_for_cookies, | 48 const GURL& first_party_for_cookies, |
49 int demuxer_client_id, | |
50 const GURL& frame_url, | 49 const GURL& frame_url, |
51 bool allow_credentials, | 50 bool allow_credentials, |
52 int delegate_id) override; | 51 int delegate_id) override; |
53 | 52 |
54 // Starts the player. | 53 // Starts the player. |
55 void Start(int player_id) override; | 54 void Start(int player_id) override; |
56 | 55 |
57 // Pauses the player. | 56 // Pauses the player. |
58 // is_media_related_action should be true if this pause is coming from an | 57 // is_media_related_action should be true if this pause is coming from an |
59 // an action that explicitly pauses the video (user pressing pause, JS, etc.) | 58 // an action that explicitly pauses the video (user pressing pause, JS, etc.) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void OnMediaPlaybackCompleted(int player_id); | 109 void OnMediaPlaybackCompleted(int player_id); |
111 void OnMediaBufferingUpdate(int player_id, int percent); | 110 void OnMediaBufferingUpdate(int player_id, int percent); |
112 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); | 111 void OnSeekRequest(int player_id, const base::TimeDelta& time_to_seek); |
113 void OnSeekCompleted(int player_id, | 112 void OnSeekCompleted(int player_id, |
114 const base::TimeDelta& current_timestamp); | 113 const base::TimeDelta& current_timestamp); |
115 void OnMediaError(int player_id, int error); | 114 void OnMediaError(int player_id, int error); |
116 void OnVideoSizeChanged(int player_id, int width, int height); | 115 void OnVideoSizeChanged(int player_id, int width, int height); |
117 void OnTimeUpdate(int player_id, | 116 void OnTimeUpdate(int player_id, |
118 base::TimeDelta current_timestamp, | 117 base::TimeDelta current_timestamp, |
119 base::TimeTicks current_time_ticks); | 118 base::TimeTicks current_time_ticks); |
120 void OnWaitingForDecryptionKey(int player_id); | |
121 void OnMediaPlayerReleased(int player_id); | 119 void OnMediaPlayerReleased(int player_id); |
122 void OnConnectedToRemoteDevice(int player_id, | 120 void OnConnectedToRemoteDevice(int player_id, |
123 const std::string& remote_playback_message); | 121 const std::string& remote_playback_message); |
124 void OnDisconnectedFromRemoteDevice(int player_id); | 122 void OnDisconnectedFromRemoteDevice(int player_id); |
125 void OnCancelledRemotePlaybackRequest(int player_id); | 123 void OnCancelledRemotePlaybackRequest(int player_id); |
126 void OnDidExitFullscreen(int player_id); | 124 void OnDidExitFullscreen(int player_id); |
127 void OnDidEnterFullscreen(int player_id); | 125 void OnDidEnterFullscreen(int player_id); |
128 void OnPlayerPlay(int player_id); | 126 void OnPlayerPlay(int player_id); |
129 void OnPlayerPause(int player_id); | 127 void OnPlayerPause(int player_id); |
130 void OnRemoteRouteAvailabilityChanged(int player_id, bool routes_available); | 128 void OnRemoteRouteAvailabilityChanged(int player_id, bool routes_available); |
131 | 129 |
132 // Info for all available WebMediaPlayerAndroid on a page; kept so that | 130 // Info for all available WebMediaPlayerAndroid on a page; kept so that |
133 // we can enumerate them to send updates about tab focus and visibility. | 131 // we can enumerate them to send updates about tab focus and visibility. |
134 std::map<int, media::RendererMediaPlayerInterface*> media_players_; | 132 std::map<int, media::RendererMediaPlayerInterface*> media_players_; |
135 | 133 |
136 int next_media_player_id_; | 134 int next_media_player_id_; |
137 | 135 |
138 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 136 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
139 }; | 137 }; |
140 | 138 |
141 } // namespace content | 139 } // namespace content |
142 | 140 |
143 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 141 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |