fix title bar

    Merge code from TitleBarXLarge down into base
    to support omnibox in both tablet and phone
    browser

Change-Id: If54f3b162725411236f0b0676887bbcbdabadd25
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 22de40d..c3549b3 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -42,6 +42,7 @@
 import android.view.WindowManager;
 import android.view.inputmethod.InputMethodManager;
 import android.webkit.WebChromeClient;
+import android.webkit.WebSettings.ZoomDensity;
 import android.webkit.WebView;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
@@ -322,8 +323,6 @@
             Log.w(LOGTAG, "mContainer is already attached to content in"
                     + " attachTabToContentView!");
         }
-        mainView.setNextFocusUpId(R.id.url_focused);
-        mainView.setNextFocusDownId(R.id.url_focused);
         mUiController.attachSubWindow(tab);
     }
 
@@ -417,6 +416,13 @@
         mContentView.addView(container, COVER_SCREEN_PARAMS);
     }
 
+    protected void refreshWebView() {
+        Tab tab = getActiveTab();
+        if ((tab != null) && (tab.getWebView() != null)) {
+            tab.getWebView().invalidate();
+        }
+    }
+
     boolean canShowTitleBar() {
         return !isTitleBarShowing()
                 && !isActivityPaused()
@@ -448,19 +454,24 @@
     }
 
     @Override
-    public void showVoiceTitleBar(String title) {
-        getTitleBar().setInVoiceMode(true);
+    public void showVoiceTitleBar(String title, List<String> results) {
+        getTitleBar().setInVoiceMode(true, results);
         getTitleBar().setDisplayTitle(title);
     }
 
     @Override
     public void revertVoiceTitleBar(Tab tab) {
-        getTitleBar().setInVoiceMode(false);
+        getTitleBar().setInVoiceMode(false, null);
         String url = tab.getUrl();
         getTitleBar().setDisplayTitle(url);
     }
 
     @Override
+    public void registerDropdownChangeListener(DropdownChangeListener d) {
+        getTitleBar().registerDropdownChangeListener(d);
+    }
+
+    @Override
     public void showComboView(boolean startWithHistory, Bundle extras) {
         if (mComboView != null) {
             return;
@@ -581,7 +592,9 @@
     protected void updateNavigationState(Tab tab) {
     }
 
-    protected void updateAutoLogin(Tab tab, boolean animate) {}
+    protected void updateAutoLogin(Tab tab, boolean animate) {
+        getTitleBar().updateAutoLogin(tab, animate);
+    }
 
     /**
      * Update the lock icon to correspond to our latest state.
@@ -735,7 +748,4 @@
         warning.show();
     }
 
-    @Override
-    public void registerDropdownChangeListener(DropdownChangeListener d) {
-    }
 }