Bug 764621: FormAssistant doesn't need to be static. [r=margaret]

--HG--
extra : rebase_source : acd7d1b0a2ce7825b4ba8c150d43ef9a98dc48fd
This commit is contained in:
Sriram Ramasubramanian 2012-06-14 11:54:05 -07:00
Родитель 012dd97dc1
Коммит 72dea6b6d3
3 изменённых файлов: 9 добавлений и 6 удалений

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

@ -105,7 +105,7 @@ abstract public class GeckoApp
private PromptService mPromptService;
public static DoorHangerPopup mDoorHangerPopup;
public static FormAssistPopup mFormAssistPopup;
protected FormAssistPopup mFormAssistPopup;
public TabsPanel mTabsPanel;
public Favicons mFavicons;
@ -924,6 +924,11 @@ abstract public class GeckoApp
public boolean areTabsShown() { return false; }
public void hideFormAssistPopup() {
if (mFormAssistPopup != null)
mFormAssistPopup.hide();
}
public void handleMessage(String event, JSONObject message) {
Log.i(LOGTAG, "Got message: " + event);
try {
@ -2222,8 +2227,7 @@ abstract public class GeckoApp
if (mOrientation != newConfig.orientation) {
mOrientation = newConfig.orientation;
if (mFormAssistPopup != null)
mFormAssistPopup.hide();
hideFormAssistPopup();
SiteIdentityPopup.getInstance().dismiss();
refreshChrome();
}

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

@ -99,7 +99,7 @@ public class Tabs implements GeckoEventListener {
selectedTab = tab;
GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
public void run() {
GeckoApp.mFormAssistPopup.hide();
GeckoApp.mAppContext.hideFormAssistPopup();
if (isSelectedTab(tab)) {
String url = tab.getURL();
notifyListeners(tab, TabEvents.SELECTED);

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

@ -84,8 +84,7 @@ public class LayerView extends SurfaceView implements SurfaceHolder.Callback {
requestFocus();
/** We need to manually hide FormAssistPopup because it is not a regular PopupWindow. */
if (GeckoApp.mFormAssistPopup != null)
GeckoApp.mFormAssistPopup.hide();
GeckoApp.mAppContext.hideFormAssistPopup();
return mTouchEventHandler.handleEvent(event);
}