Bug 1288821 - Convert callObserver/removeObserver to native method; r=snorp
Combine the callObserver and removeObserver methods used for notifying alert listeners into the native method GeckoAppShell.notifyAlertListener. Keep track of the listener and the alert cookie on the native side so that we don't need GeckoAppShell.ALERT_COOKIES anymore.
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
#endif
|
||||
|
||||
#include "AndroidAlerts.h"
|
||||
#include "ANRReporter.h"
|
||||
#include "GeckoNetworkManager.h"
|
||||
#include "GeckoScreenOrientation.h"
|
||||
@@ -322,6 +323,17 @@ public:
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void NotifyAlertListener(jni::String::Param aName,
|
||||
jni::String::Param aTopic)
|
||||
{
|
||||
if (!aName || !aTopic) {
|
||||
return;
|
||||
}
|
||||
|
||||
AndroidAlerts::NotifyListener(
|
||||
aName->ToString(), aTopic->ToCString().get());
|
||||
}
|
||||
};
|
||||
|
||||
nsAppShell::nsAppShell()
|
||||
|
||||
Reference in New Issue
Block a user