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

Side by Side Diff: webkit/media/android/webmediaplayer_manager_android.h

Issue 10413015: Upstream implementation for embedded video for WebMediaPlayerAndroid (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing feedbacks Created 8 years, 7 months 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
(Empty)
1 // Copyright (c) 2012 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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
7
8 #include <jni.h>
9 #include <map>
10
11 #include "base/basictypes.h"
12
13 namespace webkit_media {
14
15 class WebMediaPlayerAndroid;
16
17 // Class for managing all the WebMediaPlayerAndroid objects in a renderer
18 // process.
19 class WebMediaPlayerManagerAndroid {
20 public:
21 WebMediaPlayerManagerAndroid();
22 ~WebMediaPlayerManagerAndroid();
23
24 // Register and unregister a WebMediaPlayerAndroid object.
25 int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
26 void UnregisterMediaPlayer(int player_id);
27
28 // Release all the media resources on the renderer process.
29 void ReleaseMediaResources();
30
31 // Get the pointer to WebMediaPlayerAndroid given the player_id.
scherkus (not reviewing) 2012/05/25 22:01:46 nit: |player_id| also what's the return value if
qinmin 2012/05/26 00:37:42 Done.
32 WebMediaPlayerAndroid* GetWebMediaPlayer(int player_id);
scherkus (not reviewing) 2012/05/25 22:01:46 nit: you have Register/UnregisterMediaPlayer ... b
qinmin 2012/05/26 00:37:42 Done.
33
34 private:
35 // Information needed to manage WebMediaPlayerAndroid.
36 // TODO(qinmin): more informations will be added here for resource management.
37 struct MediaPlayerInfo {
38 webkit_media::WebMediaPlayerAndroid* player;
39 };
40
41 // Info for all available WebMediaPlayerAndroid on a page; kept so that
42 // we can enumerate them to send updates about tab focus and visibily.
43 std::map<int32, MediaPlayerInfo> media_players_;
44
45 int32 next_media_player_id_;
46
47 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid);
48 };
49
50 } // namespace webkit_media
51
52 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698