Bug 576381 - Avoid accessing AndroidBridge in child process, r=vlad

--HG--
extra : rebase_source : 83584ed9a829b43976d05c15e860cef88141716c
This commit is contained in:
Michael Wu 2010-07-16 11:24:42 -07:00
Родитель 39a7d1025e
Коммит 37e96a1c87
2 изменённых файлов: 14 добавлений и 0 удалений

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

@ -37,6 +37,7 @@
#include "nsOSHelperAppService.h"
#include "nsMIMEInfoAndroid.h"
#include "AndroidBridge.h"
nsOSHelperAppService::nsOSHelperAppService() : nsExternalHelperAppService()
{
@ -51,6 +52,10 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType,
const nsACString& aFileExt,
PRBool* aFound)
{
// XXX Bug 579388 - need to remote this
if (!mozilla::AndroidBridge::Bridge())
return nsnull;
*aFound = PR_FALSE;
already_AddRefed<nsIMIMEInfo> mimeInfo =
nsMIMEInfoAndroid::GetMimeInfoForMimeType(aMIMEType);

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

@ -478,6 +478,9 @@ nsWindow::SetFocus(PRBool aRaise)
ALOG("nsWindow::SetFocus: can't set focus without raising, ignoring aRaise = false!");
gFocusedWindow = this;
if (!AndroidBridge::Bridge())
return NS_OK;
FindTopLevel()->BringToFront();
return NS_OK;
@ -578,6 +581,9 @@ nsWindow::GetThebesSurface()
void
nsWindow::OnGlobalAndroidEvent(AndroidGeckoEvent *ae)
{
if (!AndroidBridge::Bridge())
return;
switch (ae->Type()) {
case AndroidGeckoEvent::SIZE_CHANGED: {
int nw = ae->P0().x;
@ -655,6 +661,9 @@ nsWindow::OnGlobalAndroidEvent(AndroidGeckoEvent *ae)
void
nsWindow::OnAndroidEvent(AndroidGeckoEvent *ae)
{
if (!AndroidBridge::Bridge())
return;
switch (ae->Type()) {
case AndroidGeckoEvent::DRAW:
OnDraw(ae);