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

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

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 3 years, 10 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
10 import org.chromium.base.annotations.CalledByNative;
11 import org.chromium.base.annotations.JNINamespace;
12
13 /**
14 * Wrapper for IAndroidOverlayProvider, to provide JNI bindings for arbitrary
15 * implementations of IAndroidOverlayProvider. In practice, there is one: the
16 * IBinder stub we get from the browser. However, if one creates a local
17 * provider such as in the GPU process, then this will work too.
18 *
19 * When one gets an IAndroidOverlayProvider, whether remote from the browser or
20 * local (if supported), it can be used by native classes by wrapping it in a
21 * AndroidOverlayProviderWrapper instance.
22 *
23 * Note that all of that is wrapped in the C++ bindings for this class, so see
24 * the docs in android_overlay_provider.h if you'd like to use this in C++.
25 * There's no need to use it in Java.
26 */
27 @JNINamespace("media")
28 class AndroidOverlayProviderProxy {
29 private final IAndroidOverlayProvider mProvider;
30
31 private AndroidOverlayProviderProxy(IAndroidOverlayProvider provider) {
32 mProvider = provider;
33 }
34
35 @CalledByNative
36 private static AndroidOverlayProviderProxy wrap(IBinder provider) {
37 return new AndroidOverlayProviderProxy(IAndroidOverlayProvider.Stub.asIn terface(provider));
38 }
39
40 @CalledByNative
41 public IAndroidOverlay createOverlay(int rendererPid, int renderFrameId,
42 IAndroidOverlayCallback callback, int x, int y, int width, int heigh t)
43 throws RemoteException {
boliu 2017/02/08 00:01:59 any exception thrown by @CalledByNative methods wi
44 return mProvider.createOverlay(rendererPid, renderFrameId, callback, x, y, width, height);
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698