tabbed title bar work
   bug # http://b/issue?id=2712871

  added tab bar
  added tab status callbacks to Tab and TabControl
  added compact progress/stop/refresh button
  added UrlInputView for auto-complete suggestions
  modified BrowserProvider for url input suggestions
  modified BrowserActivity to use TitleBarXLarge

Change-Id: I62db2be5b89f4c4f27c09dbc6fee7b3b0d5e91b5
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index ad82fd0..8afd3b4 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -121,9 +121,9 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Vector;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import java.util.Vector;
 
 public class BrowserActivity extends Activity
     implements View.OnCreateContextMenuListener, DownloadListener {
@@ -214,8 +214,12 @@
                 & Configuration.SCREENLAYOUT_SIZE_MASK)
                 == Configuration.SCREENLAYOUT_SIZE_XLARGE;
 
+        // Create the tab control and our initial tab
+        mTabControl = new TabControl(this);
+
+
         if (mXLargeScreenSize) {
-            mTitleBar = new TitleBarXLarge(this);
+            mTitleBar = new TitleBarXLarge(this, mTabControl);
             LinearLayout layout = (LinearLayout) mBrowserFrameLayout.
                     findViewById(R.id.vertical_layout);
             layout.addView(mTitleBar, 0, new LinearLayout.LayoutParams(
@@ -230,8 +234,6 @@
             mFakeTitleBar = new TitleBar(this);
         }
 
-        // Create the tab control and our initial tab
-        mTabControl = new TabControl(this);
 
         // Open the icon database and retain all the bookmark urls for favicons
         retainIconsOnStartup();
@@ -851,6 +853,12 @@
         return true;
     }
 
+    private void rebuildTitleBar() {
+        if (mXLargeScreenSize) {
+            ((TitleBarXLarge) mTitleBar).rebuildLayout();
+        }
+    }
+
     private void showFakeTitleBar() {
         if (mXLargeScreenSize) return;
         if (mFakeTitleBar.getParent() == null && mActiveTabsPage == null
@@ -1060,6 +1068,7 @@
             showHttpAuthentication(mHttpAuthHandler, null, null, title,
                     name, password, focusId);
         }
+        rebuildTitleBar();
     }
 
     @Override