Bug 722661 - Part 5: Miscellaneous fixes. r=mfinkle

This commit is contained in:
Brian Nicholson 2012-10-29 16:34:29 -07:00
Родитель cb554bb2d5
Коммит 649ceaec25
3 изменённых файлов: 13 добавлений и 15 удалений

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

@ -217,10 +217,6 @@ abstract public class BrowserApp extends GeckoApp
mFindInPageBar = (FindInPageBar) findViewById(R.id.find_in_page);
if (savedInstanceState != null) {
mBrowserToolbar.setTitle(savedInstanceState.getString(SAVED_STATE_TITLE));
}
registerEventListener("CharEncoding:Data");
registerEventListener("CharEncoding:State");
registerEventListener("Feedback:LastUrl");
@ -271,9 +267,12 @@ abstract public class BrowserApp extends GeckoApp
// show about:home if we aren't restoring previous session
if (mRestoreMode == RESTORE_NONE) {
Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB);
} else {
hideAboutHome();
}
} else {
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED);
int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED;
Tabs.getInstance().loadUrl(uri, flags);
}
}
@ -634,6 +633,7 @@ abstract public class BrowserApp extends GeckoApp
if (mAboutHomeShowing != null && !mAboutHomeShowing)
return;
mBrowserToolbar.setShadowVisibility(true);
mAboutHomeShowing = false;
Runnable r = new AboutHomeRunnable(false);
mMainHandler.postAtFrontOfQueue(r);
@ -646,7 +646,6 @@ abstract public class BrowserApp extends GeckoApp
}
public void run() {
mFormAssistPopup.hide();
if (mShow) {
if (mAboutHomeContent == null) {
mAboutHomeContent = (AboutHomeContent) findViewById(R.id.abouthome_content);

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

@ -142,7 +142,6 @@ abstract public class GeckoApp
public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
public static final String ACTION_WIDGET = "org.mozilla.gecko.WIDGET";
public static final String SAVED_STATE_TITLE = "title";
public static final String SAVED_STATE_IN_BACKGROUND = "inBackground";
public static final String SAVED_STATE_PRIVATE_SESSION = "privateSession";
@ -701,10 +700,6 @@ abstract public class GeckoApp
if (outState == null)
outState = new Bundle();
Tab tab = Tabs.getInstance().getSelectedTab();
if (tab != null)
outState.putString(SAVED_STATE_TITLE, tab.getDisplayTitle());
boolean inBackground =
((GeckoApplication)getApplication()).isApplicationInBackground();
@ -719,9 +714,11 @@ abstract public class GeckoApp
}
if (tab.getState() == Tab.STATE_DELAYED) {
if (tab.getURL() != null) {
byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL());
if (thumbnail != null)
processThumbnail(tab, null, thumbnail);
}
return;
}

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

@ -259,7 +259,9 @@ public class Tab {
mTitle = (title == null ? "" : title);
if (mUrl != null)
updateHistory(mUrl, mTitle);
Tabs.getInstance().notifyListeners(this, Tabs.TabEvents.TITLE);
}