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

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: cleanup Created 4 years, 4 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
12 * to the right thread for callbacks, and handle async deletion of the native
13 * object. It directly implemens the aidl interface also.
14 */
15 @JNINamespace("media")
16 class DialogSurfaceCallback extends IDialogSurfaceCallback.Stub {
17 private final long mNativeId;
18
19 public DialogSurfaceCallback(long nativeId) {
20 mNativeId = nativeId;
21 }
22
23 @CalledByNative
24 public static DialogSurfaceCallback create(long nativeId) {
25 return new DialogSurfaceCallback(nativeId);
26 }
27
28 @Override
29 public void onCallback(int what) {
30 nativeOnDialogSurfaceCallbackCallback(mNativeId, what);
31 }
32
33 private static native void nativeOnDialogSurfaceCallbackCallback(long id, in t what);
34 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698