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

Side by Side Diff: media/base/android/java/src/org/chromium/media/DialogSurfaceCallback.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 org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace;
9
10 /**
11 * Callback helper for native. This works with our JNI implementation to hop
watk 2016/06/10 21:46:38 Maybe a naive question, but I wonder if you consid
liberato (no reviews please) 2016/06/10 22:50:05 unfortunately, i don't think that will work. in o
12 * to the right thread for callbacks, and handle async deletion of the native
13 * object. This isn't a wrapper because it's only used for native, and it's
watk 2016/06/10 21:46:38 Probably could delete the wrapper comment since it
liberato (no reviews please) 2016/06/10 22:50:05 Done.
14 * always created locally with respect to the JNI calls. There's no need to
15 * wrap a remote instance for JNI.
16 */
17 @JNINamespace("media")
18 class DialogSurfaceCallback extends IDialogSurfaceCallback.Stub {
19 private final long mNativeId;
20
21 public DialogSurfaceCallback(long nativeId) {
22 mNativeId = nativeId;
23 }
24
25 @CalledByNative
26 public static DialogSurfaceCallback create(long nativeId) {
27 return new DialogSurfaceCallback(nativeId);
28 }
29
30 @Override
31 public void onCallback(int what) {
32 nativeOnDialogSurfaceCallbackCallback(mNativeId, what);
33 }
34
35 private static native void nativeOnDialogSurfaceCallbackCallback(long id, in t what);
36 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698