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

Unified Diff: chromecast/media/cdm/playready_drm_delegate_android.h

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up code, implement actual Delegates for Widevine (Android) and Chromecast Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/media/cdm/playready_drm_delegate_android.h
diff --git a/chromecast/media/cdm/playready_drm_delegate_android.h b/chromecast/media/cdm/playready_drm_delegate_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f42a6cc9454041035cc1e019e59cc7cd3432f82
--- /dev/null
+++ b/chromecast/media/cdm/playready_drm_delegate_android.h
@@ -0,0 +1,39 @@
+// 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 CHROMECAST_MEDIA_CDM_PLAYREADY_DRM_DELEGATE_ANDROID_H_
+#define CHROMECAST_MEDIA_CDM_PLAYREADY_DRM_DELEGATE_ANDROID_H_
+
+#include "base/macros.h"
+#include "media/base/android/media_drm_bridge.h"
+
+namespace chromecast {
+namespace media {
+
+class PlayreadyDrmDelegateAndroid : public ::media::MediaDrmBridge::Delegate {
+ public:
+ // Installs PlayreadyDrmDelegateAndroid into MediaDrmBridge, associated with
+ // com.chromecast.playready.
+ static void Install();
+
+ private:
+ PlayreadyDrmDelegateAndroid();
+ ~PlayreadyDrmDelegateAndroid() override;
+
+ // ::media::MediaDrmBridge::Delegate implementation:
+ bool OnCreateSession(
+ const ::media::EmeInitDataType init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ std::vector<uint8>& init_data_out,
+ std::vector<std::string>& optional_parameters_out) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PlayreadyDrmDelegateAndroid);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CDM_PLAYREADY_DRM_DELEGATE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698