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

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: rebase after https://chromiumcodereview.appspot.com/10469003/ got committed Created 8 years, 6 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 #pragma once
8
9 #include <jni.h>
10 #include <map>
11
12 #include "base/basictypes.h"
13
14 namespace webkit_media {
15
16 class WebMediaPlayerAndroid;
17
18 // Class for managing all the WebMediaPlayerAndroid objects in a renderer
19 // process.
20 class WebMediaPlayerManagerAndroid {
21 public:
22 WebMediaPlayerManagerAndroid();
23 ~WebMediaPlayerManagerAndroid();
24
25 // Register and unregister a WebMediaPlayerAndroid object.
26 int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
27 void UnregisterMediaPlayer(int player_id);
28
29 // Release all the media resources on the renderer process.
30 void ReleaseMediaResources();
31
32 // Get the pointer to WebMediaPlayerAndroid given the |player_id|.
33 WebMediaPlayerAndroid* GetMediaPlayer(int player_id);
34
35 private:
36 // Information needed to manage WebMediaPlayerAndroid.
37 // TODO(qinmin): more informations will be added here for resource management.
38 struct MediaPlayerInfo {
39 webkit_media::WebMediaPlayerAndroid* player;
40 };
41
42 // Info for all available WebMediaPlayerAndroid on a page; kept so that
43 // we can enumerate them to send updates about tab focus and visibily.
44 std::map<int32, MediaPlayerInfo> media_players_;
45
46 int32 next_media_player_id_;
47
48 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid);
49 };
50
51 } // namespace webkit_media
52
53 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « webkit/media/android/webmediaplayer_android.cc ('k') | webkit/media/android/webmediaplayer_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698