OLD | NEW |
---|---|
(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.RemoteException; | |
8 | |
9 import org.chromium.base.annotations.CalledByNative; | |
10 import org.chromium.base.annotations.JNINamespace; | |
11 | |
12 /** | |
13 * Wrapper for IAndroidOverlay for JNI bindings. | |
14 * | |
15 * Makes any implementation of IAndroidOverlay accessible through JNI. | |
16 */ | |
17 @JNINamespace("media") | |
18 class AndroidOverlayProxy { | |
19 private final IAndroidOverlay mAndroidOverlay; | |
20 | |
21 private AndroidOverlayProxy(IAndroidOverlay overlay) { | |
22 mAndroidOverlay = overlay; | |
23 } | |
24 | |
25 @CalledByNative | |
26 private static AndroidOverlayProxy wrap(IAndroidOverlay overlay) { | |
27 return new AndroidOverlayProxy(overlay); | |
28 } | |
29 | |
30 @CalledByNative | |
31 public void release() { | |
boliu
2017/02/08 00:01:59
private here and below
| |
32 try { | |
33 mAndroidOverlay.release(); | |
34 } catch (RemoteException e) { | |
35 } | |
36 } | |
37 | |
38 @CalledByNative | |
39 public void scheduleLayoutSurface(final int x, final int y, final int width, final int height) | |
40 throws RemoteException { | |
41 mAndroidOverlay.scheduleLayoutSurface(x, y, width, height); | |
42 } | |
43 } | |
OLD | NEW |