forked from CinemaMod/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCefRegistration_N.java
More file actions
33 lines (26 loc) · 880 Bytes
/
CefRegistration_N.java
File metadata and controls
33 lines (26 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2024 The Chromium Embedded Framework 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.cef.browser;
import org.cef.callback.CefNative;
class CefRegistration_N extends CefRegistration implements CefNative {
// Used internally to store a pointer to the CEF object.
private long N_CefHandle = 0;
@Override
public void setNativeRef(String identifier, long nativeRef) {
N_CefHandle = nativeRef;
}
@Override
public long getNativeRef(String identifier) {
return N_CefHandle;
}
@Override
public void dispose() {
try {
N_Dispose(N_CefHandle);
} catch (UnsatisfiedLinkError ule) {
ule.printStackTrace();
}
}
private final native void N_Dispose(long self);
}