mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 733896 - Together with 580381e2805c, this completely backs out b520f34d78f1 and 4f5bd60be09e. r=ehsan
This commit is contained in:
parent
2edc6422b3
commit
e936e2d7ac
@ -334,9 +334,4 @@ public class GeckoEvent {
|
||||
mBandwidth = bandwidth;
|
||||
mCanBeMetered = canBeMetered;
|
||||
}
|
||||
|
||||
public void doCallback(String json) {
|
||||
// this stub is never called in XUL Fennec, but we need it so that the JNI code
|
||||
// shared between XUL and Native Fennec doesn't die.
|
||||
}
|
||||
}
|
||||
|
@ -63,10 +63,6 @@ import android.util.Log;
|
||||
*/
|
||||
|
||||
public class GeckoEvent {
|
||||
public interface Callback {
|
||||
public void callback(GeckoEvent event, String jsonData);
|
||||
}
|
||||
|
||||
private static final String LOGTAG = "GeckoEvent";
|
||||
|
||||
private static final int INVALID = -1;
|
||||
@ -142,8 +138,6 @@ public class GeckoEvent {
|
||||
|
||||
public int mNativeWindow;
|
||||
|
||||
Callback mCallback;
|
||||
|
||||
private GeckoEvent(int evType) {
|
||||
mType = evType;
|
||||
}
|
||||
@ -422,10 +416,4 @@ public class GeckoEvent {
|
||||
event.mMetaState = tabId;
|
||||
return event;
|
||||
}
|
||||
|
||||
public void doCallback(String jsonData) {
|
||||
if (mCallback != null) {
|
||||
mCallback.callback(this, jsonData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,6 @@ jfieldID AndroidGeckoEvent::jLocationField = 0;
|
||||
jfieldID AndroidGeckoEvent::jAddressField = 0;
|
||||
jfieldID AndroidGeckoEvent::jBandwidthField = 0;
|
||||
jfieldID AndroidGeckoEvent::jCanBeMeteredField = 0;
|
||||
jmethodID AndroidGeckoEvent::jDoCallbackMethod = 0;
|
||||
|
||||
jclass AndroidPoint::jPointClass = 0;
|
||||
jfieldID AndroidPoint::jXField = 0;
|
||||
@ -208,8 +207,6 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
|
||||
jAddressField = getField("mAddress", "Landroid/location/Address;");
|
||||
jBandwidthField = getField("mBandwidth", "D");
|
||||
jCanBeMeteredField = getField("mCanBeMetered", "Z");
|
||||
|
||||
jDoCallbackMethod = getMethod("doCallback", "(Ljava/lang/String;)V");
|
||||
}
|
||||
|
||||
void
|
||||
@ -488,16 +485,6 @@ AndroidGeckoEvent::Init(int aType, nsIntRect const& aRect)
|
||||
mRect = aRect;
|
||||
}
|
||||
|
||||
AndroidGeckoEvent::~AndroidGeckoEvent() {
|
||||
if (!wrapped_obj)
|
||||
return;
|
||||
|
||||
JNIEnv *jenv = GetJNIForThread();
|
||||
if (!jenv)
|
||||
return;
|
||||
jenv->DeleteGlobalRef(wrapped_obj);
|
||||
}
|
||||
|
||||
void
|
||||
AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
|
||||
{
|
||||
@ -508,8 +495,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
|
||||
if (!jobj)
|
||||
return;
|
||||
|
||||
jenv->NewGlobalRef(jobj);
|
||||
|
||||
mAction = jenv->GetIntField(jobj, jActionField);
|
||||
mType = jenv->GetIntField(jobj, jTypeField);
|
||||
|
||||
@ -670,15 +655,6 @@ AndroidPoint::Init(JNIEnv *jenv, jobject jobj)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AndroidGeckoEvent::DoCallback(const nsAString& data) {
|
||||
JNIEnv* env = AndroidBridge::GetJNIEnv();
|
||||
if (!env)
|
||||
return;
|
||||
jstring jData = env->NewString(nsPromiseFlatString(data).get(), data.Length());
|
||||
env->CallVoidMethod(wrapped_obj, jDoCallbackMethod, jData);
|
||||
}
|
||||
|
||||
void
|
||||
AndroidGeckoLayerClient::Init(jobject jobj)
|
||||
{
|
||||
|
@ -495,8 +495,6 @@ public:
|
||||
Init(aResizeEvent);
|
||||
}
|
||||
|
||||
~AndroidGeckoEvent();
|
||||
|
||||
void Init(JNIEnv *jenv, jobject jobj);
|
||||
void Init(int aType);
|
||||
void Init(int x1, int y1, int x2, int y2);
|
||||
@ -536,7 +534,6 @@ public:
|
||||
nsGeoPositionAddress* GeoAddress() { return mGeoAddress; }
|
||||
double Bandwidth() { return mBandwidth; }
|
||||
bool CanBeMetered() { return mCanBeMetered; }
|
||||
void DoCallback(const nsAString& data);
|
||||
|
||||
protected:
|
||||
int mAction;
|
||||
@ -616,8 +613,6 @@ protected:
|
||||
|
||||
static jfieldID jBandwidthField;
|
||||
static jfieldID jCanBeMeteredField;
|
||||
|
||||
static jmethodID jDoCallbackMethod;
|
||||
|
||||
public:
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user