зеркало из https://github.com/mozilla/pjs.git
Bug 576381 - Avoid accessing AndroidBridge in child process, r=vlad
--HG-- extra : rebase_source : 83584ed9a829b43976d05c15e860cef88141716c
This commit is contained in:
Родитель
39a7d1025e
Коммит
37e96a1c87
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче