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

Unified Diff: media/base/android/java/src/org/chromium/media/AndroidOverlayProxy.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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/java/src/org/chromium/media/AndroidOverlayProxy.java
diff --git a/media/base/android/java/src/org/chromium/media/AndroidOverlayProxy.java b/media/base/android/java/src/org/chromium/media/AndroidOverlayProxy.java
new file mode 100644
index 0000000000000000000000000000000000000000..8496d5ab6f8aef080c6556a6eb20cf8cb03895e2
--- /dev/null
+++ b/media/base/android/java/src/org/chromium/media/AndroidOverlayProxy.java
@@ -0,0 +1,43 @@
+// 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.RemoteException;
+
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * Wrapper for IAndroidOverlay for JNI bindings.
+ *
+ * Makes any implementation of IAndroidOverlay accessible through JNI.
+ */
+@JNINamespace("media")
+class AndroidOverlayProxy {
+ private final IAndroidOverlay mAndroidOverlay;
+
+ private AndroidOverlayProxy(IAndroidOverlay overlay) {
+ mAndroidOverlay = overlay;
+ }
+
+ @CalledByNative
+ private static AndroidOverlayProxy wrap(IAndroidOverlay overlay) {
+ return new AndroidOverlayProxy(overlay);
+ }
+
+ @CalledByNative
+ public void release() {
boliu 2017/02/08 00:01:59 private here and below
+ try {
+ mAndroidOverlay.release();
+ } catch (RemoteException e) {
+ }
+ }
+
+ @CalledByNative
+ public void scheduleLayoutSurface(final int x, final int y, final int width, final int height)
+ throws RemoteException {
+ mAndroidOverlay.scheduleLayoutSurface(x, y, width, height);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698