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

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 virtual ~WebMediaPlayerManagerAndroid();
scherkus (not reviewing) 2012/05/24 21:36:32 why are all these methods virtual?
qinmin 2012/05/25 01:04:21 removed all the virtual keyword On 2012/05/24 21:3
23
24 // Register and unregister a WebMediaPlayerAndroid object.
25 virtual int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
26 virtual void UnRegisterMediaPlayer(int player_id);
scherkus (not reviewing) 2012/05/24 21:36:32 nit: "Un" isn't a word! let's have Unregister
qinmin 2012/05/25 01:04:21 Done.
27
28 // Release all the media resources on the renderer process.
29 virtual void ReleaseMediaResources();
30
31 // Pass the video surface to a particular WebMediaPlayerAndroid object given
32 // by the player_id.
33 // TODO(qinmin): Upstream the code for passing Java surface object to the
34 // renderer thread
35 virtual void SetVideoSurface(jobject j_surface, int player_id);
scherkus (not reviewing) 2012/05/24 21:36:32 who calls this method? I'm not sure how many more
qinmin 2012/05/25 01:04:21 When creating a video surface, the renderer proces
36
37 private:
38 // Information needed to manage WebMediaPlayerAndroid.
39 // TODO(qinmin): more informations will be added here for resource management.
40 struct MediaPlayerInfo {
41 webkit_media::WebMediaPlayerAndroid* player;
42 };
43
44 // Info for all available WebMediaPlayerAndroid on a page; kept so that
45 // we can enumerate them to send updates about tab focus and visibily.
46 std::map<int32, MediaPlayerInfo> media_players_;
47
48 // ID used to create the next media player for passing the Surface.
scherkus (not reviewing) 2012/05/24 21:36:32 "for passing the Surface" doesn't read very well -
qinmin 2012/05/25 01:04:21 Done.
49 int32 next_media_player_id_;
50
51 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid);
52 };
53
54 } // namespace webkit_media
55
56 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698