• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.content.browser;
6 
7 import org.chromium.base.CalledByNative;
8 import org.chromium.base.JNINamespace;
9 
10 /**
11  * A wrapper of the android MediaDrmCredentialManager
12  */
13 @JNINamespace("content")
14 public class MediaDrmCredentialManager {
15 
16     /**
17      * Callback interface for getting notified from credential reset.
18      */
19     public interface MediaDrmCredentialManagerCallback {
20         /**
21          * This method will be called when credential reset attempt is done.
22          * @param succeeded Whether or not it succeeded.
23          */
24         @CalledByNative("MediaDrmCredentialManagerCallback")
onCredentialResetFinished(boolean succeeded)25         public void onCredentialResetFinished(boolean succeeded);
26     }
27 
28     /**
29      * Attempts to reset the DRM credentials.
30      * @param callback It notifies whether or not it succeeded.
31      */
resetCredentials(MediaDrmCredentialManagerCallback callback)32     public static void resetCredentials(MediaDrmCredentialManagerCallback callback) {
33         nativeResetCredentials(callback);
34     }
35 
nativeResetCredentials(MediaDrmCredentialManagerCallback callback)36     private static native void nativeResetCredentials(MediaDrmCredentialManagerCallback callback);
37 }
38