Chromium Code Reviews| OLD | NEW |
|---|---|
| (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); | |
|
scherkus (not reviewing)
2012/09/10 12:19:08
doc ctor please
qinmin
2012/09/11 04:50:24
Done.
| |
| 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. | |
|
scherkus (not reviewing)
2012/09/10 12:19:08
s/threashold/Threshold
qinmin
2012/09/11 04:50:24
Done.
| |
| 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_ | |
| OLD | NEW |