Chromium Code Reviews| Index: media/base/android/media_drm_bridge_delegate.h |
| diff --git a/media/base/android/media_drm_bridge_delegate.h b/media/base/android/media_drm_bridge_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..76c4f6b1932abb30308d818eb87f1a34eb091372 |
| --- /dev/null |
| +++ b/media/base/android/media_drm_bridge_delegate.h |
| @@ -0,0 +1,45 @@ |
| +// 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_DRM_BRIDGE_DELEGATE_H_ |
| +#define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "media/base/eme_constants.h" |
| +#include "media/base/media_export.h" |
| + |
| +namespace media { |
| + |
| +// Allows embedders to modify the Android MediaDrm flow. Delegates are |
| +// registered to a specific key system. |
| +class MEDIA_EXPORT MediaDrmBridgeDelegate { |
| + public: |
| + MediaDrmBridgeDelegate(); |
| + virtual ~MediaDrmBridgeDelegate(); |
| + |
| + // Returns the UUID of the DRM scheme that this delegate applies to. |
| + virtual const std::vector<uint8_t> GetUUID() const = 0; |
|
xhwang
2015/04/28 05:25:11
s/std::vector<uint8_t>/UUID
gunsch
2015/04/28 18:50:51
Done.
|
| + |
| + // Invoked from CreateSession. |
| + // If |init_data_out| is filled, it replaces |init_data| to send to the |
| + // MediaDrm instance. |
| + // If |optional_parameters_out| is filled, it is expected to be an |
| + // even-length list of (key, value) pairs to send to the MediaDrm instance. |
| + // Returns false if the request should be rejected. |
| + virtual bool OnCreateSession( |
| + const EmeInitDataType init_data_type, |
| + const std::vector<uint8_t>& init_data, |
| + std::vector<uint8_t>* init_data_out, |
| + std::vector<std::string>* optional_parameters_out); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MediaDrmBridgeDelegate); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_ |