Bug 1286662 - Remove network events from GeckoEvent; r=snorp

Remove the now-obsolete network events from GeckoEvent.
This commit is contained in:
Jim Chen 2016-07-20 21:44:48 -04:00
Родитель dbd23e2934
Коммит deae801637
4 изменённых файлов: 0 добавлений и 76 удалений

Просмотреть файл

@ -68,14 +68,12 @@ public class GeckoEvent {
MOTION_EVENT(2),
NOOP(15),
VIEWPORT(20),
NETWORK_CHANGED(22),
THUMBNAIL(25),
SCREENORIENTATION_CHANGED(27),
NATIVE_GESTURE_EVENT(31),
CALL_OBSERVER(33),
REMOVE_OBSERVER(34),
LOW_MEMORY(35),
NETWORK_LINK_CHANGE(36),
TELEMETRY_HISTOGRAM_ADD(37),
TELEMETRY_UI_SESSION_START(42),
TELEMETRY_UI_SESSION_STOP(43),
@ -125,10 +123,6 @@ public class GeckoEvent {
private String mCharactersExtra;
private String mData;
private int mConnectionType;
private boolean mIsWifi;
private int mDHCPGateway;
private short mScreenOrientation;
private short mScreenAngle;
@ -350,15 +344,6 @@ public class GeckoEvent {
return event;
}
public static GeckoEvent createNetworkEvent(int connectionType, boolean isWifi, int DHCPGateway, String status) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.NETWORK_CHANGED);
event.mConnectionType = connectionType;
event.mIsWifi = isWifi;
event.mDHCPGateway = DHCPGateway;
event.mCharacters = status;
return event;
}
public static GeckoEvent createThumbnailEvent(int tabId, int bufw, int bufh, ByteBuffer buffer) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.THUMBNAIL);
event.mPoints = new Point[1];
@ -406,12 +391,6 @@ public class GeckoEvent {
return event;
}
public static GeckoEvent createNetworkLinkChangeEvent(String status) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.NETWORK_LINK_CHANGE);
event.mCharacters = status;
return event;
}
public static GeckoEvent createTelemetryHistogramAddEvent(String histogram,
int value) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.TELEMETRY_HISTOGRAM_ADD);

Просмотреть файл

