Bug 582644 - IME event remoting, patch for android; r=blassey, blocking-fennec=2.0a1+
This commit is contained in:
@@ -37,7 +37,10 @@
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
#include <prthread.h>
|
||||
#include "nsXPCOMStrings.h"
|
||||
@@ -192,8 +195,12 @@ AndroidBridge::NotifyIME(int aType, int aState)
|
||||
if (sBridge)
|
||||
JNI()->CallStaticVoidMethod(sBridge->mGeckoAppShellClass,
|
||||
sBridge->jNotifyIME, aType, aState);
|
||||
else
|
||||
#ifdef MOZ_IPC
|
||||
// It's possible that we are in chrome process
|
||||
// but sBridge is not initialized yet
|
||||
else if (XRE_GetProcessType() == GeckoProcessType_Content)
|
||||
mozilla::dom::ContentChild::GetSingleton()->SendNotifyIME(aType, aState);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -201,9 +208,11 @@ AndroidBridge::NotifyIMEChange(const PRUnichar *aText, PRUint32 aTextLen,
|
||||
int aStart, int aEnd, int aNewEnd)
|
||||
{
|
||||
if (!sBridge) {
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::ContentChild::GetSingleton()->
|
||||
SendNotifyIMEChange(nsAutoString(aText), aTextLen,
|
||||
aStart, aEnd, aNewEnd);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user