Chromium Code Reviews| Index: webkit/media/android/media_player_bridge_manager_impl.h |
| diff --git a/webkit/media/android/media_player_bridge_manager_impl.h b/webkit/media/android/media_player_bridge_manager_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e8b53c771048163c76148e126320b705e6626358 |
| --- /dev/null |
| +++ b/webkit/media/android/media_player_bridge_manager_impl.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_MEDIA_ANDROID_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_ |
| +#define WEBKIT_MEDIA_ANDROID_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "media/base/android/media_player_bridge_manager.h" |
| + |
| +namespace webkit_media { |
| + |
| +// Class for managing active MediaPlayerBridge objects if they are created |
| +// in render process. |
| +class MediaPlayerBridgeManagerImpl : public media::MediaPlayerBridgeManager { |
| + public: |
| + explicit MediaPlayerBridgeManagerImpl(int threshold); |
|
scherkus (not reviewing)
2012/09/10 12:19:08
doc ctor please
qinmin
2012/09/11 04:50:24
Done.
|
| + virtual ~MediaPlayerBridgeManagerImpl(); |
| + |
| + // media::MediaPlayerBridgeManager implementations. |
| + virtual void RequestMediaResources(media::MediaPlayerBridge* player) OVERRIDE; |
| + virtual void ReleaseMediaResources(media::MediaPlayerBridge* player) OVERRIDE; |
| + |
| + private: |
| + // An array of active MediaPlayerBridge objects. |
| + std::vector<media::MediaPlayerBridge*> players_; |
| + |
| + // 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.
|
| + int active_player_threshold_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridgeManagerImpl); |
| +}; |
| + |
| +} // namespace webkit_media |
| + |
| +#endif // WEBKIT_MEDIA_ANDROID_MEDIA_PLAYER_BRIDGE_MANAGER_IMPL_H_ |