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

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

Issue 1967553002: DO NOT COMMIT - DialogSurface initial implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added check for gpu process for dialog surface manager. Created 4 years, 6 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 IDialogSurfaceController for JNI bindings.
16 *
17 * Makes any implementation of IDialogSurfaceController accessible through JNI.
18 * Doesn't have to implement IDialogSurfaceController, except that it's an easy
19 * way to keep the interface in sync.
20 */
21 @JNINamespace("media")
22 class DialogSurfaceControllerWrapper implements IDialogSurfaceController {
23 private final IDialogSurfaceController mController;
24
25 public DialogSurfaceControllerWrapper(IDialogSurfaceController controller) {
26 mController = controller;
27 }
28
29 @CalledByNative
30 private static DialogSurfaceControllerWrapper wrap(IDialogSurfaceController controller) {
31 return new DialogSurfaceControllerWrapper(controller);
32 }
33
34 @Override
35 @CalledByNative
36 public void release() throws RemoteException {
37 mController.release();
38 }
39
40 @Override
41 @CalledByNative
42 public Surface getSurface() throws RemoteException {
43 return mController.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 mController.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