| Index: media/base/android/java/src/org/chromium/media/DialogSurfaceHolderWrapper.java
|
| diff --git a/media/base/android/java/src/org/chromium/media/DialogSurfaceHolderWrapper.java b/media/base/android/java/src/org/chromium/media/DialogSurfaceHolderWrapper.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f84d126a7992d91bf327b1afcff19787dd6b9a03
|
| --- /dev/null
|
| +++ b/media/base/android/java/src/org/chromium/media/DialogSurfaceHolderWrapper.java
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2016 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.media;
|
| +
|
| +import android.os.IBinder;
|
| +import android.os.RemoteException;
|
| +import android.view.Surface;
|
| +
|
| +import org.chromium.base.annotations.CalledByNative;
|
| +import org.chromium.base.annotations.JNINamespace;
|
| +
|
| +/**
|
| + * Wrapper for IDialogSurfaceHolder for JNI bindings.
|
| + *
|
| + * Makes any implementation of IDialogSurface accessible through JNI.
|
| + * Doesn't have to implement IDialogSurface, except that it's an easy
|
| + * way to keep the interface in sync.
|
| + */
|
| +@JNINamespace("media")
|
| +class DialogSurfaceHolderWrapper implements IDialogSurfaceHolder {
|
| + private final IDialogSurfaceHolder mDialogSurfaceHolder;
|
| +
|
| + public DialogSurfaceHolderWrapper(IDialogSurfaceHolder holder) {
|
| + mDialogSurfaceHolder = holder;
|
| + }
|
| +
|
| + @CalledByNative
|
| + private static DialogSurfaceHolderWrapper wrap(IDialogSurfaceHolder holder) {
|
| + return new DialogSurfaceHolderWrapper(holder);
|
| + }
|
| +
|
| + @Override
|
| + @CalledByNative
|
| + public void release() throws RemoteException {
|
| + mDialogSurfaceHolder.release();
|
| + }
|
| +
|
| + @Override
|
| + @CalledByNative
|
| + public Surface getSurface() throws RemoteException {
|
| + return mDialogSurfaceHolder.getSurface();
|
| + }
|
| +
|
| + @Override
|
| + @CalledByNative
|
| + public void scheduleLayoutSurface(final int x, final int y, final int width, final int height)
|
| + throws RemoteException {
|
| + mDialogSurfaceHolder.scheduleLayoutSurface(x, y, width, height);
|
| + }
|
| +
|
| + @Override
|
| + public IBinder asBinder() {
|
| + return null;
|
| + }
|
| +}
|
|
|