mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-30 22:12:42 +08:00
Merging cxxbridge and bridge packages
Reviewed By: javache Differential Revision: D5027875 fbshipit-source-id: 47e081069d4219bdb29f63ce8a78c1f31a590da7
This commit is contained in:
committed by
Facebook Github Bot
parent
31a0b8788f
commit
8b53a2b29b
@@ -0,0 +1,31 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.NativeArray;
|
||||
|
||||
import static com.facebook.react.bridge.Arguments.*;
|
||||
|
||||
/**
|
||||
* Callback impl that calls directly into the cxx bridge. Created from C++.
|
||||
*/
|
||||
@DoNotStrip
|
||||
public class CxxCallbackImpl implements Callback {
|
||||
@DoNotStrip
|
||||
private final HybridData mHybridData;
|
||||
|
||||
@DoNotStrip
|
||||
private CxxCallbackImpl(HybridData hybridData) {
|
||||
mHybridData = hybridData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(Object... args) {
|
||||
nativeInvoke(fromJavaArgs(args));
|
||||
}
|
||||
|
||||
private native void nativeInvoke(NativeArray arguments);
|
||||
}
|
||||
Reference in New Issue
Block a user