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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.h

Issue 110683002: Split the hole punching logic from GOOGLE_TV ifdef to VIDEO_HOLE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | Annotate | Revision Log
OLDNEW
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_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 uint32 session_id, 97 uint32 session_id,
98 const std::vector<uint8>& message, 98 const std::vector<uint8>& message,
99 const std::string& destination_url) OVERRIDE; 99 const std::string& destination_url) OVERRIDE;
100 virtual void OnSessionReady(int media_keys_id, uint32 session_id) OVERRIDE; 100 virtual void OnSessionReady(int media_keys_id, uint32 session_id) OVERRIDE;
101 virtual void OnSessionClosed(int media_keys_id, uint32 session_id) OVERRIDE; 101 virtual void OnSessionClosed(int media_keys_id, uint32 session_id) OVERRIDE;
102 virtual void OnSessionError(int media_keys_id, 102 virtual void OnSessionError(int media_keys_id,
103 uint32 session_id, 103 uint32 session_id,
104 media::MediaKeys::KeyError error_code, 104 media::MediaKeys::KeyError error_code,
105 int system_code) OVERRIDE; 105 int system_code) OVERRIDE;
106 106
107 #if defined(GOOGLE_TV) 107 #if defined(VIDEO_HOLE)
108 void AttachExternalVideoSurface(int player_id, jobject surface); 108 void AttachExternalVideoSurface(int player_id, jobject surface);
109 void DetachExternalVideoSurface(int player_id); 109 void DetachExternalVideoSurface(int player_id);
110 #endif 110 #endif // defined(VIDEO_HOLE)
111 111
112 // Called to disble the current fullscreen playback if the video is encrypted. 112 // Called to disble the current fullscreen playback if the video is encrypted.
113 // TODO(qinmin): remove this once we have the new fullscreen mode. 113 // TODO(qinmin): remove this once we have the new fullscreen mode.
114 void DisableFullscreenEncryptedMediaPlayback(); 114 void DisableFullscreenEncryptedMediaPlayback();
115 115
116 protected: 116 protected:
117 // Clients must use Create() or subclass constructor. 117 // Clients must use Create() or subclass constructor.
118 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host); 118 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host);
119 119
120 // Message handlers. 120 // Message handlers.
(...skipping 17 matching lines...) Expand all
138 void OnCreateSession(int media_keys_id, 138 void OnCreateSession(int media_keys_id,
139 uint32 session_id, 139 uint32 session_id,
140 const std::string& type, 140 const std::string& type,
141 const std::vector<uint8>& init_data); 141 const std::vector<uint8>& init_data);
142 void OnUpdateSession(int media_keys_id, 142 void OnUpdateSession(int media_keys_id,
143 uint32 session_id, 143 uint32 session_id,
144 const std::vector<uint8>& response); 144 const std::vector<uint8>& response);
145 void OnReleaseSession(int media_keys_id, uint32 session_id); 145 void OnReleaseSession(int media_keys_id, uint32 session_id);
146 void OnSetMediaKeys(int player_id, int media_keys_id); 146 void OnSetMediaKeys(int player_id, int media_keys_id);
147 147
148 #if defined(GOOGLE_TV) 148 #if defined(VIDEO_HOLE)
149 virtual void OnNotifyExternalSurface( 149 virtual void OnNotifyExternalSurface(
150 int player_id, bool is_request, const gfx::RectF& rect); 150 int player_id, bool is_request, const gfx::RectF& rect);
151 #endif 151 #endif // defined(VIDEO_HOLE)
152 152
153 // Adds a given player to the list. 153 // Adds a given player to the list.
154 void AddPlayer(media::MediaPlayerAndroid* player); 154 void AddPlayer(media::MediaPlayerAndroid* player);
155 155
156 // Removes the player with the specified id. 156 // Removes the player with the specified id.
157 void RemovePlayer(int player_id); 157 void RemovePlayer(int player_id);
158 158
159 // Replaces a player with the specified id with a given MediaPlayerAndroid 159 // Replaces a player with the specified id with a given MediaPlayerAndroid
160 // object. This will also return the original MediaPlayerAndroid object that 160 // object. This will also return the original MediaPlayerAndroid object that
161 // was replaced. 161 // was replaced.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; 228 scoped_ptr<media::MediaResourceGetter> media_resource_getter_;
229 229
230 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; 230 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_;
231 231
232 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); 232 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager);
233 }; 233 };
234 234
235 } // namespace content 235 } // namespace content
236 236
237 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 237 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698