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

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: remove GetWebMediaPlayerManager() from render_view.h 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 {
scherkus (not reviewing) 2012/05/23 22:45:46 ISTM this class is mostly here for two purposes:
qinmin 2012/05/24 20:30:28 I think we need this class for as it has more func
scherkus (not reviewing) 2012/05/24 21:36:32 Hrmm... I think we're going to have to sort out so
qinmin 2012/05/25 01:04:20 we still have only 1 render process and 1 browser
20 public:
21 WebMediaPlayerManagerAndroid(int32 routing_id);
22 virtual ~WebMediaPlayerManagerAndroid();
23
24 // Register and unregister a WebMediaPlayerAndroid object.
25 virtual int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
scherkus (not reviewing) 2012/05/23 22:45:46 do we need to return an int ID or can we use the p
qinmin 2012/05/24 20:30:28 So the whole process of getting a video surface wo
26 virtual void UnRegisterMediaPlayer(int player_id);
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);
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.
49 int32 next_media_player_id_;
50
51 int32 routing_id_;
52
53 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid);
54 };
55
56 } // namespace webkit_media
57
58 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698