Use tiles for bookmarks

- Use tile based bitmap for bookmarks and history
- Settings UI cleanup

Change-Id: If959cb0b8f110035b8dd2fefe8106e9c5d30f4f1
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 3e3c9aa..ef4c380 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -193,6 +193,8 @@
     // determine if webview is destroyed to MemoryMonitor
     private boolean mWebViewDestroyedByMemoryMonitor;
 
+    private String mTouchIconUrl;
+
     private Observable mFirstPixelObservable;
     private Observable mTabHistoryUpdateObservable;
 
@@ -634,6 +636,7 @@
 
         @Override
         public void beforeNavigation(WebView view, String url) {
+            mTouchIconUrl = null;
             if (BrowserCommandLine.hasSwitch("ui-low-power-mode")) {
                 return;
             }
@@ -726,6 +729,9 @@
         mCurrentState.mIncognito = view.isPrivateBrowsingEnabled();
     }
 
+    public String getTouchIconUrl() {
+        return mTouchIconUrl;
+    }
 
     public boolean isTabFullScreen() {
         return mFullScreen;
@@ -771,6 +777,8 @@
                 mWebViewController.attachSubWindow(Tab.this);
                 transport.setWebView(mSubView);
             } else {
+                capture();
+
                 final Tab newTab = mWebViewController.openTab(url,
                         Tab.this, true, true);
                 // This is special case for rendering links on a webpage in
@@ -919,6 +927,7 @@
                         mContext, cr, view);
                 mTouchIconLoader.execute(url);
             }
+            mTouchIconUrl = url;
         }
 
         @Override