Add incognito and snapshot icons to tab switcher

 Bug: 5162768

Change-Id: Ie0e1af52d26d236f666c26e2aaccaf4f9f28eb95
diff --git a/src/com/android/browser/NavTabView.java b/src/com/android/browser/NavTabView.java
index 07ac164..4eec702 100644
--- a/src/com/android/browser/NavTabView.java
+++ b/src/com/android/browser/NavTabView.java
@@ -90,6 +90,22 @@
             }
             mTitle.setText(txt);
         }
+        if (mTab.isSnapshot()) {
+            setTitleIcon(R.drawable.ic_history_holo_dark);
+        } else if (mTab.isPrivateBrowsingEnabled()) {
+            setTitleIcon(R.drawable.ic_incognito_holo_dark);
+        } else {
+            setTitleIcon(0);
+        }
+    }
+
+    private void setTitleIcon(int id) {
+        if (id == 0) {
+            mTitle.setPadding(mTitle.getCompoundDrawablePadding(), 0, 0, 0);
+        } else {
+            mTitle.setPadding(0, 0, 0, 0);
+        }
+        mTitle.setCompoundDrawablesWithIntrinsicBounds(id, 0, 0, 0);
     }
 
     protected boolean isHighlighted() {