MediaDrmCredentialManager.java revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
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 5package org.chromium.content.browser; 6 7import org.chromium.base.CalledByNative; 8import org.chromium.base.JNINamespace; 9 10/** 11 * A wrapper of the android MediaDrmCredentialManager 12 */ 13@JNINamespace("content") 14public 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") 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 */ 32 public static void resetCredentials(MediaDrmCredentialManagerCallback callback) { 33 nativeResetCredentials(callback); 34 } 35 36 private static native void nativeResetCredentials(MediaDrmCredentialManagerCallback callback); 37} 38