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

Side by Side Diff: media/base/android/java/src/org/chromium/media/DialogSurfaceHolderWrapper.java

Issue 2220623002: DialogSurfaceHolder implementation. Base URL: https://chromium.googlesource.com/chromium/src.git@just_surface_manager
Patch Set: panel => media dialog type Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.media;
6
7 import android.os.IBinder;
8 import android.os.RemoteException;
9 import android.view.Surface;
10
11 import org.chromium.base.annotations.CalledByNative;
12 import org.chromium.base.annotations.JNINamespace;
13
14 /**
15 * Wrapper for IDialogSurfaceHolder for JNI bindings.
16 *
17 * Makes any implementation of IDialogSurface accessible through JNI.
18 * Doesn't have to implement IDialogSurface, except that it's an easy
19 * way to keep the interface in sync.
20 */
21 @JNINamespace("media")
22 class DialogSurfaceHolderWrapper implements IDialogSurfaceHolder {
23 private final IDialogSurfaceHolder mDialogSurfaceHolder;
24
25 public DialogSurfaceHolderWrapper(IDialogSurfaceHolder holder) {
26 mDialogSurfaceHolder = holder;
27 }
28
29 @CalledByNative
30 private static DialogSurfaceHolderWrapper wrap(IDialogSurfaceHolder holder) {
31 return new DialogSurfaceHolderWrapper(holder);
32 }
33
34 @Override
35 @CalledByNative
36 public void release() throws RemoteException {
37 mDialogSurfaceHolder.release();
38 }
39
40 @Override
41 @CalledByNative
42 public Surface getSurface() throws RemoteException {
43 return mDialogSurfaceHolder.getSurface();
44 }
45
46 @Override
47 @CalledByNative
48 public void scheduleLayoutSurface(final int x, final int y, final int width, final int height)
49 throws RemoteException {
50 mDialogSurfaceHolder.scheduleLayoutSurface(x, y, width, height);
51 }
52
53 @Override
54 public IBinder asBinder() {
55 return null;
56 }
57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698