diff options
Diffstat (limited to 'src/com/android/browser/TabControl.java')
-rw-r--r-- | src/com/android/browser/TabControl.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java index 333ce91..37834c0 100644 --- a/src/com/android/browser/TabControl.java +++ b/src/com/android/browser/TabControl.java @@ -150,6 +150,19 @@ class TabControl { } /** + * Returns true if there are any incognito tabs open. + * @return True when any incognito tabs are open, false otherwise. + */ + boolean hasAnyOpenIncognitoTabs() { + for (Tab tab : mTabs) { + if (tab.getWebView().isPrivateBrowsingEnabled()) { + return true; + } + } + return false; + } + + /** * Create a new tab. * @return The newly createTab or null if we have reached the maximum * number of open tabs. |