summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2010-08-18 16:33:28 -0700
committerMichael Kolb <kolby@google.com>2010-08-18 21:22:23 -0700
commitae62fd48652f989335db21a03d8289ecc5b57e88 (patch)
treea4e5f39b1b1f92fbeb5ec196842f06f716480877 /src
parenta5e672fea123026d1b26a8000a033bec527509ef (diff)
downloadpackages_apps_browser-ae62fd48652f989335db21a03d8289ecc5b57e88.zip
packages_apps_browser-ae62fd48652f989335db21a03d8289ecc5b57e88.tar.gz
packages_apps_browser-ae62fd48652f989335db21a03d8289ecc5b57e88.tar.bz2
incognito mode added for large screens
Change-Id: I8a3b479acc50c7e658e5d24e83ccf9256f4bf592
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserActivity.java4
-rw-r--r--src/com/android/browser/TabBar.java7
2 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 50f4189..54fb96f 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1379,6 +1379,10 @@ public class BrowserActivity extends Activity
openTabToHomePage();
break;
+ case R.id.incognito_menu_id:
+ openIncognitoTab();
+ break;
+
case R.id.goto_menu_id:
editUrl();
break;
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index 6fc919e..3d8a44f 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -209,6 +209,7 @@ public class TabBar extends LinearLayout
TabViewData mTabData;
View mTabContent;
TextView mTitle;
+ View mIncognito;
ImageView mIconView;
ImageView mLock;
ImageView mClose;
@@ -231,6 +232,7 @@ public class TabBar extends LinearLayout
mLock = (ImageView) mTabContent.findViewById(R.id.lock);
mClose = (ImageView) mTabContent.findViewById(R.id.close);
mClose.setOnClickListener(this);
+ mIncognito = mTabContent.findViewById(R.id.incognito);
mSelected = false;
mInLoad = false;
// update the status
@@ -259,6 +261,11 @@ public class TabBar extends LinearLayout
if (mTabData.mLock != null) {
setLock(mTabData.mLock);
}
+ if (mTabData.mTab != null) {
+ mIncognito.setVisibility(
+ mTabData.mTab.getWebView().isPrivateBrowsingEnabled() ?
+ View.VISIBLE : View.GONE);
+ }
}
@Override