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

Unified Diff: components/cdm/browser/widevine_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: components/cdm/browser/widevine_drm_delegate_android.h
diff --git a/components/cdm/browser/widevine_drm_delegate_android.h b/components/cdm/browser/widevine_drm_delegate_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..5652a923d6a6dcf97cd1b46f8d9ab24f73672d7f
--- /dev/null
+++ b/components/cdm/browser/widevine_drm_delegate_android.h
@@ -0,0 +1,37 @@
+// 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 COMPONENTS_CDM_BROWSER_WIDEVINE_DRM_DELEGATE_ANDROID_H_
+#define COMPONENTS_CDM_BROWSER_WIDEVINE_DRM_DELEGATE_ANDROID_H_
+
+#include "base/macros.h"
+#include "media/base/android/media_drm_bridge.h"
+
+namespace cdm {
+
+class WidevineDrmDelegateAndroid : public media::MediaDrmBridge::Delegate {
+ public:
+ // Installs WidevineDrmDelegateAndroid into MediaDrmBridge, associated with
+ // |kWidevineKeySystem|.
+ static void Install();
+
+ private:
+ WidevineDrmDelegateAndroid();
+ ~WidevineDrmDelegateAndroid() 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(WidevineDrmDelegateAndroid);
+};
+
+} // namespace cdm
+
+#endif // COMPONENTS_CDM_BROWSER_WIDEVINE_DRM_DELEGATE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698