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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java

Issue 24152015: [Android] JNI binding for MediaDrmCredentialManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move constructor & destructor bodies to .cc Created 7 years, 3 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
« no previous file with comments | « content/content_jni.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java b/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..bdc82d1f86c92d2bf8b4189764bc1dabca7455ad
--- /dev/null
+++ b/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java
@@ -0,0 +1,38 @@
+// Copyright 2013 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.
+
+package org.chromium.content.browser;
+
+import org.chromium.base.CalledByNative;
+import org.chromium.base.JNINamespace;
+
+/**
+ * A wrapper of the android MediaDrmCredentialManager
+ */
+@JNINamespace("content")
+public class MediaDrmCredentialManager {
+ private int mNativeMediaDrmCredentialManager;
+
+ /**
+ * Callback interface for getting notified from credential reset.
+ */
+ public interface MediaDrmCredentialManagerCallback {
+ /**
+ * This method will be called when credential reset attempt is done.
+ * @param succeeded Whether or not it succeeded.
+ */
+ @CalledByNative("MediaDrmCredentialManagerCallback")
+ public void onCredentialResetFinished(boolean succeeded);
+ }
+
+ /**
+ * Attempts to reset the DRM credentials.
+ * @param callback It notifies whether or not it succeeded.
+ */
+ public static void resetCredentials(MediaDrmCredentialManagerCallback callback) {
+ nativeResetCredentials(callback);
+ }
+
+ private static native void nativeResetCredentials(MediaDrmCredentialManagerCallback callback);
+}
« no previous file with comments | « content/content_jni.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698