Chromium Code Reviews| Index: media/base/android/media_client_android.h |
| diff --git a/media/base/android/media_client_android.h b/media/base/android/media_client_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..631b57bdec098f4ea9abd8663a6af11375050861 |
| --- /dev/null |
| +++ b/media/base/android/media_client_android.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2015 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 MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ |
| +#define MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ |
| + |
| +#include <string> |
| +#include <utility> |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "media/base/media_export.h" |
| + |
| +namespace media { |
| + |
| +class MediaDrmBridgeDelegate; |
| +class MediaClientAndroid; |
|
xhwang
2015/04/24 04:52:23
nit: order
gunsch
2015/04/27 23:44:12
Done.
|
| + |
| +// Setter for MediaClientAndroid. This should be called early in embedder |
| +// lifecycle, before any media playback could occur. |
| +MEDIA_EXPORT void SetMediaClientAndroid(MediaClientAndroid* media_client); |
| + |
| +#if defined(MEDIA_IMPLEMENTATION) |
| +// Getter for the client. Returns nullptr if no customized client is needed. |
| +MediaClientAndroid* GetMediaClientAndroid(); |
| +#endif |
| + |
| +// A client interface for embedders (e.g. content/browser) to provide customized |
| +// additions to Android's browser-side media handling. |
| +class MEDIA_EXPORT MediaClientAndroid { |
| + public: |
| + MediaClientAndroid(); |
| + virtual ~MediaClientAndroid(); |
| + |
| + // Returns extra mappings from key-system name to Android UUID. |
| + virtual std::vector<std::pair<std::string, std::vector<uint8_t>>> |
|
xhwang
2015/04/24 04:52:23
How about:
using UUID = std::vector<uint8_t>;
us
gunsch
2015/04/27 23:44:12
Done.
|
| + GetKeySystemUUIDMappings() const; |
|
xhwang
2015/04/24 04:52:23
Returning a vector of string/vector involves copy
gunsch
2015/04/27 23:44:12
Not all implementations do, see the default MediaC
|
| + // Returns a MediaDrmBridgeDelegate |
| + virtual media::MediaDrmBridgeDelegate* GetMediaDrmBridgeDelegate( |
| + const std::vector<uint8_t>& scheme_uuid) const; |
|
xhwang
2015/04/24 04:52:23
If you follow the comment about, you can s/std::ve
gunsch
2015/04/27 23:44:12
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MediaClientAndroid); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_ |