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

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

Issue 10919075: Move android mediaplayer from render process to browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 8 years, 3 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_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_
6 #define WEBKIT_MEDIA_ANDROID_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "media/base/android/media_player_bridge_manager.h"
13
14 namespace webkit_media {
15
16 // Class for managing active MediaPlayerBridge objects if they are created
17 // in render process.
18 class MediaPlayerBridgeManagerImpl : public media::MediaPlayerBridgeManager {
19 public:
20 explicit MediaPlayerBridgeManagerImpl(int threshold);
21 virtual ~MediaPlayerBridgeManagerImpl();
22
23 // media::MediaPlayerBridgeManager implementations.
24 virtual void RequestMediaResources(media::MediaPlayerBridge* player) OVERRIDE;
25 virtual void ReleaseMediaResources(media::MediaPlayerBridge* player) OVERRIDE;
26
27 private:
28 // An array of active MediaPlayerBridge objects.
29 std::vector<media::MediaPlayerBridge*> players_;
30
31 // threashold before we start to reclaim unused media resources.
32 int active_player_threshold_;
33
34 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridgeManagerImpl);
35 };
36
37 } // namespace webkit_media
38
39 #endif // WEBKIT_MEDIA_ANDROID_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698