@ -39,9 +39,6 @@ jfieldID AndroidGeckoEvent::jMetaStateField = 0;
jfieldID AndroidGeckoEvent::jFlagsField = 0;
jfieldID AndroidGeckoEvent::jCountField = 0;
jfieldID AndroidGeckoEvent::jPointerIndexField = 0;
jfieldID AndroidGeckoEvent::jConnectionTypeField = 0;
jfieldID AndroidGeckoEvent::jIsWifiField = 0;
jfieldID AndroidGeckoEvent::jDHCPGatewayField = 0;
jfieldID AndroidGeckoEvent::jScreenOrientationField = 0;
jfieldID AndroidGeckoEvent::jScreenAngleField = 0;
jfieldID AndroidGeckoEvent::jByteBufferField = 0;
@ -112,9 +109,6 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
jFlagsField = geckoEvent.getField("mFlags", "I");
jCountField = geckoEvent.getField("mCount", "I");
jPointerIndexField = geckoEvent.getField("mPointerIndex", "I");
jConnectionTypeField = geckoEvent.getField("mConnectionType", "I");
jIsWifiField = geckoEvent.getField("mIsWifi", "Z");
jDHCPGatewayField = geckoEvent.getField("mDHCPGateway", "I");
jScreenOrientationField = geckoEvent.getField("mScreenOrientation", "S");
jScreenAngleField = geckoEvent.getField("mScreenAngle", "S");
jByteBufferField = geckoEvent.getField("mBuffer", "Ljava/nio/ByteBuffer;");
@ -320,13 +314,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
break;
}
case NETWORK_CHANGED: {
mConnectionType = jenv->GetIntField(jobj, jConnectionTypeField);
mIsWifi = jenv->GetBooleanField(jobj, jIsWifiField);
mDHCPGateway = jenv->GetIntField(jobj, jDHCPGatewayField);
break;
}
case THUMBNAIL: {
mMetaState = jenv->GetIntField(jobj, jMetaStateField);
ReadPointArray(mPoints, jenv, jPoints, 1);
@ -365,11 +352,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
break;
}
case NETWORK_LINK_CHANGE: {
ReadCharactersField(jenv);
break;
}
case TELEMETRY_HISTOGRAM_ADD: {
ReadCharactersField(jenv);
ReadCharactersExtraField(jenv);

Просмотреть файл

@ -479,9 +479,6 @@ public:
int Flags() { return mFlags; }
int Count() { return mCount; }
int PointerIndex() { return mPointerIndex; }
int ConnectionType() { return mConnectionType; }
bool IsWifi() { return mIsWifi; }
int DHCPGateway() { return mDHCPGateway; }
short ScreenOrientation() { return mScreenOrientation; }
short ScreenAngle() { return mScreenAngle; }
RefCountedJavaObject* ByteBuffer() { return mByteBuffer; }
@ -519,9 +516,6 @@ protected:
double mX, mY, mZ, mW;
int mPointerIndex;
nsString mCharacters, mCharactersExtra, mData;
int mConnectionType;
bool mIsWifi;
int mDHCPGateway;
short mScreenOrientation;
short mScreenAngle;
RefPtr<RefCountedJavaObject> mByteBuffer;
@ -583,10 +577,6 @@ protected:
static jfieldID jCountField;
static jfieldID jPointerIndexField;
static jfieldID jConnectionTypeField;
static jfieldID jIsWifiField;
static jfieldID jDHCPGatewayField;
static jfieldID jScreenOrientationField;
static jfieldID jScreenAngleField;
static jfieldID jByteBufferField;
@ -607,14 +597,12 @@ public:
NOOP = 15,
APZ_INPUT_EVENT = 17, // used internally in AndroidJNI/nsAppShell/nsWindow
VIEWPORT = 20,
NETWORK_CHANGED = 22,
THUMBNAIL = 25,
SCREENORIENTATION_CHANGED = 27,
NATIVE_GESTURE_EVENT = 31,
CALL_OBSERVER = 33,
REMOVE_OBSERVER = 34,
LOW_MEMORY = 35,
NETWORK_LINK_CHANGE = 36,
TELEMETRY_HISTOGRAM_ADD = 37,
ADD_OBSERVER = 38,
TELEMETRY_UI_SESSION_START = 42,

Просмотреть файл

@ -23,7 +23,6 @@
#include "nsIDOMClientRect.h"
#include "nsIDOMWakeLockListener.h"
#include "nsIPowerManagerService.h"
#include "nsINetworkLinkService.h"
#include "nsISpeculativeConnect.h"
#include "nsIURIFixup.h"
#include "nsCategoryManagerUtils.h"
@ -804,19 +803,6 @@ nsAppShell::LegacyGeckoEvent::Run()
break;
}
case AndroidGeckoEvent::NETWORK_CHANGED: {
hal::NotifyNetworkChange(hal::NetworkInformation(curEvent->ConnectionType(),
curEvent->IsWifi(),
curEvent->DHCPGateway()));
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os) {
os->NotifyObservers(nullptr,
NS_NETWORK_LINK_TYPE_TOPIC,
nsString(curEvent->Characters()).get());
}
break;
}
case AndroidGeckoEvent::SCREENORIENTATION_CHANGED: {
nsresult rv;
nsCOMPtr<nsIScreenManager> screenMgr =
@ -880,17 +866,6 @@ nsAppShell::LegacyGeckoEvent::Run()
}
break;
case AndroidGeckoEvent::NETWORK_LINK_CHANGE:
{
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
if (os) {
os->NotifyObservers(nullptr,
NS_NETWORK_LINK_TOPIC,
curEvent->Characters().get());
}
break;
}
case AndroidGeckoEvent::TELEMETRY_HISTOGRAM_ADD:
// If the extras field is not empty then this is a keyed histogram.
if (!curEvent->CharactersExtra().IsVoid()) {