fix navscreen orientation
handle configuration change in navscreen
capture actual screen for tabs
size tabs correctly
Change-Id: I20ff72bdcab13678cdba4c55849bd5ff16cb6568
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 5498d6d..d1e1b0a 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -97,6 +97,7 @@
private static final String LOGTAG = "Controller";
private static final String SEND_APP_ID_EXTRA =
"android.speech.extras.SEND_APPLICATION_ID_EXTRA";
+ private static final String INCOGNITO_URI = "browser:incognito";
// public message ids
@@ -2222,7 +2223,6 @@
}
}
-
// This method does a ton of stuff. It will attempt to create a new tab
// if we haven't reached MAX_TABS. Otherwise it uses the current tab. If
// url isn't null, it will load the given url.
@@ -2261,7 +2261,21 @@
null, true);
addTab(tab);
setActiveTab(tab);
- loadUrlDataIn(tab, new UrlData("browser:incognito"));
+ loadUrlDataIn(tab, new UrlData(INCOGNITO_URI));
+ return tab;
+ } else {
+ mUi.showMaxTabsWarning();
+ return null;
+ }
+ }
+
+ @Override
+ public Tab createNewTab(String url, boolean incognito) {
+ if (mTabControl.canCreateNewTab()) {
+ Tab tab = mTabControl.createNewTab(false, null, null, incognito);
+ WebView w = tab.getWebView();
+ addTab(tab);
+ loadUrl(w, (incognito ? INCOGNITO_URI : url));
return tab;
} else {
mUi.showMaxTabsWarning();