From e440a88fd81c86d1ca6fc18b8b3f68e383e574b4 Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Fri, 20 Aug 2010 13:54:45 -0700 Subject: Cleanup temporary incognito mode files after last tab closes. Change-Id: Ia685fb162d7449d2cd850e87607eff39cc8893a5 --- src/com/android/browser/TabControl.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/com/android/browser/TabControl.java') 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. -- cgit v1.1