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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/GpuProcessCallback.java

Issue 2760093002: Making callbacks in Android ChildProcessLauncher generic. (Closed)
Patch Set: Synced Created 3 years, 9 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 2017 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.content.browser;
6
7 import android.view.Surface;
8
9 import org.chromium.base.UnguessableToken;
10 import org.chromium.base.annotations.JNINamespace;
11 import org.chromium.content.common.IGpuProcessCallback;
12 import org.chromium.content.common.SurfaceWrapper;
13
14 @JNINamespace("content")
15 class GpuProcessCallback extends IGpuProcessCallback.Stub {
16 GpuProcessCallback() {}
17
18 @Override
19 public void forwardSurfaceForSurfaceRequest(UnguessableToken requestToken, S urface surface) {
20 nativeCompleteScopedSurfaceRequest(requestToken, surface);
21 }
22
23 @Override
24 public SurfaceWrapper getViewSurface(int surfaceId) {
25 Surface surface = nativeGetViewSurface(surfaceId);
26 if (surface == null) {
27 return null;
28 }
29 return new SurfaceWrapper(surface);
30 }
31
32 private static native void nativeCompleteScopedSurfaceRequest(
33 UnguessableToken requestToken, Surface surface);
34 private static native Surface nativeGetViewSurface(int surfaceId);
35 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698