diff options
| author | Michael Kolb <kolby@google.com> | 2011-05-05 11:27:37 -0700 |
|---|---|---|
| committer | Michael Kolb <kolby@google.com> | 2011-05-09 09:40:35 -0700 |
| commit | a4261fd53fef2b311e733fcfee4be3a9967ad967 (patch) | |
| tree | 330f47d4f7f8afc42811e565302eed3422b16869 /src/com/android/browser/Controller.java | |
| parent | 86138446b4f7c922a650e8bffe62b36adf5210ff (diff) | |
fix navscreen orientation
handle configuration change in navscreen
capture actual screen for tabs
size tabs correctly
Change-Id: I20ff72bdcab13678cdba4c55849bd5ff16cb6568
Diffstat (limited to 'src/com/android/browser/Controller.java')
| -rw-r--r-- | src/com/android/browser/Controller.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 5498d6d4..d1e1b0ab 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -97,6 +97,7 @@ public class Controller 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 @@ public class Controller } } - // 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 @@ public class Controller 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(); |
