am 0843a86f: (-s ours) am 1cf6af19: am 2660b267: (-s ours) Import revised translations.  DO NOT MERGE

* commit '0843a86f082d601a1698ee389c0712327d3aa392':
  Import revised translations.  DO NOT MERGE
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9ddc7b5..440a141 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -59,7 +59,7 @@
                   android:label="@string/application_name"
                   android:launchMode="singleTask"
                   android:alwaysRetainTaskState="true"
-                  android:configChanges="orientation|keyboardHidden|keyboard"
+                  android:configChanges="orientation|keyboardHidden|keyboard|screenSize"
                   android:theme="@style/BrowserTheme"
                   android:hardwareAccelerated="false"
                   android:windowSoftInputMode="adjustResize" >
@@ -167,7 +167,7 @@
 
         <activity android:name="AddBookmarkPage" android:label="Save bookmark"
                   android:theme="@style/DialogWhenLarge"
-                  android:configChanges="orientation|keyboardHidden"
+                  android:configChanges="orientation|keyboardHidden|screenSize"
                   android:windowSoftInputMode="stateHidden|adjustPan">
             <intent-filter>
                 <action android:name="android.intent.action.INSERT" />
diff --git a/res/drawable-hdpi/bg_bookmark_widget_holo.9.png b/res/drawable-hdpi/bg_bookmark_widget_holo.9.png
deleted file mode 100644
index adb57a4..0000000
--- a/res/drawable-hdpi/bg_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/bg_bookmarks_widget_holo.9.png b/res/drawable-hdpi/bg_bookmarks_widget_holo.9.png
new file mode 100644
index 0000000..4fd263f
--- /dev/null
+++ b/res/drawable-hdpi/bg_bookmarks_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/browser_widget_preview.png b/res/drawable-hdpi/browser_widget_preview.png
new file mode 100644
index 0000000..4ee806b
--- /dev/null
+++ b/res/drawable-hdpi/browser_widget_preview.png
Binary files differ
diff --git a/res/drawable-hdpi/browsertab_add_focused.png b/res/drawable-hdpi/browsertab_add_focused.png
new file mode 100644
index 0000000..1490a61
--- /dev/null
+++ b/res/drawable-hdpi/browsertab_add_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png b/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png
deleted file mode 100644
index 5f975e5..0000000
--- a/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png b/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
deleted file mode 100644
index 722f3b8..0000000
--- a/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png b/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png
deleted file mode 100644
index e583acd..0000000
--- a/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_copy.png b/res/drawable-hdpi/ic_btn_copy.png
deleted file mode 100644
index 847cf7e..0000000
--- a/res/drawable-hdpi/ic_btn_copy.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_find.png b/res/drawable-hdpi/ic_btn_find.png
deleted file mode 100644
index 0da38a1..0000000
--- a/res/drawable-hdpi/ic_btn_find.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_select_all.png b/res/drawable-hdpi/ic_btn_select_all.png
deleted file mode 100644
index 9545a53..0000000
--- a/res/drawable-hdpi/ic_btn_select_all.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_stop_v2.png b/res/drawable-hdpi/ic_btn_stop_v2.png
deleted file mode 100644
index 2c97223..0000000
--- a/res/drawable-hdpi/ic_btn_stop_v2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_clear_search.png b/res/drawable-hdpi/ic_clear_search.png
deleted file mode 100644
index e8e67b4..0000000
--- a/res/drawable-hdpi/ic_clear_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_history_holo_dark.png b/res/drawable-hdpi/ic_history_holo_dark.png
deleted file mode 100644
index 7972a81..0000000
--- a/res/drawable-hdpi/ic_history_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_most_visited_holo_dark.png b/res/drawable-hdpi/ic_most_visited_holo_dark.png
deleted file mode 100644
index bbb0bf6..0000000
--- a/res/drawable-hdpi/ic_most_visited_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_back.png b/res/drawable-hdpi/ic_pie_back.png
deleted file mode 100644
index 32b3ea7..0000000
--- a/res/drawable-hdpi/ic_pie_back.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_bookmarks.png b/res/drawable-hdpi/ic_pie_bookmarks.png
deleted file mode 100644
index 2536856..0000000
--- a/res/drawable-hdpi/ic_pie_bookmarks.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_close_tab.png b/res/drawable-hdpi/ic_pie_close_tab.png
deleted file mode 100644
index 108f8da..0000000
--- a/res/drawable-hdpi/ic_pie_close_tab.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_forward.png b/res/drawable-hdpi/ic_pie_forward.png
deleted file mode 100644
index 4e5f08e..0000000
--- a/res/drawable-hdpi/ic_pie_forward.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_more.png b/res/drawable-hdpi/ic_pie_more.png
deleted file mode 100644
index 0833ee2..0000000
--- a/res/drawable-hdpi/ic_pie_more.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_new_tab.png b/res/drawable-hdpi/ic_pie_new_tab.png
deleted file mode 100644
index 18f49ef..0000000
--- a/res/drawable-hdpi/ic_pie_new_tab.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_refresh.png b/res/drawable-hdpi/ic_pie_refresh.png
deleted file mode 100644
index f0a5d7a..0000000
--- a/res/drawable-hdpi/ic_pie_refresh.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_search.png b/res/drawable-hdpi/ic_pie_search.png
deleted file mode 100644
index f1c8825..0000000
--- a/res/drawable-hdpi/ic_pie_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_pie_tabs.png b/res/drawable-hdpi/ic_pie_tabs.png
deleted file mode 100644
index b941285..0000000
--- a/res/drawable-hdpi/ic_pie_tabs.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_thumbnail_view_holo_dark.png b/res/drawable-hdpi/ic_thumbnail_view_holo_dark.png
new file mode 100644
index 0000000..514b7dc
--- /dev/null
+++ b/res/drawable-hdpi/ic_thumbnail_view_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/list_divider_vert.9.png b/res/drawable-hdpi/list_divider_vert.9.png
deleted file mode 100644
index d99730a..0000000
--- a/res/drawable-hdpi/list_divider_vert.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/page_indicator.png b/res/drawable-hdpi/page_indicator.png
deleted file mode 100644
index d00b900..0000000
--- a/res/drawable-hdpi/page_indicator.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/page_indicator_unselected2.png b/res/drawable-hdpi/page_indicator_unselected2.png
deleted file mode 100644
index a34fd2e..0000000
--- a/res/drawable-hdpi/page_indicator_unselected2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/qc_background_normal.png b/res/drawable-hdpi/qc_background_normal.png
new file mode 100644
index 0000000..fec04f2
--- /dev/null
+++ b/res/drawable-hdpi/qc_background_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/search_plate_browser.9.png b/res/drawable-hdpi/search_plate_browser.9.png
deleted file mode 100644
index cf0567b..0000000
--- a/res/drawable-hdpi/search_plate_browser.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_nr.png b/res/drawable-hdpi/tab_nr.png
new file mode 100644
index 0000000..d9e74d5
--- /dev/null
+++ b/res/drawable-hdpi/tab_nr.png
Binary files differ
diff --git a/res/drawable-hdpi/text_field_results.9.png b/res/drawable-hdpi/text_field_results.9.png
deleted file mode 100644
index bd4bcc5..0000000
--- a/res/drawable-hdpi/text_field_results.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png b/res/drawable-hdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png
new file mode 100644
index 0000000..9d55e98
--- /dev/null
+++ b/res/drawable-hdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/url_bg_active.9.png b/res/drawable-hdpi/url_bg_active.9.png
new file mode 100644
index 0000000..479acb1
--- /dev/null
+++ b/res/drawable-hdpi/url_bg_active.9.png
Binary files differ
diff --git a/res/drawable-hdpi/url_bg_default.9.png b/res/drawable-hdpi/url_bg_default.9.png
new file mode 100644
index 0000000..7db9db4
--- /dev/null
+++ b/res/drawable-hdpi/url_bg_default.9.png
Binary files differ
diff --git a/res/drawable-hdpi/urlbar_bg.9.png b/res/drawable-hdpi/urlbar_bg.9.png
deleted file mode 100644
index c35383e..0000000
--- a/res/drawable-hdpi/urlbar_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/bg_bookmark_widget_holo.9.png b/res/drawable-mdpi/bg_bookmark_widget_holo.9.png
deleted file mode 100644
index d95f8d3..0000000
--- a/res/drawable-mdpi/bg_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/browser_widget_preview.png b/res/drawable-mdpi/browser_widget_preview.png
similarity index 100%
rename from res/drawable/browser_widget_preview.png
rename to res/drawable-mdpi/browser_widget_preview.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png b/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png
deleted file mode 100644
index d8697b8..0000000
--- a/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png b/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
deleted file mode 100644
index 21a2cc3..0000000
--- a/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png b/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png
deleted file mode 100644
index 0d9e49d..0000000
--- a/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_copy.png b/res/drawable-mdpi/ic_btn_copy.png
deleted file mode 100644
index 2174368..0000000
--- a/res/drawable-mdpi/ic_btn_copy.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_find.png b/res/drawable-mdpi/ic_btn_find.png
deleted file mode 100644
index 71bc61a..0000000
--- a/res/drawable-mdpi/ic_btn_find.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_select_all.png b/res/drawable-mdpi/ic_btn_select_all.png
deleted file mode 100644
index 8ce8c8f..0000000
--- a/res/drawable-mdpi/ic_btn_select_all.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_stop_v2.png b/res/drawable-mdpi/ic_btn_stop_v2.png
deleted file mode 100644
index 89f01e7..0000000
--- a/res/drawable-mdpi/ic_btn_stop_v2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_clear_search.png b/res/drawable-mdpi/ic_clear_search.png
deleted file mode 100644
index e8e67b4..0000000
--- a/res/drawable-mdpi/ic_clear_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_history_holo_dark.png b/res/drawable-mdpi/ic_history_holo_dark.png
deleted file mode 100644
index 44f2245..0000000
--- a/res/drawable-mdpi/ic_history_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_most_visited_holo_dark.png b/res/drawable-mdpi/ic_most_visited_holo_dark.png
deleted file mode 100644
index 52082bd..0000000
--- a/res/drawable-mdpi/ic_most_visited_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_back.png b/res/drawable-mdpi/ic_pie_back.png
deleted file mode 100644
index daddaea..0000000
--- a/res/drawable-mdpi/ic_pie_back.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_bookmarks.png b/res/drawable-mdpi/ic_pie_bookmarks.png
deleted file mode 100644
index ffa430d..0000000
--- a/res/drawable-mdpi/ic_pie_bookmarks.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_close_tab.png b/res/drawable-mdpi/ic_pie_close_tab.png
deleted file mode 100644
index 62396f4..0000000
--- a/res/drawable-mdpi/ic_pie_close_tab.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_forward.png b/res/drawable-mdpi/ic_pie_forward.png
deleted file mode 100644
index bd8dcac..0000000
--- a/res/drawable-mdpi/ic_pie_forward.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_more.png b/res/drawable-mdpi/ic_pie_more.png
deleted file mode 100644
index c96c6a4..0000000
--- a/res/drawable-mdpi/ic_pie_more.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_new_tab.png b/res/drawable-mdpi/ic_pie_new_tab.png
deleted file mode 100644
index 206675a..0000000
--- a/res/drawable-mdpi/ic_pie_new_tab.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_refresh.png b/res/drawable-mdpi/ic_pie_refresh.png
deleted file mode 100644
index 5980f8b..0000000
--- a/res/drawable-mdpi/ic_pie_refresh.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_search.png b/res/drawable-mdpi/ic_pie_search.png
deleted file mode 100644
index 6981697..0000000
--- a/res/drawable-mdpi/ic_pie_search.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_tabs.png b/res/drawable-mdpi/ic_pie_tabs.png
deleted file mode 100644
index fda262a..0000000
--- a/res/drawable-mdpi/ic_pie_tabs.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_pie_web.png b/res/drawable-mdpi/ic_pie_web.png
deleted file mode 100644
index 86e41ff..0000000
--- a/res/drawable-mdpi/ic_pie_web.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_thumbnail_view_holo_dark.png b/res/drawable-mdpi/ic_thumbnail_view_holo_dark.png
new file mode 100644
index 0000000..95c674d
--- /dev/null
+++ b/res/drawable-mdpi/ic_thumbnail_view_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/list_divider_vert.9.png b/res/drawable-mdpi/list_divider_vert.9.png
deleted file mode 100644
index d99730a..0000000
--- a/res/drawable-mdpi/list_divider_vert.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/page_indicator.png b/res/drawable-mdpi/page_indicator.png
deleted file mode 100644
index 73c030a..0000000
--- a/res/drawable-mdpi/page_indicator.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/page_indicator_unselected2.png b/res/drawable-mdpi/page_indicator_unselected2.png
deleted file mode 100644
index 70818ee..0000000
--- a/res/drawable-mdpi/page_indicator_unselected2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/search_plate_browser.9.png b/res/drawable-mdpi/search_plate_browser.9.png
deleted file mode 100644
index 2370d9c..0000000
--- a/res/drawable-mdpi/search_plate_browser.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/text_field_results.9.png b/res/drawable-mdpi/text_field_results.9.png
deleted file mode 100644
index 167c42d..0000000
--- a/res/drawable-mdpi/text_field_results.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/urlbar_bg.9.png b/res/drawable-mdpi/urlbar_bg.9.png
deleted file mode 100644
index 18b49e7..0000000
--- a/res/drawable-mdpi/urlbar_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/url_selector.xml b/res/drawable/url_selector.xml
new file mode 100644
index 0000000..d4febe6
--- /dev/null
+++ b/res/drawable/url_selector.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:state_focused="true"
+        android:drawable="@drawable/url_bg_active" />
+    <item
+        android:state_focused="false"
+        android:drawable="@drawable/url_bg_default" />
+</selector>
\ No newline at end of file
diff --git a/res/layout-xlarge/bookmarks_history.xml b/res/layout-xlarge/bookmarks_history.xml
new file mode 100644
index 0000000..ae5e19b
--- /dev/null
+++ b/res/layout-xlarge/bookmarks_history.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/fragment"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/bg_browser" />
diff --git a/res/layout-xlarge/history.xml b/res/layout-xlarge/history.xml
new file mode 100644
index 0000000..2d949e1
--- /dev/null
+++ b/res/layout-xlarge/history.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+>
+
+    <ViewStub
+        android:id="@+id/pref_stub"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:inflatedId="@+id/history" />
+
+    <TextView android:id="@android:id/empty"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:text="@string/empty_history"
+        android:visibility="gone"
+    />
+
+</FrameLayout>
diff --git a/res/layout/active_tabs.xml b/res/layout/active_tabs.xml
index 8b5fe9e..f9bd6b0 100644
--- a/res/layout/active_tabs.xml
+++ b/res/layout/active_tabs.xml
@@ -14,31 +14,41 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:orientation="vertical"
-    android:background="@color/black"
-    >
-    <RelativeLayout
-        style="?android:attr/windowTitleBackgroundStyle"
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content">
+
+        <Button
+            android:id="@+id/new_tab"
+            android:text="@string/new_tab"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:singleLine="true"
+            android:textAppearance="?android:attr/textAppearanceSmall" />
+
+        <Button
+            android:id="@+id/new_incognito_tab"
+            android:text="@string/new_incognito_tab"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:singleLine="true"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:paddingLeft="0dip"
+            android:paddingRight="0dip" />
+
+    </LinearLayout>
+
+    <ListView
+        android:id="@android:id/list"
         android:layout_width="match_parent"
-        android:layout_height="?android:attr/windowTitleSize"
-        >
-        <TextView android:id="@android:id/title"
-            style="?android:attr/windowTitleStyle"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@null"
-            android:fadingEdge="horizontal"
-            android:gravity="center_vertical"
-            android:text="@string/active_tabs"
-            />
-    </RelativeLayout>
-    <ListView android:id="@+id/list"
-        android:layout_width="match_parent"
-        android:layout_height="0dip"
-        android:layout_weight="1"
-        android:cacheColorHint="@color/black"
-        />
-</LinearLayout>
+        android:layout_height="match_parent"
+        android:listSelector="@drawable/bookmark_thumb_selector"
+        android:drawSelectorOnTop="true"
+        android:focusable="true"
+        android:focusableInTouchMode="true" />
+
+</merge>
diff --git a/res/layout/bookmarks_history.xml b/res/layout/bookmarks_history.xml
index 5622917..826fe49 100644
--- a/res/layout/bookmarks_history.xml
+++ b/res/layout/bookmarks_history.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,4 +18,5 @@
     android:id="@+id/fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/bg_browser" />
+    android:background="@drawable/bg_browser"
+    android:paddingTop="?android:attr/actionBarSize" />
diff --git a/res/layout/history.xml b/res/layout/history.xml
index f7d2c7c..f3adb51 100644
--- a/res/layout/history.xml
+++ b/res/layout/history.xml
@@ -19,11 +19,10 @@
     android:layout_height="match_parent"
 >
 
-    <ViewStub
-        android:id="@+id/pref_stub"
+    <ExpandableListView
+        android:id="@+id/history"
         android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:inflatedId="@+id/history" />
+        android:layout_width="match_parent" />
 
     <TextView android:id="@android:id/empty"
         android:layout_width="wrap_content"
diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml
index 3b3dd7a..f6076a0 100644
--- a/res/layout/history_item.xml
+++ b/res/layout/history_item.xml
@@ -42,7 +42,8 @@
                 android:layout_width="wrap_content" 
                 android:layout_height="wrap_content"
                 android:singleLine="true"
-                android:ellipsize="end"
+                android:ellipsize="marquee"
+                android:marqueeRepeatLimit="marquee_forever"
                 />
         <TextView android:id="@+id/url" 
                 android:textAppearance="?android:attr/textAppearanceSmall"
@@ -50,7 +51,8 @@
                 android:layout_width="wrap_content" 
                 android:layout_height="wrap_content"
                 android:singleLine="true"
-                android:ellipsize="end"
+                android:ellipsize="marquee"
+                android:marqueeRepeatLimit="marquee_forever"
                 />
     </LinearLayout>
     <CheckBox android:id="@+id/star"
diff --git a/res/layout/preference_list_content.xml b/res/layout/preference_list_content.xml
new file mode 100644
index 0000000..ad3d64e
--- /dev/null
+++ b/res/layout/preference_list_content.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2011 The Android Open Source Project Licensed under the
+    Apache License, Version 2.0 (the "License"); you may not use this file
+    except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent">
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1">
+
+        <LinearLayout
+            android:id="@+id/headers"
+            android:orientation="vertical"
+            android:layout_width="0px"
+            android:layout_height="match_parent"
+            android:layout_marginRight="@dimen/preference_screen_side_margin_negative"
+            android:layout_marginLeft="@dimen/preference_screen_side_margin"
+            android:layout_marginTop="32dp"
+            android:layout_marginBottom="32dp"
+            android:layout_weight="10">
+
+            <ListView android:id="@android:id/list"
+                android:layout_width="match_parent"
+                android:layout_height="0px"
+                android:layout_weight="1"
+                android:drawSelectorOnTop="false"
+                android:cacheColorHint="@android:color/transparent"
+                android:listPreferredItemHeight="48dp"
+                android:scrollbarAlwaysDrawVerticalTrack="true" />
+
+            <FrameLayout android:id="@+id/list_footer"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0" />
+
+        </LinearLayout>
+
+        <LinearLayout
+                android:id="@+id/prefs_frame"
+                android:layout_width="0px"
+                android:layout_height="match_parent"
+                android:layout_weight="20"
+                android:layout_marginLeft="@dimen/preference_screen_side_margin"
+                android:layout_marginRight="@dimen/preference_screen_side_margin"
+                android:layout_marginTop="16dp"
+                android:layout_marginBottom="16dp"
+                android:background="?android:attr/detailsElementBackground"
+                android:orientation="vertical"
+                android:visibility="gone" >
+
+            <!-- Breadcrumb inserted here -->
+            <android.app.FragmentBreadCrumbs
+                android:id="@android:id/title"
+                android:layout_height="72dip"
+                android:layout_width="match_parent"
+                android:paddingTop="16dip"
+                android:paddingBottom="8dip"
+                android:gravity="center_vertical|left"
+                android:layout_marginLeft="48dip"
+                android:layout_marginRight="48dip"
+                />
+
+            <ImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="1dip"
+                    android:paddingLeft="32dip"
+                    android:paddingRight="32dip"
+                    android:src="#404040"
+                />
+            <android.preference.PreferenceFrameLayout android:id="@+id/prefs"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dip"
+                    android:layout_weight="1"
+                    android:layout_marginTop="-1dip"
+                />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/tab_view.xml b/res/layout/tab_view.xml
index 885f4cf..8ffb73d 100644
--- a/res/layout/tab_view.xml
+++ b/res/layout/tab_view.xml
@@ -20,42 +20,54 @@
     android:layout_width="match_parent"
     android:orientation="horizontal"
     android:gravity="center_vertical"
+    android:paddingLeft="8dip"
+    android:paddingTop="4dip"
+    android:paddingBottom="4dip"
     >
-    <!-- This ImageView has the same width as the ImageView in
-         tab_view_add_tab.xml. -->
-    <ImageView android:id="@+id/favicon"
-        android:layout_width="20dip"
-        android:layout_height="20dip"
-        android:layout_marginLeft="18dip"
-        android:layout_marginRight="18dip"
-        android:background="@drawable/fav_icn_background"
-        android:padding="2dip"/>
-    <LinearLayout
+    <RelativeLayout
+        android:id="@+id/list_item"
         android:layout_width="0dip"
-        android:layout_height="wrap_content"
         android:layout_weight="1"
-        android:orientation="vertical"
-        >
-        <TextView android:id="@+id/title"
+        android:layout_height="wrap_content"
+        android:background="@drawable/bookmark_list_favicon_bg">
+        <ImageView
+            android:id="@+id/thumb"
+            android:src="@drawable/thumbnail_bookmarks_widget_no_bookmark_holo"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/tab_view_thumbnail_height"
+            android:scaleType="fitXY"
+            android:cropToPadding="true" />
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:maxLines="1"
-            android:singleLine="true"
-            android:ellipsize="end"
-            />
-        <TextView android:id="@+id/url"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:maxLines="1"
-            android:singleLine="true"
-            android:ellipsize="end"
-            />
-    </LinearLayout>
+            android:layout_alignBottom="@id/thumb"
+            android:background="@color/tabViewTitleBackground">
+            <ImageView
+                android:id="@+id/favicon"
+                android:src="@drawable/app_web_browser_sm"
+                android:layout_width="@dimen/favicon_size"
+                android:layout_height="@dimen/favicon_size"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="4dip"
+                android:layout_marginRight="8dip"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:scaleType="fitXY" />
+            <TextView
+                android:id="@+id/label"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textSize="12sp"
+                android:typeface="sans"
+                android:textColor="@android:color/white" />
+        </LinearLayout>
+    </RelativeLayout>
     <View android:id="@+id/divider"
-        android:background="#ff313431"
-        android:layout_width="1dip"
+        android:background="?android:attr/dividerVertical"
+        android:layout_width="1dp"
         android:layout_height="match_parent"
         android:layout_marginLeft="8dip"
         android:layout_marginTop="5dip"
@@ -64,10 +76,10 @@
     <view class="com.android.browser.ActiveTabsPage$CloseHolder" android:id="@+id/close"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:paddingLeft="18dip"
-        android:paddingRight="18dip"
-        android:background="@drawable/close_background"
-        android:src="@drawable/btn_close_window"
+        android:paddingLeft="12dip"
+        android:paddingRight="12dip"
+        android:background="@drawable/bookmark_thumb_selector"
+        android:src="@drawable/ic_close_window_holo_dark"
         android:scaleType="center"
         />
 </LinearLayout>
diff --git a/res/layout/tab_view_add_incognito_tab.xml b/res/layout/tab_view_add_incognito_tab.xml
deleted file mode 100644
index 43fcb43..0000000
--- a/res/layout/tab_view_add_incognito_tab.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeight"
-    android:layout_width="match_parent"
-    android:orientation="horizontal"
-    android:gravity="center_vertical"
-    >
-    <ImageView
-        android:layout_width="40dip"
-        android:layout_height="40dip"
-        android:layout_marginLeft="8dip"
-        android:layout_marginRight="8dip"
-        android:src="@drawable/ic_new_window_holo_dark"/>
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:maxLines="1"
-        android:singleLine="true"
-        android:ellipsize="end"
-        android:text="@string/new_incognito_tab"
-        />
-</LinearLayout>
diff --git a/res/layout/tab_view_add_tab.xml b/res/layout/tab_view_add_tab.xml
deleted file mode 100644
index f4e0f02..0000000
--- a/res/layout/tab_view_add_tab.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeight"
-    android:layout_width="match_parent"
-    android:orientation="horizontal"
-    android:gravity="center_vertical"
-    >
-    <ImageView
-        android:layout_width="40dip"
-        android:layout_height="40dip"
-        android:layout_marginLeft="8dip"
-        android:layout_marginRight="8dip"
-        android:src="@drawable/ic_new_window_holo_dark"/>
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:maxLines="1"
-        android:singleLine="true"
-        android:ellipsize="end"
-        android:text="@string/new_tab"
-        />
-</LinearLayout>
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index 99ac04d..e443ee5 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-   Copyright 2009, The Android Open Source Project
+   Copyright 2011, The Android Open Source Project
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -14,13 +14,13 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/titlebar"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
-
+    android:layout_height="wrap_content">
     <LinearLayout
+        android:id="@+id/taburlbar"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
@@ -28,71 +28,120 @@
         android:paddingLeft="4dip"
         android:paddingRight="4dip"
         android:paddingTop="2dip"
-        android:paddingBottom="1dip"
-        >
-
-        <LinearLayout android:id="@+id/title_bg"
+        android:paddingBottom="2dip">
+        <LinearLayout
+            android:id="@+id/title_bg"
             android:layout_width="0dip"
             android:layout_weight="1.0"
-            android:layout_height="48dip"
-            android:layout_marginBottom="4dip"
+            android:layout_height="40dip"
             android:gravity="center_vertical"
-            android:orientation="horizontal"
-            android:background="@drawable/url_background"
-            >
-                <ImageView android:id="@+id/favicon"
-                    android:layout_width="20dip"
-                    android:layout_height="20dip"
-                    />
-                <ImageView android:id="@+id/lock"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="3dip"
-                    android:visibility="gone"
-                    />
-                <com.android.browser.UrlInputView
-                    android:id="@+id/url_input"
-                    android:focusable="true"
-                    android:layout_width="0dip"
-                    android:layout_weight="1.0"
-                    android:layout_height="match_parent"
-                    android:layout_marginLeft="3dip"
-                    android:paddingLeft="0dip"
-                    android:paddingRight="0dip"
-                    android:background="@null"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:hint="@string/search_hint"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:lines="1"
-                    android:scrollHorizontally="true"
-                    android:inputType="textUri"
-                    android:imeOptions="actionGo"
-                    style="@style/Suggestions" />
+            android:orientation="horizontal">
+            <ImageView
+                android:id="@+id/favicon"
+                android:layout_width="20dip"
+                android:layout_height="20dip" />
+            <ImageView
+                android:id="@+id/lock"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="2dip"
+                android:visibility="gone" />
+            <com.android.browser.UrlInputView
+                android:id="@+id/url"
+                android:focusable="true"
+                android:layout_width="0dip"
+                android:layout_weight="1.0"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="2dip"
+                android:paddingLeft="4dip"
+                android:paddingRight="4dip"
+                android:background="@drawable/url_selector"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:hint="@string/search_hint"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:lines="1"
+                android:scrollHorizontally="true"
+                android:inputType="textUri"
+                android:imeOptions="actionGo"
+                style="@style/Suggestions" />
         </LinearLayout>
-        <ImageButton
+        <ImageView
+            android:id="@+id/voice"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:src="@drawable/ic_voice_search_holo_dark"
+            android:visibility="gone" />
+        <ImageView
             android:id="@+id/stop"
             android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            style="@style/HoloButton"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
             android:src="@drawable/ic_stop_holo_dark"
-            android:visibility="gone"
-        />
-        <ImageButton
-            android:id="@+id/bookmark"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            style="@style/HoloButton"
-            android:src="@drawable/btn_imageview_star"
-        />
+            android:visibility="gone" />
     </LinearLayout>
-
+    <LinearLayout
+        android:id="@+id/autologin"
+        android:background="#FBF0A0"
+        android:gravity="center_vertical"
+        android:paddingTop="3dip"
+        android:visibility="gone"
+        android:layout_below="@+id/taburlbar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <TextView
+            android:text="@string/autologin_bar_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@android:color/primary_text_light"
+            android:paddingLeft="15dip"
+            android:paddingRight="15dip"
+            android:textAppearance="?android:attr/textAppearanceMedium" />
+        <Spinner
+            android:id="@+id/autologin_account"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            style="@android:style/Widget.Holo.Light.Spinner" />
+        <Button
+            android:id="@+id/autologin_login"
+            android:text="@string/autologin_bar_login_text"
+            style="@android:style/Widget.Holo.Light.Button"
+            android:layout_marginRight="15dip"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content" />
+        <ProgressBar
+            android:id="@+id/autologin_progress"
+            android:indeterminateOnly="true"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:visibility="gone" />
+        <TextView
+            android:id="@+id/autologin_error"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:textColor="#dd6826"
+            android:text="@string/autologin_bar_error"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:visibility="gone" />
+        <View
+            android:layout_width="2dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1" />
+        <ImageButton
+            android:id="@+id/autologin_close"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:paddingRight="15dip"
+            android:background="@null"
+            android:src="@*android:drawable/btn_close" />
+    </LinearLayout>
     <com.android.browser.PageProgressView
-        android:id="@+id/progress_horizontal"
+        android:id="@+id/progress"
         android:layout_width="match_parent"
         android:layout_height="22dip"
         android:background="@null"
+        android:layout_below="@+id/taburlbar"
         android:src="@drawable/progress"
         android:layout_marginTop="-11dip"
         android:visibility="gone" />
-</LinearLayout>
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/url_bar.xml b/res/layout/url_bar.xml
index 8743906..3864b7d 100644
--- a/res/layout/url_bar.xml
+++ b/res/layout/url_bar.xml
@@ -118,7 +118,7 @@
                 style="@style/HoloIcon"
                 android:visibility="gone" />
             <com.android.browser.UrlInputView
-                android:id="@+id/url_focused"
+                android:id="@+id/url"
                 android:layout_width="0dip"
                 android:layout_weight="1.0"
                 android:layout_height="match_parent"
diff --git a/res/menu/bookmark.xml b/res/menu/bookmark.xml
index b761779..5517ab9 100644
--- a/res/menu/bookmark.xml
+++ b/res/menu/bookmark.xml
@@ -26,12 +26,15 @@
         android:showAsAction="always" />
     <item
         android:id="@+id/thumbnail_view"
-        android:title="@string/bookmark_thumbnail_view"/>
+        android:title="@string/bookmark_thumbnail_view"
+        android:icon="@drawable/ic_thumbnail_view_holo_dark" />
     <item
         android:id="@+id/list_view"
-        android:title="@string/bookmark_list_view"/>
+        android:title="@string/bookmark_list_view"
+        android:icon="@drawable/ic_list_view_holo_dark" />
     <item
         android:id="@+id/preferences_menu_id"
         android:title="@string/menu_preferences"
+        android:icon="@drawable/ic_settings_holo_dark"
         android:alphabeticShortcut="p" />
 </menu>
diff --git a/res/menu/browser.xml b/res/menu/browser.xml
index abe3716..d9e884b 100644
--- a/res/menu/browser.xml
+++ b/res/menu/browser.xml
@@ -15,55 +15,73 @@
 -->
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <group android:id="@+id/MAIN_MENU">
-        <item android:id="@+id/new_tab_menu_id"
-            android:title="@string/new_tab"
-            android:icon="@drawable/ic_menu_new_window"
-            android:alphabeticShortcut="n" />
-        <item android:id="@+id/bookmarks_menu_id"
-            android:title="@string/bookmarks"
-            android:alphabeticShortcut="b"
-            android:icon="@drawable/ic_bookmarks_holo_dark" />
-        <item android:id="@+id/active_tabs_menu_id"
-            android:title="@string/active_tabs"
-            android:icon="@drawable/ic_windows_holo_dark"
-            android:alphabeticShortcut="t" />
-        <item android:id="@+id/stop_reload_menu_id"
-            android:alphabeticShortcut="r" />
-        <item android:id="@+id/forward_menu_id"
-            android:title="@string/forward"
-            android:icon="@*android:drawable/ic_menu_forward" />
-        <item android:id="@+id/add_bookmark_menu_id"
+    <group
+        android:id="@+id/MAIN_MENU">
+        <group
+            android:id="@+id/NAV_MENU">
+            <item
+                android:id="@+id/new_tab_menu_id"
+                android:title="@string/new_tab"
+                android:icon="@drawable/ic_menu_new_window"
+                android:alphabeticShortcut="n" />
+            <item
+                android:id="@+id/bookmarks_menu_id"
+                android:title="@string/bookmarks"
+                android:alphabeticShortcut="b"
+                android:icon="@drawable/ic_bookmarks_holo_dark" />
+            <item
+                android:id="@+id/active_tabs_menu_id"
+                android:title="@string/active_tabs"
+                android:icon="@drawable/ic_windows_holo_dark"
+                android:alphabeticShortcut="t" />
+            <item
+                android:id="@+id/stop_reload_menu_id"
+                android:alphabeticShortcut="r" />
+            <item
+                android:id="@+id/forward_menu_id"
+                android:title="@string/forward"
+                android:icon="@*android:drawable/ic_menu_forward" />
+        </group>
+        <item
+            android:id="@+id/add_bookmark_menu_id"
             android:title="@string/save_to_bookmarks"
             android:icon="@drawable/ic_bookmark_on_holo_dark"
             android:alphabeticShortcut="d" />
-        <item android:id="@+id/find_menu_id"
+        <item
+            android:id="@+id/find_menu_id"
             android:title="@*android:string/find_on_page"
             android:icon="@*android:drawable/ic_menu_find"
             android:alphabeticShortcut="f" />
-        <item android:id="@+id/share_page_menu_id"
+        <item
+            android:id="@+id/share_page_menu_id"
             android:title="@string/share_page"
             android:icon="@drawable/ic_share_holo_dark"
             android:alphabeticShortcut="s" />
-        <item android:id="@+id/save_webarchive_menu_id"
+        <item
+            android:id="@+id/save_webarchive_menu_id"
             android:title="@string/menu_save_webarchive" />
-        <item android:id="@+id/page_info_menu_id"
+        <item
+            android:id="@+id/page_info_menu_id"
             android:title="@string/page_info"
             android:icon="@drawable/ic_pageinfo_holo_dark"
             android:alphabeticShortcut="g" />
-        <item android:id="@+id/view_downloads_menu_id"
+        <item
+            android:id="@+id/view_downloads_menu_id"
             android:title="@string/menu_view_download"
             android:icon="@drawable/ic_downloads_holo_dark"
             android:alphabeticShortcut="j" />
-        <item android:id="@+id/preferences_menu_id"
+        <item
+            android:id="@+id/preferences_menu_id"
             android:title="@string/menu_preferences"
             android:icon="@drawable/ic_settings_holo_dark"
             android:alphabeticShortcut="p" />
         <!-- followings are debug only -->
-        <item android:id="@+id/dump_nav_menu_id"
+        <item
+            android:id="@+id/dump_nav_menu_id"
             android:title="@string/dump_nav"
             android:visible="false" />
-        <item android:id="@+id/dump_counters_menu_id"
+        <item
+            android:id="@+id/dump_counters_menu_id"
             android:title="@string/dump_counters"
             android:visible="false" />
     </group>
diff --git a/res/raw/most_visited.ktpl b/res/raw/most_visited.ktpl
index 04b9eee..9a6e1b8 100644
--- a/res/raw/most_visited.ktpl
+++ b/res/raw/most_visited.ktpl
@@ -3,7 +3,7 @@
 <html>

 <head>

 <title><%@ string/new_tab %></title>

-<meta name="viewport" content="width=device-width; initial-scale=1.0;" />

+<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=0" />

 

 <style type="text/css">

 

@@ -14,20 +14,19 @@
 

 body {

     text-align: center;

-    margin: 16px auto;

+    margin: 0px auto;

     padding: 0 8px 0 8px;

     max-width: <%@ dimen/mv_max_width %>px;

 }

 

-#most_visited h3 {

+h3 {

     text-align: center;

-    padding: 0;

-    margin: 5px 0 5px 0px;

+    margin: 5px 0 5px 0;

 }

 

 .thumbwrap li {

     display: inline-block;

-    margin: 0 7px 15px 7px;

+    margin: 0 7px 12px 7px;

     padding: 0;

 }

 

diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index d247e52..ccc1d38 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -76,7 +76,7 @@
     <string name="name" msgid="5462672162695365387">"라벨"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
     <string name="save_to_bookmarks" msgid="6101482434920313244">"북마크에 추가"</string>
-    <string name="bookmark_this_page" msgid="7530739804320811054">"페이지 북마크"</string>
+    <string name="bookmark_this_page" msgid="7530739804320811054">"북마크하기"</string>
     <string name="remove" msgid="7820112494467011374">"삭제"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"북마크 수정"</string>
     <string name="create_shortcut_bookmark" msgid="1995095662095484289">"홈에 바로가기 추가"</string>
diff --git a/res/values-land/dimensions.xml b/res/values-land/dimensions.xml
new file mode 100644
index 0000000..f3b1235
--- /dev/null
+++ b/res/values-land/dimensions.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2011 The Android Open Source Project Licensed under the
+    Apache License, Version 2.0 (the "License"); you may not use this file
+    except in compliance with the License. You may obtain a copy of the
+    License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+
+<resources>
+    <dimen name="preference_screen_side_margin">96dp</dimen>
+    <dimen name="preference_screen_side_margin_negative">-100dp</dimen>
+    <dimen name="preference_widget_width">72dp</dimen>
+</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 5c3ae46..ce6c856 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -248,7 +248,7 @@
     <string name="pref_content_load_page" msgid="2219810141690955452">"Обзор страниц"</string>
     <string name="pref_content_load_page_summary" msgid="8792093504054149369">"Открывать страницы в мелком маштабе для ознакомления"</string>
     <string name="pref_extras_title" msgid="7075456173747370647">"Дополнительные функции"</string>
-    <string name="pref_extras_website_settings" msgid="67866640052455549">"Настройки веб-сайта"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Настройки веб-сайтов"</string>
     <string name="pref_extras_website_settings_summary" msgid="1656771443223494406">"Дополнительные настройки для отдельных сайтов"</string>
     <string name="pref_extras_reset_default_title" msgid="3579760449455761762">"Сброс настроек"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Сброс настроек"</string>
@@ -344,11 +344,11 @@
     <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Объем занятой памяти телефона (МБ)"</string>
     <string name="loading_video" msgid="4887871585216091096">"Загрузка видео"</string>
     <string name="geolocation_permissions_prompt_message" msgid="356796102004052471">"<xliff:g id="WEBSITE_ORIGIN">%s</xliff:g> запрашивает данные о вашем местоположении"</string>
-    <string name="geolocation_permissions_prompt_share" msgid="9084486342048347976">"Сообщить местоположение"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="9084486342048347976">"Разрешить"</string>
     <string name="geolocation_permissions_prompt_dont_share" msgid="6303025160237860300">"Отклонить"</string>
     <string name="geolocation_permissions_prompt_remember" msgid="3118526300707348308">"Запомнить настройки"</string>
-    <string name="geolocation_permissions_prompt_toast_allowed" msgid="987286072035125498">"У этого сайта есть доступ к данным о вашем местоположении. Для изменения параметров доступа выберите Настройки -&gt; Настройки веб-сайта"</string>
-    <string name="geolocation_permissions_prompt_toast_disallowed" msgid="7695100950212692515">"У этого сайта нет доступа к данным о вашем местоположении. Для изменения параметров доступа выберите Настройки -&gt; Настройки веб-сайта"</string>
+    <string name="geolocation_permissions_prompt_toast_allowed" msgid="987286072035125498">"У этого сайта есть доступ к данным о вашем местоположении. Для изменения параметров доступа выберите Настройки -&gt; Настройки веб-сайтов"</string>
+    <string name="geolocation_permissions_prompt_toast_disallowed" msgid="7695100950212692515">"У этого сайта нет доступа к данным о вашем местоположении. Для изменения параметров доступа выберите Настройки -&gt; Настройки веб-сайтов"</string>
     <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Закрыть геоданные"</string>
     <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Этот сайт сейчас имеет доступ к вашему местоположению"</string>
     <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Этот сайт в настоящее время не имеет доступа к вашему местоположению"</string>
diff --git a/res/values-xlarge/dimensions.xml b/res/values-xlarge/dimensions.xml
index 2549818..eae9b0e 100644
--- a/res/values-xlarge/dimensions.xml
+++ b/res/values-xlarge/dimensions.xml
@@ -27,4 +27,12 @@
     <dimen name="combo_paddingTop">50dip</dimen>
     <dimen name="combo_paddingLeftRight">134dip</dimen>
     <dimen name="combo_horizontalSpacing">20dip</dimen>
+    <dimen name="qc_radius_start">50dip</dimen>
+    <dimen name="qc_radius_increment">70dip</dimen>
+    <dimen name="qc_slop">15dip</dimen>
+    <dimen name="qc_touch_offset">15dip</dimen>
+    <dimen name="qc_tab_title_height">30dip</dimen>
+    <dimen name="qc_thumb_width">240dip</dimen>
+    <dimen name="qc_thumb_height">160dip</dimen>
+    <dimen name="qc_item_size">48dip</dimen>
 </resources>
diff --git a/res/values-xlarge/strings.xml b/res/values-xlarge/strings.xml
index 92646a4..d715c1b 100644
--- a/res/values-xlarge/strings.xml
+++ b/res/values-xlarge/strings.xml
@@ -32,4 +32,8 @@
     <string name="open_all_in_new_window">Open all in new tabs</string>
     <!-- Settings summary CHAR LIMIT=50]-->
     <string name="pref_content_open_in_background_summary">Open new tabs behind the current one</string>
+    <!-- Recover tabs after a crash dialog title [CHAR LIMIT=32] -->
+    <string name="recover_title">Restore tabs?</string>
+    <!-- Recover tabs after a crash dialog prompt [CHAR LIMIT=none] -->
+    <string name="recover_prompt">Browser appears to have crashed. Would you like to restore your tabs from last time?</string>
 </resources>
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
new file mode 100644
index 0000000..4951b2e
--- /dev/null
+++ b/res/values-xlarge/styles.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <style name="BrowserTheme" parent="@android:Theme.Holo">
+        <item name="android:windowBackground">@color/white</item>
+        <item name="android:colorBackground">#FFFFFFFF</item>
+        <item name="android:windowActionBar">true</item>
+        <item name="android:windowNoTitle">false</item>
+        <item name="android:actionBarStyle">@style/ActionBarStyle</item>
+        <item name="android:actionButtonStyle">@style/ActionButton</item>
+    </style>
+</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index a3dc094..f5432cb 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -188,7 +188,7 @@
     <string name="autofill_profile_editor_zip_code" msgid="283668573295656671">"郵遞區號:"</string>
     <string name="autofill_profile_editor_country" msgid="7234470301239156656">"國家/地區:"</string>
     <string name="autofill_profile_editor_phone_number" msgid="4938852821413729276">"電話:"</string>
-    <string name="autofill_profile_editor_phone_number_invalid" msgid="7166394872369167580">"無效的電話號碼"</string>
+    <string name="autofill_profile_editor_phone_number_invalid" msgid="7166394872369167580">"電話號碼錯誤"</string>
     <string name="autofill_profile_editor_save_profile" msgid="8349915287435262888">"儲存設定檔"</string>
     <string name="autofill_profile_successful_save" msgid="6834102203944938409">"設定檔已儲存"</string>
     <string name="autofill_profile_successful_delete" msgid="2421442112954362732">"個人資料已刪除"</string>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 6a7c578..15a5c87 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -36,4 +36,5 @@
     <color name="qcMenuBackground">#C0000000</color>
     <color name="qc_normal">#C02447B2</color>
     <color name="qc_selected">#D0102052</color>
+    <color name="tabViewTitleBackground">#D0000000</color>
 </resources>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index 99eb43e..38a7802 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -30,21 +30,21 @@
     <dimen name="widgetItemMinHeight">48dip</dimen>
     <dimen name="favicon_size">16dip</dimen>
     <dimen name="favicon_padded_size">20dip</dimen>
-    <dimen name="qc_radius_start">50dip</dimen>
-    <dimen name="qc_radius_increment">70dip</dimen>
-    <dimen name="qc_slop">15dip</dimen>
+    <dimen name="qc_radius_start">30dip</dimen>
+    <dimen name="qc_radius_increment">60dip</dimen>
+    <dimen name="qc_slop">10dip</dimen>
     <dimen name="qc_touch_offset">15dip</dimen>
     <dimen name="qc_tab_title_height">30dip</dimen>
-    <dimen name="qc_thumb_width">240dip</dimen>
-    <dimen name="qc_thumb_height">160dip</dimen>
-    <dimen name="qc_item_size">48dip</dimen>
+    <dimen name="qc_thumb_width">160dip</dimen>
+    <dimen name="qc_thumb_height">120dip</dimen>
+    <dimen name="qc_item_size">40dip</dimen>
     <dimen name="bookmark_widget_thumb_size">32dip</dimen>
     <dimen name="bookmark_widget_favicon_size">26dip</dimen>
-    <!-- For the most visited page -->
-    <dimen name="mv_max_width">830dp</dimen>
-    <dimen name="mv_item_width">96dp</dimen>
-    <dimen name="mv_item_width_portrait">96dp</dimen>
-    <dimen name="mv_border_width">3dp</dimen>
+    <!-- For the most visited page (we use px as these are adjusted by the browser) -->
+    <dimen name="mv_max_width">830px</dimen>
+    <dimen name="mv_item_width">94px</dimen>
+    <dimen name="mv_item_width_portrait">80px</dimen>
+    <dimen name="mv_border_width">2px</dimen>
     <dimen name="tab_padding_top">12dp</dimen>
     <dimen name="tab_first_padding_left">12dp</dimen>
     <dimen name="list_favicon_padding">5dip</dimen>
@@ -55,6 +55,13 @@
     <dimen name="widgetVerticalSpacing">12dip</dimen>
     <!-- For the combined Bookmarks History view -->
     <dimen name="combo_paddingTop">10dip</dimen>
-    <dimen name="combo_paddingLeftRight">16dip</dimen>
-    <dimen name="combo_horizontalSpacing">8dip</dimen>
+    <dimen name="combo_paddingLeftRight">8dip</dimen>
+    <dimen name="combo_horizontalSpacing">6dip</dimen>
+    <dimen name="tab_view_thumbnail_height">76dip</dimen>
+    <!-- Preference activity side margins -->
+    <dimen name="preference_screen_side_margin">0dp</dimen>
+    <!-- Preference activity side margins negative-->
+    <dimen name="preference_screen_side_margin_negative">0dp</dimen>
+    <!-- Preference widget area width (to the left of the text) -->
+    <dimen name="preference_widget_width">56dp</dimen>
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e754ea9..7b916f4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -975,4 +975,12 @@
          the search engines list (Preferences->Advanced->Set search engine
          [CHAR LIMIT=80] -->
     <string name="instant_search_label">Google with Instant (Labs)</string>
+    <!-- Recover tabs after a crash dialog title [CHAR LIMIT=32] -->
+    <string name="recover_title">Restore windows?</string>
+    <!-- Recover tabs after a crash dialog prompt [CHAR LIMIT=none] -->
+    <string name="recover_prompt">Browser appears to have crashed. Would you like to restore your windows from last time?</string>
+    <!-- Yes, recover windows from last time [CHAR LIMIT=10] -->
+    <string name="recover_yes">Yes</string>
+    <!-- No, don't recover windows from last time [CHAR LIMIT=10] -->
+    <string name="recover_no">No</string>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8d222f4..100a1d1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -23,6 +23,7 @@
         <item name="android:colorBackground">#FFFFFFFF</item>
         <item name="android:windowActionBar">true</item>
         <item name="android:windowNoTitle">false</item>
+        <item name="android:windowActionBarOverlay">true</item>
         <item name="android:actionBarStyle">@style/ActionBarStyle</item>
         <item name="android:actionButtonStyle">@style/ActionButton</item>
     </style>
diff --git a/res/xml-xlarge/lab_preferences.xml b/res/xml-xlarge/lab_preferences.xml
new file mode 100644
index 0000000..87383b0
--- /dev/null
+++ b/res/xml-xlarge/lab_preferences.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen
+        xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <CheckBoxPreference
+        android:key="enable_quick_controls"
+        android:defaultValue="false"
+        android:title="@string/pref_lab_quick_controls"
+        android:summary="@string/pref_lab_quick_controls_summary" />
+
+    <CheckBoxPreference
+        android:key="use_most_visited_homepage"
+        android:defaultValue="false"
+        android:title="@string/pref_lab_most_visited_homepage"
+        android:summary="@string/pref_lab_most_visited_homepage_summary" />
+
+    <CheckBoxPreference
+        android:key="use_instant_search"
+        android:defaultValue="false"
+        android:title="@string/pref_use_instant_search"
+        android:summary="@string/pref_use_instant_search_summary" />
+</PreferenceScreen>
diff --git a/res/xml/lab_preferences.xml b/res/xml/lab_preferences.xml
index 87383b0..b33052f 100644
--- a/res/xml/lab_preferences.xml
+++ b/res/xml/lab_preferences.xml
@@ -16,22 +16,14 @@
 
 <PreferenceScreen
         xmlns:android="http://schemas.android.com/apk/res/android" >
-
     <CheckBoxPreference
         android:key="enable_quick_controls"
         android:defaultValue="false"
         android:title="@string/pref_lab_quick_controls"
         android:summary="@string/pref_lab_quick_controls_summary" />
-
     <CheckBoxPreference
         android:key="use_most_visited_homepage"
         android:defaultValue="false"
         android:title="@string/pref_lab_most_visited_homepage"
         android:summary="@string/pref_lab_most_visited_homepage_summary" />
-
-    <CheckBoxPreference
-        android:key="use_instant_search"
-        android:defaultValue="false"
-        android:title="@string/pref_use_instant_search"
-        android:summary="@string/pref_use_instant_search_summary" />
 </PreferenceScreen>
diff --git a/src/com/android/browser/ActiveTabsPage.java b/src/com/android/browser/ActiveTabsPage.java
index 664fd68..52d943f 100644
--- a/src/com/android/browser/ActiveTabsPage.java
+++ b/src/com/android/browser/ActiveTabsPage.java
@@ -18,62 +18,87 @@
 
 import android.content.Context;
 import android.graphics.Bitmap;
-import android.os.Handler;
+import android.text.TextUtils;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.widget.AbsListView;
 import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.ImageView.ScaleType;
 import android.widget.LinearLayout;
-import android.widget.ListView;
 import android.widget.TextView;
 
-public class ActiveTabsPage extends LinearLayout {
+interface OnCloseTab {
+    void onCloseTab(int position);
+}
 
-    private static final String LOGTAG = "TabPicker";
+public class ActiveTabsPage extends LinearLayout implements OnClickListener,
+        OnItemClickListener, OnCloseTab {
 
-    private final LayoutInflater mFactory;
-    private final UiController mUiController;
-    private final TabControl mControl;
-    private final TabsListAdapter mAdapter;
-    private final ListView mListView;
+    private Context mContext;
+    private UiController mController;
+    private TabControl mTabControl;
+    private View mNewTab, mNewIncognitoTab;
+    private TabAdapter mAdapter;
+    private AbsListView mTabsList;
 
-    public ActiveTabsPage(Context context, UiController control) {
+    public ActiveTabsPage(Context context, UiController controller) {
         super(context);
-        mUiController = control;
-        mControl = control.getTabControl();
-        mFactory = LayoutInflater.from(context);
-        mFactory.inflate(R.layout.active_tabs, this);
-        mListView = (ListView) findViewById(R.id.list);
-        mAdapter = new TabsListAdapter();
-        mListView.setAdapter(mAdapter);
-        mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-                public void onItemClick(AdapterView<?> parent, View view,
-                        int position, long id) {
-                    if (mControl.canCreateNewTab()) {
-                        position -= 2;
-                    }
-                    boolean needToAttach = false;
-                    if (position == -2) {
-                        // Create a new tab
-                        mUiController.openTabToHomePage();
-                    } else if (position == -1) {
-                        // Create a new incognito tab
-                        mUiController.openIncognitoTab();
-                    } else {
-                        // Open the corresponding tab
-                        // If the tab is the current one, switchToTab will
-                        // do nothing and return, so we need to make sure
-                        // it gets attached back to its mContentView in
-                        // removeActiveTabPage
-                        needToAttach = !mUiController.switchToTab(position);
-                    }
-                    mUiController.removeActiveTabsPage(needToAttach);
-                }
-        });
+        mContext = context;
+        mController = controller;
+        mTabControl = mController.getTabControl();
+        setOrientation(VERTICAL);
+        setBackgroundResource(R.drawable.bg_browser);
+        LayoutInflater inflate = LayoutInflater.from(mContext);
+        inflate.inflate(R.layout.active_tabs, this, true);
+        mNewTab = findViewById(R.id.new_tab);
+        mNewIncognitoTab = findViewById(R.id.new_incognito_tab);
+        mNewTab.setOnClickListener(this);
+        mNewIncognitoTab.setOnClickListener(this);
+        int visibility = mTabControl.canCreateNewTab() ? View.VISIBLE : View.GONE;
+        mNewTab.setVisibility(visibility);
+        mNewIncognitoTab.setVisibility(visibility);
+        mTabsList = (AbsListView) findViewById(android.R.id.list);
+        mAdapter = new TabAdapter(mContext, mTabControl);
+        mAdapter.setOnCloseListener(this);
+        mTabsList.setAdapter(mAdapter);
+        mTabsList.setOnItemClickListener(this);
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v == mNewTab) {
+            mController.openTabToHomePage();
+        } else if (v == mNewIncognitoTab) {
+            mController.openIncognitoTab();
+        }
+        mController.removeActiveTabsPage(false);
+    }
+
+    @Override
+    public void onItemClick(
+            AdapterView<?> parent, View view, int position, long id) {
+        boolean needToAttach = !mController.switchToTab(position);
+        mController.removeActiveTabsPage(needToAttach);
+    }
+
+    @Override
+    public void onCloseTab(int position) {
+        Tab tab = mTabControl.getTab(position);
+        if (tab != null) {
+            mController.closeTab(tab);
+            if (mTabControl.getTabCount() == 0) {
+                mController.openTabToHomePage();
+                mController.removeActiveTabsPage(false);
+            } else {
+                mAdapter.notifyDataSetChanged();
+            }
+        }
     }
 
     /**
@@ -81,7 +106,7 @@
      * the parent to be pressed without being pressed itself.  This way the line
      * of a tab can be pressed, but the close button itself is not.
      */
-    private static class CloseHolder extends ImageView {
+    public static class CloseHolder extends ImageView {
         public CloseHolder(Context context, AttributeSet attrs) {
             super(context, attrs);
         }
@@ -96,118 +121,79 @@
         }
     }
 
-    private class TabsListAdapter extends BaseAdapter {
-        private boolean mNotified = true;
-        private int mReturnedCount;
-        private Handler mHandler = new Handler();
+    static class TabAdapter extends BaseAdapter implements OnClickListener {
 
+        LayoutInflater mInflater;
+        OnCloseTab mCloseListener;
+        TabControl mTabControl;
+
+        TabAdapter(Context context, TabControl tabs) {
+            mInflater = LayoutInflater.from(context);
+            mTabControl = tabs;
+        }
+
+        void setOnCloseListener(OnCloseTab listener) {
+            mCloseListener = listener;
+        }
+
+        @Override
+        public View getView(int position, View view, ViewGroup parent) {
+            if (view == null) {
+                view = mInflater.inflate(R.layout.tab_view, parent, false);
+            }
+            ImageView favicon = (ImageView) view.findViewById(R.id.favicon);
+            ImageView thumbnail = (ImageView) view.findViewById(R.id.thumb);
+            TextView title = (TextView) view.findViewById(R.id.label);
+            Tab tab = getItem(position);
+
+            String label = tab.getTitle();
+            if (TextUtils.isEmpty(label)) {
+                label = tab.getUrl();
+            }
+            title.setText(label);
+            Bitmap thumbnailBitmap = tab.getScreenshot();
+            if (thumbnailBitmap == null) {
+                thumbnail.setImageResource(R.drawable.browser_thumbnail);
+            } else {
+                thumbnail.setImageBitmap(thumbnailBitmap);
+            }
+            Bitmap faviconBitmap = tab.getFavicon();
+            if (tab.isPrivateBrowsingEnabled()) {
+                favicon.setImageResource(R.drawable.ic_incognito_holo_dark);
+            } else {
+                if (faviconBitmap == null) {
+                    favicon.setImageResource(R.drawable.app_web_browser_sm);
+                } else {
+                    favicon.setImageBitmap(faviconBitmap);
+                }
+            }
+            View close = view.findViewById(R.id.close);
+            close.setTag(position);
+            close.setOnClickListener(this);
+            return view;
+        }
+
+        @Override
+        public void onClick(View v) {
+            int position = (Integer) v.getTag();
+            if (mCloseListener != null) {
+                mCloseListener.onCloseTab(position);
+            }
+        }
+
+        @Override
         public int getCount() {
-            int count = mControl.getTabCount();
-            if (mControl.canCreateNewTab()) {
-                count += 2;
-            }
-            // XXX: This is a workaround to be more like a real adapter. Most
-            // adapters call notifyDataSetChanged() whenever the internal data
-            // has changed. Since TabControl is our internal data, we don't
-            // know when that changes.
-            //
-            // Keep track of the last count we returned and whether we called
-            // notifyDataSetChanged(). If we did not initiate a data set
-            // change, and the count is different, send the notify and return
-            // the old count.
-            if (!mNotified && count != mReturnedCount) {
-                notifyChange();
-                return mReturnedCount;
-            }
-            mReturnedCount = count;
-            mNotified = false;
-            return count;
+            return mTabControl.getTabCount();
         }
-        public Object getItem(int position) {
-            return null;
+
+        @Override
+        public Tab getItem(int position) {
+            return mTabControl.getTab(position);
         }
+
+        @Override
         public long getItemId(int position) {
             return position;
         }
-        public int getViewTypeCount() {
-            return 2;
-        }
-        public int getItemViewType(int position) {
-            if (mControl.canCreateNewTab()) {
-                position -= 2;
-            }
-            // Do not recycle the "add new tab" item.
-            return position < 0 ? IGNORE_ITEM_VIEW_TYPE : 1;
-        }
-        public View getView(int position, View convertView, ViewGroup parent) {
-            final int tabCount = mControl.getTabCount();
-            if (mControl.canCreateNewTab()) {
-                position -= 2;
-            }
-
-            if (convertView == null) {
-                if (position == -2) {
-                    convertView = mFactory.inflate(R.layout.tab_view_add_tab, null);
-                } else if (position == -1) {
-                    convertView = mFactory.inflate(R.layout.tab_view_add_incognito_tab, null);
-                } else {
-                    convertView = mFactory.inflate(R.layout.tab_view, null);
-                }
-            }
-
-            if (position >= 0) {
-                TextView title =
-                        (TextView) convertView.findViewById(R.id.title);
-                TextView url = (TextView) convertView.findViewById(R.id.url);
-                ImageView favicon =
-                        (ImageView) convertView.findViewById(R.id.favicon);
-                View close = convertView.findViewById(R.id.close);
-                Tab tab = mControl.getTab(position);
-                if (tab.getWebView() == null) {
-                    // This means that populatePickerData will have to use the
-                    // saved state.
-                    Log.w(LOGTAG, "Tab " + position + " has a null WebView and "
-                            + (tab.getSavedState() == null ? "null" : "non-null")
-                            + " saved state ");
-                }
-                if (tab.getTitle() == null || tab.getTitle().length() == 0) {
-                    Log.w(LOGTAG, "Tab " + position + " has no title. "
-                            + "Check above in the Logs to see whether it has a "
-                            + "null WebView or null WebHistoryItem");
-                }
-                title.setText(tab.getTitle());
-                url.setText(tab.getUrl());
-                Bitmap icon = tab.getFavicon();
-                if (icon != null) {
-                    favicon.setImageBitmap(icon);
-                } else {
-                    favicon.setImageResource(R.drawable.app_web_browser_sm);
-                }
-                final int closePosition = position;
-                close.setOnClickListener(new View.OnClickListener() {
-                        public void onClick(View v) {
-                            mUiController.closeTab(
-                                    mControl.getTab(closePosition));
-                            if (tabCount == 1) {
-                                mUiController.openTabToHomePage();
-                                mUiController.removeActiveTabsPage(false);
-                            } else {
-                                mNotified = true;
-                                notifyDataSetChanged();
-                            }
-                        }
-                });
-            }
-            return convertView;
-        }
-
-        void notifyChange() {
-            mHandler.post(new Runnable() {
-                public void run() {
-                    mNotified = true;
-                    notifyDataSetChanged();
-                }
-            });
-        }
     }
 }
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 71346ae..b7964dc 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -17,12 +17,10 @@
 package com.android.browser;
 
 import com.android.browser.Tab.LockIcon;
-import com.android.browser.UI.DropdownChangeListener;
 
-import android.animation.Animator;
-import android.animation.Animator.AnimatorListener;
 import android.animation.ObjectAnimator;
 import android.app.Activity;
+import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
@@ -89,8 +87,6 @@
 
     private Toast mStopToast;
 
-    private boolean mTitleShowing;
-
     // the default <video> poster
     private Bitmap mDefaultVideoPoster;
     // the video progress view
@@ -119,7 +115,20 @@
         mCustomViewContainer = (FrameLayout) mBrowserFrameLayout
                 .findViewById(R.id.fullscreen_custom_content);
         frameLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
-        mTitleShowing = false;
+    }
+
+    @Override
+    public WebView createWebView(boolean privateBrowsing) {
+        // Create a new WebView
+        BrowserWebView w = new BrowserWebView(mActivity, null,
+                android.R.attr.webViewStyle, privateBrowsing);
+        initWebViewSettings(w);
+        return w;
+    }
+
+    @Override
+    public WebView createSubWebView(boolean privateBrowsing) {
+        return createWebView(privateBrowsing);
     }
 
     /**
@@ -132,6 +141,10 @@
         w.setMapTrackballToArrowKeys(false); // use trackball directly
         // Enable the built-in zoom
         w.getSettings().setBuiltInZoomControls(true);
+        boolean supportsMultiTouch = mActivity.getPackageManager()
+                .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);
+        w.getSettings().setDisplayZoomControls(!supportsMultiTouch);
+        w.setExpandedTileBounds(true);  // smoother scrolling
 
         // Add this WebView to the settings observer list and update the
         // settings
@@ -167,8 +180,6 @@
     public void onConfigurationChanged(Configuration config) {
     }
 
-    public abstract void editUrl(boolean clearInput);
-
     // key handling
 
     @Override
@@ -215,7 +226,7 @@
 
     @Override
     public boolean needsRestoreAllTabs() {
-        return false;
+        return true;
     }
 
     @Override
@@ -303,8 +314,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);
     }
 
@@ -398,50 +407,76 @@
         mContentView.addView(container, COVER_SCREEN_PARAMS);
     }
 
+    protected void refreshWebView() {
+        WebView web = getWebView();
+        if (web != null) {
+            web.invalidate();
+        }
+    }
+
+    public void editUrl(boolean clearInput) {
+        if (mUiController.isInCustomActionMode()) {
+            mUiController.endActionMode();
+        }
+        showTitleBar();
+        getTitleBar().startEditingUrl(clearInput);
+    }
+
     boolean canShowTitleBar() {
         return !isTitleBarShowing()
                 && !isActivityPaused()
                 && (getActiveTab() != null)
-                && (getActiveTab().getWebView() != null)
+                && (getWebView() != null)
                 && !mUiController.isInCustomActionMode();
     }
 
     void showTitleBar() {
-        mTitleShowing = true;
+        if (canShowTitleBar()) {
+            getTitleBar().show();
+        }
     }
 
     protected void hideTitleBar() {
-        mTitleShowing = false;
+        if (getTitleBar().isShowing()) {
+            getTitleBar().hide();
+        }
     }
 
     protected boolean isTitleBarShowing() {
-        return mTitleShowing;
+        return getTitleBar().isShowing();
     }
 
     protected abstract TitleBarBase getTitleBar();
 
     protected void setTitleGravity(int gravity) {
+        // update the titlebar layout params
+        // required to avoid scroll to top when focused
         getTitleBar().setTitleGravity(gravity);
-        Tab tab = getActiveTab();
-        if ((tab != null) && (tab.getWebView() != null)) {
-            tab.getWebView().setTitleBarGravity(gravity);
+        WebView web = getWebView();
+        if (web != null) {
+            web.setTitleBarGravity(gravity);
         }
     }
 
     @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;
@@ -455,8 +490,9 @@
         FrameLayout wrapper =
             (FrameLayout) mContentView.findViewById(R.id.webview_wrapper);
         wrapper.setVisibility(View.GONE);
-        hideTitleBar();
+        getTitleBar().stopEditingUrl();
         dismissIME();
+        hideTitleBar();
         if (mActiveTab != null) {
             WebView web = mActiveTab.getWebView();
             mActiveTab.putInBackground();
@@ -562,7 +598,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.
@@ -608,11 +646,6 @@
 
     @Override
     public void onActionModeFinished(boolean inLoad) {
-        if (inLoad) {
-            // the titlebar was removed when the CAB was shown
-            // if the page is loading, show it again
-            showTitleBar();
-        }
     }
 
     // active tabs page
@@ -721,7 +754,26 @@
         warning.show();
     }
 
-    @Override
-    public void registerDropdownChangeListener(DropdownChangeListener d) {
+    protected void captureTab(final Tab tab) {
+        captureTab(tab,
+                (int) mActivity.getResources()
+                        .getDimension(R.dimen.qc_thumb_width),
+                (int) mActivity.getResources()
+                        .getDimension(R.dimen.qc_thumb_height));
     }
+
+    protected void captureTab(final Tab tab, int width, int height) {
+        if ((tab == null) || (tab.getWebView() == null)) return;
+        Bitmap sshot = Controller.createScreenshot(tab, width, height);
+        tab.setScreenshot(sshot);
+    }
+
+    protected WebView getWebView() {
+        if (mActiveTab != null) {
+            return mActiveTab.getWebView();
+        } else {
+            return null;
+        }
+    }
+
 }
diff --git a/src/com/android/browser/BookmarkItem.java b/src/com/android/browser/BookmarkItem.java
index 4e60073..8247c91 100644
--- a/src/com/android/browser/BookmarkItem.java
+++ b/src/com/android/browser/BookmarkItem.java
@@ -63,6 +63,16 @@
         item.mImageView.setImageDrawable(mImageView.getDrawable());
     }
 
+    public void startMarquee() {
+        mTextView.setSelected(true);
+        mUrlText.setSelected(true);
+    }
+
+    public void stopMarquee() {
+        mTextView.setSelected(false);
+        mUrlText.setSelected(false);
+    }
+
     /**
      * Return the name assigned to this bookmark item.
      */
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index 9e71077..201079c 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -20,7 +20,6 @@
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
-import android.graphics.drawable.Drawable;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -31,7 +30,6 @@
 class BrowserBookmarksAdapter extends CursorAdapter {
     LayoutInflater mInflater;
     int mCurrentView;
-    Drawable mFaviconBackground;
 
     /**
      *  Create a new BrowserBookmarksAdapter.
@@ -42,8 +40,6 @@
         super(context, null, 0);
         mInflater = LayoutInflater.from(context);
         selectView(defaultView);
-        float density = context.getResources().getDisplayMetrics().density;
-        mFaviconBackground = BookmarkUtils.createListFaviconBackground(context);
     }
 
     @Override
@@ -101,9 +97,7 @@
             } else {
                 favicon.setImageBitmap(faviconBitmap);
             }
-            //favicon.setBackgroundResource(R.drawable.bookmark_list_favicon_bg);
-            // TODO: Switch to above instead of below once b/3353813 is fixed
-            favicon.setBackgroundDrawable(mFaviconBackground);
+            favicon.setBackgroundResource(R.drawable.bookmark_list_favicon_bg);
         }
     }
 
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index de28d0d..88b8979 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -331,10 +331,15 @@
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
-        setHasOptionsMenu(true);
+        SharedPreferences prefs = PreferenceManager
+                .getDefaultSharedPreferences(getActivity());
+        prefs.registerOnSharedPreferenceChangeListener(this);
+        mCurrentView = prefs.getInt(PREF_SELECTED_VIEW, getDefaultView());
 
         Bundle args = getArguments();
         mDisableNewWindow = args == null ? false : args.getBoolean(EXTRA_DISABLE_WINDOW, false);
+
+        setHasOptionsMenu(true);
     }
 
     @Override
@@ -372,11 +377,6 @@
         }
         // Start the loaders
         LoaderManager lm = getLoaderManager();
-        SharedPreferences prefs = PreferenceManager
-                .getDefaultSharedPreferences(getActivity());
-        prefs.registerOnSharedPreferenceChangeListener(this);
-        mCurrentView =
-            prefs.getInt(PREF_SELECTED_VIEW, getDefaultView());
         mAdapter = new BrowserBookmarksAdapter(getActivity(), mCurrentView);
         lm.restartLoader(LOADER_BOOKMARKS, null, this);
 
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 44f358d..264c465 100644
--- a/src/com/android/browser/BrowserHistoryPage.java
+++ b/src/com/android/browser/BrowserHistoryPage.java
@@ -59,6 +59,9 @@
 import android.widget.AdapterView.AdapterContextMenuInfo;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.BaseAdapter;
+import android.widget.ExpandableListView;
+import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
+import android.widget.ExpandableListView.OnChildClickListener;
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
@@ -68,7 +71,7 @@
  * days of viewing.
  */
 public class BrowserHistoryPage extends Fragment
-        implements LoaderCallbacks<Cursor> {
+        implements LoaderCallbacks<Cursor>, OnChildClickListener {
 
     static final int LOADER_HISTORY = 1;
     static final int LOADER_MOST_VISITED = 2;
@@ -82,6 +85,7 @@
     ListView mGroupList, mChildList;
     private ViewGroup mPrefsContainer;
     private FragmentBreadCrumbs mFragmentBreadCrumbs;
+    private ExpandableListView mHistoryList;
 
     // Implementation of WebIconDatabase.IconListener
     class IconReceiver implements IconListener {
@@ -187,7 +191,7 @@
         switch (loader.getId()) {
             case LOADER_HISTORY: {
                 mAdapter.changeCursor(data);
-                if (!mAdapter.isEmpty()
+                if (!mAdapter.isEmpty() && mGroupList != null
                         && mGroupList.getCheckedItemPosition() == ListView.INVALID_POSITION) {
                     selectGroup(0);
                 }
@@ -229,26 +233,13 @@
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
         mRoot = inflater.inflate(R.layout.history, container, false);
-        ViewStub stub = (ViewStub) mRoot.findViewById(R.id.pref_stub);
-        stub.setLayoutResource(com.android.internal.R.layout.preference_list_content);
-        stub.inflate();
-        mGroupList = (ListView) mRoot.findViewById(android.R.id.list);
-        mPrefsContainer = (ViewGroup) mRoot.findViewById(com.android.internal.R.id.prefs_frame);
-        mFragmentBreadCrumbs = (FragmentBreadCrumbs) mRoot.findViewById(android.R.id.title);
-        mFragmentBreadCrumbs.setMaxVisible(1);
-        mFragmentBreadCrumbs.setActivity(getActivity());
-        mPrefsContainer.setVisibility(View.VISIBLE);
         mAdapter = new HistoryAdapter(getActivity());
-        mGroupList.setAdapter(new HistoryGroupWrapper(mAdapter));
-        mGroupList.setOnItemClickListener(mGroupItemClickListener);
-        mGroupList.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
-        mChildWrapper = new HistoryChildWrapper(mAdapter);
-        mChildList = new ListView(getActivity());
-        mChildList.setAdapter(mChildWrapper);
-        mChildList.setOnItemClickListener(mChildItemClickListener);
-        registerForContextMenu(mChildList);
-        ViewGroup prefs = (ViewGroup) mRoot.findViewById(com.android.internal.R.id.prefs);
-        prefs.addView(mChildList);
+        ViewStub stub = (ViewStub) mRoot.findViewById(R.id.pref_stub);
+        if (stub != null) {
+            inflateTwoPane(stub);
+        } else {
+            inflateSinglePane();
+        }
 
         // Start the loaders
         getLoaderManager().restartLoader(LOADER_HISTORY, null, this);
@@ -259,6 +250,34 @@
         return mRoot;
     }
 
+    private void inflateSinglePane() {
+        mHistoryList = (ExpandableListView) mRoot.findViewById(R.id.history);
+        mHistoryList.setAdapter(mAdapter);
+        mHistoryList.setOnChildClickListener(this);
+        registerForContextMenu(mHistoryList);
+    }
+
+    private void inflateTwoPane(ViewStub stub) {
+        stub.setLayoutResource(R.layout.preference_list_content);
+        stub.inflate();
+        mGroupList = (ListView) mRoot.findViewById(android.R.id.list);
+        mPrefsContainer = (ViewGroup) mRoot.findViewById(R.id.prefs_frame);
+        mFragmentBreadCrumbs = (FragmentBreadCrumbs) mRoot.findViewById(android.R.id.title);
+        mFragmentBreadCrumbs.setMaxVisible(1);
+        mFragmentBreadCrumbs.setActivity(getActivity());
+        mPrefsContainer.setVisibility(View.VISIBLE);
+        mGroupList.setAdapter(new HistoryGroupWrapper(mAdapter));
+        mGroupList.setOnItemClickListener(mGroupItemClickListener);
+        mGroupList.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
+        mChildWrapper = new HistoryChildWrapper(mAdapter);
+        mChildList = new ListView(getActivity());
+        mChildList.setAdapter(mChildWrapper);
+        mChildList.setOnItemClickListener(mChildItemClickListener);
+        registerForContextMenu(mChildList);
+        ViewGroup prefs = (ViewGroup) mRoot.findViewById(R.id.prefs);
+        prefs.addView(mChildList);
+    }
+
     private OnItemClickListener mGroupItemClickListener = new OnItemClickListener() {
         @Override
         public void onItemClick(
@@ -279,6 +298,13 @@
     };
 
     @Override
+    public boolean onChildClick(ExpandableListView parent, View view,
+            int groupPosition, int childPosition, long id) {
+        mCallbacks.onUrlSelected(((HistoryItem) view).getUrl(), false);
+        return true;
+    }
+
+    @Override
     public void onDestroy() {
         super.onDestroy();
         CombinedBookmarkHistoryView.getIconListenerSet().removeListener(mIconReceiver);
@@ -341,17 +367,30 @@
         }
     }
 
+    View getTargetView(ContextMenuInfo menuInfo) {
+        if (menuInfo instanceof AdapterContextMenuInfo) {
+            return ((AdapterContextMenuInfo) menuInfo).targetView;
+        }
+        if (menuInfo instanceof ExpandableListContextMenuInfo) {
+            return ((ExpandableListContextMenuInfo) menuInfo).targetView;
+        }
+        return null;
+    }
+
     @Override
     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
-        AdapterContextMenuInfo i = (AdapterContextMenuInfo) menuInfo;
+
+        View targetView = getTargetView(menuInfo);
+        if (!(targetView instanceof HistoryItem)) {
+            return;
+        }
+        HistoryItem historyItem = (HistoryItem) targetView;
 
         // Inflate the menu
         Activity parent = getActivity();
         MenuInflater inflater = parent.getMenuInflater();
         inflater.inflate(R.menu.historycontext, menu);
 
-        HistoryItem historyItem = (HistoryItem) i.targetView;
-
         // Setup the header
         if (mContextHeader == null) {
             mContextHeader = new HistoryItem(parent, false);
@@ -382,12 +421,11 @@
 
     @Override
     public boolean onContextItemSelected(MenuItem item) {
-        AdapterContextMenuInfo i =
-            (AdapterContextMenuInfo) item.getMenuInfo();
-        if (i == null) {
+        ContextMenuInfo menuInfo = item.getMenuInfo();
+        if (menuInfo == null) {
             return false;
         }
-        HistoryItem historyItem = (HistoryItem) i.targetView;
+        HistoryItem historyItem = (HistoryItem) getTargetView(menuInfo);
         String url = historyItem.getUrl();
         String title = historyItem.getName();
         Activity activity = getActivity();
@@ -636,6 +674,7 @@
                         item.getPaddingRight(),
                         item.getPaddingBottom());
                 item.setFaviconBackground(mFaviconBackground);
+                item.startMarquee();
             } else {
                 item = (HistoryItem) convertView;
             }
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 357d1e9..9dc3c5f 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -193,7 +193,7 @@
     public static final Uri RLZ_PROVIDER_URI = Uri.parse("content://" + RLZ_PROVIDER + "/");
 
     // Set to true to enable some of the about:debug options
-    public static final boolean DEV_BUILD = false;
+    public static final boolean DEV_BUILD = true;
 
     private Controller mController;
 
diff --git a/src/com/android/browser/ScrollWebView.java b/src/com/android/browser/BrowserWebView.java
similarity index 92%
rename from src/com/android/browser/ScrollWebView.java
rename to src/com/android/browser/BrowserWebView.java
index 8c89e51..6111aa6 100644
--- a/src/com/android/browser/ScrollWebView.java
+++ b/src/com/android/browser/BrowserWebView.java
@@ -17,7 +17,6 @@
 package com.android.browser;
 
 import android.content.Context;
-import android.graphics.Bitmap;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
@@ -28,14 +27,13 @@
 /**
  * Manage WebView scroll events
  */
-public class ScrollWebView extends WebView implements Runnable {
+public class BrowserWebView extends WebView implements Runnable {
 
     private ScrollListener mScrollListener;
     private boolean mIsCancelled;
     private boolean mBackgroundRemoved = false;
     private boolean mUserInitiated = false;
     private TitleBarBase mTitleBar;
-    private Bitmap mBitmap;
 
     /**
      * @param context
@@ -43,7 +41,7 @@
      * @param defStyle
      * @param javascriptInterfaces
      */
-    public ScrollWebView(Context context, AttributeSet attrs, int defStyle,
+    public BrowserWebView(Context context, AttributeSet attrs, int defStyle,
             Map<String, Object> javascriptInterfaces, boolean privateBrowsing) {
         super(context, attrs, defStyle, javascriptInterfaces, privateBrowsing);
     }
@@ -53,7 +51,7 @@
      * @param attrs
      * @param defStyle
      */
-    public ScrollWebView(
+    public BrowserWebView(
             Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) {
         super(context, attrs, defStyle, privateBrowsing);
     }
@@ -62,14 +60,14 @@
      * @param context
      * @param attrs
      */
-    public ScrollWebView(Context context, AttributeSet attrs) {
+    public BrowserWebView(Context context, AttributeSet attrs) {
         super(context, attrs);
     }
 
     /**
      * @param context
      */
-    public ScrollWebView(Context context) {
+    public BrowserWebView(Context context) {
         super(context);
     }
 
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index a028882..2f47cad 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -47,6 +47,7 @@
 import android.os.Environment;
 import android.os.Handler;
 import android.os.Message;
+import android.os.Parcel;
 import android.os.PowerManager;
 import android.os.PowerManager.WakeLock;
 import android.preference.PreferenceActivity;
@@ -83,6 +84,7 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileOutputStream;
 import java.net.URLEncoder;
 import java.util.Calendar;
 import java.util.HashMap;
@@ -198,6 +200,7 @@
     // Tabs' notion of whether they represent bookmarked sites.
     private ContentObserver mBookmarksObserver;
     private DataController mDataController;
+    private CrashRecoveryHandler mCrashRecoveryHandler;
 
     private static class ClearThumbnails extends AsyncTask<File, Void, Void> {
         @Override
@@ -219,6 +222,7 @@
         mDataController = DataController.getInstance(mActivity);
         mTabControl = new TabControl(this);
         mSettings.setController(this);
+        mCrashRecoveryHandler = new CrashRecoveryHandler(this);
 
         mUrlHandler = new UrlHandler(this);
         mIntentHandler = new IntentHandler(mActivity, this);
@@ -252,6 +256,15 @@
     }
 
     void start(final Bundle icicle, final Intent intent) {
+        if (icicle != null) {
+            mCrashRecoveryHandler.clearState();
+            doStart(icicle, intent);
+        } else {
+            mCrashRecoveryHandler.startRecovery(intent);
+        }
+    }
+
+    void doStart(final Bundle icicle, final Intent intent) {
         // Unless the last browser usage was within 24 hours, destroy any
         // remaining incognito tabs.
 
@@ -279,12 +292,12 @@
         GoogleAccountLogin.startLoginIfNeeded(mActivity,
                 new Runnable() {
                     @Override public void run() {
-                        start(icicle, intent, currentTab, restoreIncognitoTabs);
+                        onPreloginFinished(icicle, intent, currentTab, restoreIncognitoTabs);
                     }
                 });
     }
 
-    private void start(Bundle icicle, Intent intent, int currentTab,
+    private void onPreloginFinished(Bundle icicle, Intent intent, int currentTab,
             boolean restoreIncognitoTabs) {
         if (currentTab == -1) {
             final Bundle extra = intent.getExtras();
@@ -610,6 +623,7 @@
         mNetworkHandler.onPause();
 
         WebView.disablePlatformNotifications();
+        mCrashRecoveryHandler.clearState();
     }
 
     void onSaveInstanceState(Bundle outState) {
@@ -911,6 +925,11 @@
         }
         mDataController.updateVisitedHistory(url);
         WebIconDatabase.getInstance().retainIconForPageUrl(url);
+        if (!mActivityPaused) {
+            // Since we clear the state in onPause, don't backup the current
+            // state if we are already paused
+            mCrashRecoveryHandler.backupState();
+        }
     }
 
     @Override
@@ -1056,14 +1075,21 @@
         mActivity.startActivity(intent);
     }
 
-    public void activateVoiceSearchMode(String title) {
-        mUi.showVoiceTitleBar(title);
+    @Override
+    public void activateVoiceSearchMode(String title, List<String> results) {
+        mUi.showVoiceTitleBar(title, results);
     }
 
     public void revertVoiceSearchMode(Tab tab) {
         mUi.revertVoiceTitleBar(tab);
     }
 
+    public boolean supportsVoiceSearch() {
+        SearchEngine searchEngine = BrowserSettings.getInstance()
+                .getSearchEngine();
+        return (searchEngine != null && searchEngine.supportsVoiceSearch());
+    }
+
     public void showCustomView(Tab tab, View view,
             WebChromeClient.CustomViewCallback callback) {
         if (tab.inForeground()) {
@@ -1774,7 +1800,6 @@
                     // title bar once again.
                     mExtendedMenuOpen = false;
                     mUi.onExtendedMenuClosed(mInLoad);
-                    mUi.onOptionsMenuOpened();
                 }
             }
         } else {
@@ -2414,12 +2439,6 @@
         startSearch(result, false, bundle, false);
     }
 
-    @Override
-    public void startSearch(String url) {
-        startSearch(mSettings.getHomePage().equals(url) ? null : url, true,
-                null, false);
-    }
-
     private void startSearch(String initialQuery, boolean selectInitialQuery,
             Bundle appSearchData, boolean globalSearch) {
         if (appSearchData == null) {
diff --git a/src/com/android/browser/CrashRecoveryHandler.java b/src/com/android/browser/CrashRecoveryHandler.java
new file mode 100644
index 0000000..9e98e76
--- /dev/null
+++ b/src/com/android/browser/CrashRecoveryHandler.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.browser;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Debug;
+import android.os.Parcel;
+import android.util.Log;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+
+public class CrashRecoveryHandler {
+
+    private static final String LOGTAG = "BrowserCrashRecovery";
+    private static final String STATE_FILE = "browser_state.parcel";
+    private static final int BUFFER_SIZE = 4096;
+
+    private Controller mController;
+
+    public CrashRecoveryHandler(Controller controller) {
+        mController = controller;
+    }
+
+    public void backupState() {
+        final Bundle state = new Bundle();
+        mController.onSaveInstanceState(state);
+        final Context context = mController.getActivity();
+        new Thread() {
+            @Override
+            public void run() {
+                Parcel p = Parcel.obtain();
+                try {
+                    state.writeToParcel(p, 0);
+                    FileOutputStream fout = context.openFileOutput(STATE_FILE,
+                            Context.MODE_PRIVATE);
+                    fout.write(p.marshall());
+                    fout.close();
+                } catch (Exception e) {
+                    Log.i(LOGTAG, "Failed to save persistent state", e);
+                } finally {
+                    p.recycle();
+                }
+            }
+        }.start();
+    }
+
+    public void clearState() {
+        Context context = mController.getActivity();
+        context.deleteFile(STATE_FILE);
+    }
+
+    public void promptToRecover(final Bundle state, final Intent intent) {
+        new AlertDialog.Builder(mController.getActivity())
+                .setTitle(R.string.recover_title)
+                .setMessage(R.string.recover_prompt)
+                .setPositiveButton(R.string.recover_yes, new OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        mController.doStart(state, intent);
+                    }
+                })
+                .setNegativeButton(R.string.recover_no, new OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        clearState();
+                        mController.doStart(null, intent);
+                    }
+                })
+                .show();
+    }
+
+    public void startRecovery(Intent intent) {
+        Parcel parcel = Parcel.obtain();
+        try {
+            Context context = mController.getActivity();
+            FileInputStream fin = context.openFileInput(STATE_FILE);
+            ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
+            byte[] buffer = new byte[BUFFER_SIZE];
+            int read;
+            while ((read = fin.read(buffer)) > 0) {
+                dataStream.write(buffer, 0, read);
+            }
+            byte[] data = dataStream.toByteArray();
+            parcel.unmarshall(data, 0, data.length);
+            parcel.setDataPosition(0);
+            Bundle state = parcel.readBundle();
+            promptToRecover(state, intent);
+        } catch (FileNotFoundException e) {
+            // No state to recover
+            mController.doStart(null, intent);
+        } catch (Exception e) {
+            Log.w(LOGTAG, "Failed to recover state!", e);
+            mController.doStart(null, intent);
+        } finally {
+            parcel.recycle();
+        }
+    }
+}
diff --git a/src/com/android/browser/InstantSearchEngine.java b/src/com/android/browser/InstantSearchEngine.java
index 85e494a..6ff7db7 100644
--- a/src/com/android/browser/InstantSearchEngine.java
+++ b/src/com/android/browser/InstantSearchEngine.java
@@ -174,7 +174,12 @@
      * visible tab.
      */
     private void switchSearchboxIfNeeded() {
-        final SearchBox searchBox = getCurrentWebview().getSearchBox();
+        final WebView current = getCurrentWebview();
+        if (current == null) {
+            return;
+        }
+
+        final SearchBox searchBox = current.getSearchBox();
         if (searchBox != mSearchBox) {
             if (mSearchBox != null) {
                 mSearchBox.removeSearchBoxListener(mListener);
@@ -188,7 +193,12 @@
     }
 
     private boolean isInstantPage() {
-        String currentUrl = getCurrentWebview().getUrl();
+        final WebView current = getCurrentWebview();
+        if (current == null) {
+            return false;
+        }
+
+        final String currentUrl = current.getUrl();
 
         if (currentUrl != null) {
             Uri uri = Uri.parse(currentUrl);
@@ -210,7 +220,10 @@
         mController.getActivity().runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                getCurrentWebview().loadUrl(getInstantBaseUrl());
+                final WebView current = getCurrentWebview();
+                if (current != null) {
+                    current.loadUrl(getInstantBaseUrl());
+                }
             }
         });
     }
@@ -292,7 +305,12 @@
     }
 
     private int rescaleHeight(int height) {
-        final float scale = getCurrentWebview().getScale();
+        final WebView current = getCurrentWebview();
+        if (current == null) {
+            return 0;
+        }
+
+        final float scale = current.getScale();
         if (scale != 0) {
             return (int) (height / scale);
         }
@@ -306,8 +324,10 @@
 
         if (rescaledHeight != mHeight) {
             mHeight = rescaledHeight;
-            mSearchBox.setDimensions(0, 0, 0, rescaledHeight);
-            mSearchBox.onresize();
+            if (mSearchBox != null) {
+                mSearchBox.setDimensions(0, 0, 0, rescaledHeight);
+                mSearchBox.onresize();
+            }
         }
     }
 
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index f1939e4..471a9e6 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -28,6 +28,7 @@
 import android.view.View;
 import android.view.WindowManager;
 import android.webkit.WebView;
+import android.widget.FrameLayout;
 
 /**
  * Ui for regular phone screen sizes
@@ -36,9 +37,11 @@
 
     private static final String LOGTAG = "PhoneUi";
 
-    private TitleBar mTitleBar;
+    private TitleBarPhone mTitleBar;
     private ActiveTabsPage mActiveTabsPage;
     private TouchProxy mTitleOverlay;
+    private boolean mUseQuickControls;
+    private PieControl mPieControl;
 
     boolean mExtendedMenuOpen;
     boolean mOptionsMenuOpen;
@@ -49,11 +52,13 @@
      */
     public PhoneUi(Activity browser, UiController controller) {
         super(browser, controller);
-        mTitleBar = new TitleBar(mActivity, mUiController, this);
+        mTitleBar = new TitleBarPhone(mActivity, mUiController, this,
+                mContentView);
         // mTitleBar will be always be shown in the fully loaded mode on
         // phone
         mTitleBar.setProgress(100);
         mActivity.getActionBar().hide();
+        setUseQuickControls(BrowserSettings.getInstance().useQuickControls());
     }
 
     @Override
@@ -62,23 +67,6 @@
         mActivity.getActionBar().hide();
     }
 
-    // webview factory
-
-    @Override
-    public WebView createWebView(boolean privateBrowsing) {
-        // Create a new WebView
-        WebView w = new WebView(mActivity, null,
-                android.R.attr.webViewStyle, privateBrowsing);
-        initWebViewSettings(w);
-        return w;
-    }
-
-    @Override
-    public WebView createSubWebView(boolean privateBrowsing) {
-        WebView web = createWebView(privateBrowsing);
-        return web;
-    }
-
     // lifecycle
 
     @Override
@@ -100,8 +88,10 @@
 
     @Override
     public void editUrl(boolean clearInput) {
-        String url = getActiveTab().getUrl();
-        mUiController.startSearch(url);
+        if (mUseQuickControls) {
+            getTitleBar().setShowProgressOnly(false);
+        }
+        super.editUrl(clearInput);
     }
 
     @Override
@@ -122,9 +112,16 @@
             if (progress == 100) {
                 if (!mOptionsMenuOpen || !mExtendedMenuOpen) {
                     hideTitleBar();
+                    if (mUseQuickControls) {
+                        mTitleBar.setShowProgressOnly(false);
+                    }
                 }
             } else {
                 if (!mOptionsMenuOpen || mExtendedMenuOpen) {
+                    if (mUseQuickControls && !mTitleBar.isEditingUrl()) {
+                        mTitleBar.setShowProgressOnly(true);
+                        setTitleGravity(Gravity.TOP);
+                    }
                     showTitleBar();
                 }
             }
@@ -132,41 +129,41 @@
     }
 
     @Override
-    public void setActiveTab(Tab tab) {
-        super.setActiveTab(tab);
-        WebView view = tab.getWebView();
+    public void setActiveTab(final Tab tab) {
+        captureTab(mActiveTab);
+        super.setActiveTab(tab, true);
+        setActiveTab(tab, true);
+    }
+
+    @Override
+    void setActiveTab(Tab tab, boolean needsAttaching) {
+        BrowserWebView view = (BrowserWebView) tab.getWebView();
         // TabControl.setCurrentTab has been called before this,
         // so the tab is guaranteed to have a webview
         if (view == null) {
             Log.e(LOGTAG, "active tab with no webview detected");
             return;
         }
-        view.setEmbeddedTitleBar(getTitleBar());
+        // Request focus on the top window.
+        if (mUseQuickControls) {
+            mPieControl.forceToTop(mContentView);
+            view.setScrollListener(null);
+        } else {
+            // check if title bar is already attached by animation
+            if (mTitleBar.getParent() == null) {
+                view.setEmbeddedTitleBar(mTitleBar);
+            }
+        }
         if (tab.isInVoiceSearchMode()) {
-            showVoiceTitleBar(tab.getVoiceDisplayTitle());
+            showVoiceTitleBar(tab.getVoiceDisplayTitle(), tab.getVoiceSearchResults());
         } else {
             revertVoiceTitleBar(tab);
         }
+        updateLockIconToLatest(tab);
         tab.getTopWindow().requestFocus();
     }
 
     @Override
-    protected void showTitleBar() {
-        if (canShowTitleBar()) {
-            setTitleGravity(Gravity.TOP);
-            super.showTitleBar();
-        }
-    }
-
-    @Override
-    protected void hideTitleBar() {
-        if (isTitleBarShowing()) {
-            setTitleGravity(Gravity.NO_GRAVITY);
-            super.hideTitleBar();
-        }
-    }
-
-    @Override
     protected TitleBarBase getTitleBar() {
         return mTitleBar;
     }
@@ -175,6 +172,7 @@
 
     @Override
     public void showActiveTabsPage() {
+        captureTab(mActiveTab);
         mActiveTabsPage = new ActiveTabsPage(mActivity, mUiController);
         mTitleBar.setVisibility(View.GONE);
         hideTitleBar();
@@ -201,15 +199,17 @@
 
     @Override
     public void onOptionsMenuOpened() {
-        mOptionsMenuOpen = true;
-        // options menu opened, show title bar
-        showTitleBar();
-        if (mTitleOverlay == null) {
-            // This assumes that getTitleBar always returns the same View
-            mTitleOverlay = new TouchProxy(mActivity, getTitleBar());
+        if (!mUseQuickControls) {
+            mOptionsMenuOpen = true;
+            // options menu opened, show title bar
+            showTitleBar();
+            if (mTitleOverlay == null) {
+                // This assumes that getTitleBar always returns the same View
+                mTitleOverlay = new TouchProxy(mActivity, getTitleBar());
+            }
+            mActivity.getWindowManager().addView(mTitleOverlay,
+                    mTitleOverlay.getWindowLayoutParams());
         }
-        mActivity.getWindowManager().addView(mTitleOverlay,
-                mTitleOverlay.getWindowLayoutParams());
     }
 
     @Override
@@ -232,7 +232,9 @@
     @Override
     public void onExtendedMenuClosed(boolean inLoad) {
         mExtendedMenuOpen = false;
-        showTitleBar();
+        if (!mUseQuickControls) {
+            showTitleBar();
+        }
     }
 
     @Override
@@ -255,6 +257,17 @@
     }
 
     @Override
+    public void onActionModeFinished(boolean inLoad) {
+        if (inLoad) {
+            if (mUseQuickControls) {
+                mTitleBar.setShowProgressOnly(true);
+            }
+            showTitleBar();
+        }
+        mActivity.getActionBar().hide();
+    }
+
+    @Override
     public boolean dispatchKey(int code, KeyEvent event) {
         return false;
     }
@@ -287,4 +300,62 @@
             return params;
         }
     }
+
+    @Override
+    protected void setTitleGravity(int gravity) {
+        if (mUseQuickControls) {
+            FrameLayout.LayoutParams lp =
+                    (FrameLayout.LayoutParams) getTitleBar().getLayoutParams();
+            lp.gravity = gravity;
+            getTitleBar().setLayoutParams(lp);
+        } else {
+            super.setTitleGravity(gravity);
+        }
+    }
+
+    private void setUseQuickControls(boolean useQuickControls) {
+        mUseQuickControls = useQuickControls;
+        getTitleBar().setUseQuickControls(mUseQuickControls);
+        if (useQuickControls) {
+            mPieControl = new PieControl(mActivity, mUiController, this);
+            mPieControl.attachToContainer(mContentView);
+            WebView web = getWebView();
+            if (web != null) {
+                web.setEmbeddedTitleBar(null);
+            }
+        } else {
+            if (mPieControl != null) {
+                mPieControl.removeFromContainer(mContentView);
+            }
+            WebView web = getWebView();
+            if (web != null) {
+                web.setEmbeddedTitleBar(mTitleBar);
+            }
+            setTitleGravity(Gravity.NO_GRAVITY);
+        }
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        if (mUseQuickControls) {
+            menu.setGroupVisible(R.id.NAV_MENU, false);
+            mPieControl.onMenuOpened(menu);
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    @Override
+    protected void captureTab(final Tab tab) {
+        if (mUseQuickControls) {
+            super.captureTab(tab);
+        } else {
+            captureTab(tab,
+                    mActivity.getWindowManager().getDefaultDisplay().getWidth(),
+                    (int) mActivity.getResources()
+                            .getDimension(R.dimen.tab_view_thumbnail_height));
+        }
+    }
+
 }
diff --git a/src/com/android/browser/PieControl.java b/src/com/android/browser/PieControl.java
index 38ed1bb..81a6c1f 100644
--- a/src/com/android/browser/PieControl.java
+++ b/src/com/android/browser/PieControl.java
@@ -50,7 +50,7 @@
 
     private Activity mActivity;
     private UiController mUiController;
-    private XLargeUi mUi;
+    private BaseUi mUi;
     private PieMenu mPie;
     private PieItem mBack;
     private PieItem mForward;
@@ -66,7 +66,7 @@
     private TextView mTabsCount;
     private int mItemSize;
 
-    public PieControl(Activity activity, UiController controller, XLargeUi ui) {
+    public PieControl(Activity activity, UiController controller, BaseUi ui) {
         mActivity = activity;
         mUiController = controller;
         mUi = ui;
@@ -128,10 +128,10 @@
             // level 2
             mPie.addItem(mForward);
             mPie.addItem(mRefresh);
+            mPie.addItem(mOptions);
             mPie.addItem(mShowTabs);
             mPie.addItem(mNewTab);
             mPie.addItem(mClose);
-            mPie.addItem(mOptions);
             mPie.setController(this);
         }
         container.addView(mPie);
@@ -205,12 +205,12 @@
                 web.reload();
             }
         } else if (mUrl.getView() == v) {
-            mUi.showTitleBarAndEdit();
+            mUi.editUrl(false);
         } else if (mBookmarks.getView() == v) {
             mUiController.bookmarksOrHistoryPicker(false);
         } else if (mNewTab.getView() == v) {
             mUiController.openTabToHomePage();
-            mUi.showTitleBarAndEdit();
+            mUi.editUrl(false);
         } else if (mClose.getView() == v) {
             mUiController.closeCurrentTab();
         }
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 863fc95..8368c33 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -313,7 +313,9 @@
         mVoiceSearchData.mLastVoiceSearchTitle
                 = mVoiceSearchData.mVoiceSearchResults.get(index);
         if (mInForeground) {
-            mWebViewController.activateVoiceSearchMode(mVoiceSearchData.mLastVoiceSearchTitle);
+            mWebViewController.activateVoiceSearchMode(
+                    mVoiceSearchData.mLastVoiceSearchTitle,
+                    mVoiceSearchData.mVoiceSearchResults);
         }
         if (mVoiceSearchData.mVoiceSearchHtmls != null) {
             // When index was found it was already ensured that it was valid
@@ -1297,7 +1299,8 @@
         mCloseOnExit = closeOnExit;
         mAppId = appId;
         mDataController = DataController.getInstance(mActivity);
-        mCurrentState = new PageState(mActivity, w.isPrivateBrowsingEnabled());
+        mCurrentState = new PageState(mActivity, w != null
+                ? w.isPrivateBrowsingEnabled() : false);
         mInPageLoad = false;
         mInForeground = false;
 
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index 1d17cb3..31c0740 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -16,7 +16,7 @@
 
 package com.android.browser;
 
-import com.android.browser.ScrollWebView.ScrollListener;
+import com.android.browser.BrowserWebView.ScrollListener;
 
 import android.animation.Animator;
 import android.animation.Animator.AnimatorListener;
@@ -202,7 +202,7 @@
                     mUi.hideTitleBar();
                 } else {
                     mUi.stopWebViewScrolling();
-                    mUi.showTitleBarAndEdit();
+                    mUi.editUrl(false);
                 }
             } else if (mUi.isTitleBarShowing() && !isLoading()) {
                 mUi.stopEditingUrl();
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
deleted file mode 100644
index 686416c..0000000
--- a/src/com/android/browser/TitleBar.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.browser;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
-import android.graphics.drawable.Drawable;
-import android.speech.RecognizerIntent;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.TextUtils;
-import android.text.style.ImageSpan;
-import android.view.ContextMenu;
-import android.view.LayoutInflater;
-import android.view.MenuInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.View.OnFocusChangeListener;
-import android.widget.ImageButton;
-import android.widget.ImageView;
-
-/**
- * This class represents a title bar for a particular "tab" or "window" in the
- * browser.
- */
-public class TitleBar extends TitleBarBase implements OnFocusChangeListener,
-        OnClickListener {
-
-    private Activity mActivity;
-    private ImageButton mBookmarkButton;
-    private PageProgressView mHorizontalProgress;
-    private ImageButton mStopButton;
-    private Drawable mBookmarkDrawable;
-    private Drawable mVoiceDrawable;
-    private boolean mInLoad;
-    private Intent mVoiceSearchIntent;
-    private ImageSpan mArcsSpan;
-
-    public TitleBar(Activity activity, UiController controller, PhoneUi ui) {
-        super(activity, controller, ui);
-        LayoutInflater factory = LayoutInflater.from(activity);
-        factory.inflate(R.layout.title_bar, this);
-        mActivity = activity;
-
-        mUrlInput = (UrlInputView) findViewById(R.id.url_input);
-        mUrlInput.setCompoundDrawablePadding(5);
-        mUrlInput.setContainer(this);
-        mUrlInput.setSelectAllOnFocus(true);
-        mUrlInput.setController(mUiController);
-        mUrlInput.setUrlInputListener(this);
-        mUrlInput.setOnFocusChangeListener(this);
-
-        mLockIcon = (ImageView) findViewById(R.id.lock);
-        mFavicon = (ImageView) findViewById(R.id.favicon);
-        mStopButton = (ImageButton) findViewById(R.id.stop);
-        mBookmarkButton = (ImageButton) findViewById(R.id.bookmark);
-        mStopButton.setOnClickListener(this);
-        mBookmarkButton.setOnClickListener(this);
-
-        mHorizontalProgress = (PageProgressView) findViewById(
-                R.id.progress_horizontal);
-        mVoiceSearchIntent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
-        mVoiceSearchIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
-                RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);
-        // This extra tells voice search not to send the application id in its
-        // results intent - http://b/2546173
-        //
-        // TODO: Make a constant for this extra.
-        mVoiceSearchIntent.putExtra("android.speech.extras.SEND_APPLICATION_ID_EXTRA",
-                false);
-        PackageManager pm = activity.getPackageManager();
-        ResolveInfo ri = pm.resolveActivity(mVoiceSearchIntent,
-                PackageManager.MATCH_DEFAULT_ONLY);
-        Resources resources = getResources();
-        if (ri == null) {
-            mVoiceSearchIntent = null;
-        } else {
-            mVoiceDrawable = resources.getDrawable(
-                    android.R.drawable.ic_btn_speak_now);
-        }
-        mBookmarkDrawable = mBookmarkButton.getDrawable();
-        mArcsSpan = new ImageSpan(activity, R.drawable.arcs,
-                ImageSpan.ALIGN_BASELINE);
-    }
-
-    @Override
-    public void createContextMenu(ContextMenu menu) {
-        MenuInflater inflater = mActivity.getMenuInflater();
-        inflater.inflate(R.menu.title_context, menu);
-        mActivity.onCreateContextMenu(menu, this, null);
-    }
-
-    /**
-     * Change the TitleBar to or from voice mode.  If there is no package to
-     * handle voice search, the TitleBar cannot be set to voice mode.
-     */
-    @Override
-    void setInVoiceMode(boolean inVoiceMode) {
-        if (mInVoiceMode == inVoiceMode) return;
-        mInVoiceMode = inVoiceMode && mVoiceSearchIntent != null;
-        Drawable titleDrawable;
-        if (mInVoiceMode) {
-            mBookmarkButton.setImageDrawable(mVoiceDrawable);
-            mUrlInput.setEllipsize(null);
-            mBookmarkButton.setVisibility(View.VISIBLE);
-            mStopButton.setVisibility(View.GONE);
-        } else {
-            if (mInLoad) {
-                mBookmarkButton.setVisibility(View.GONE);
-                mStopButton.setVisibility(View.VISIBLE);
-            } else {
-                mBookmarkButton.setVisibility(View.VISIBLE);
-                mStopButton.setVisibility(View.GONE);
-                mBookmarkButton.setImageDrawable(mBookmarkDrawable);
-            }
-            mUrlInput.setEllipsize(TextUtils.TruncateAt.END);
-        }
-        mUrlInput.setSingleLine(!mInVoiceMode);
-    }
-
-    /**
-     * Update the progress, from 0 to 100.
-     */
-    @Override
-    void setProgress(int newProgress) {
-        if (newProgress >= PROGRESS_MAX) {
-            mHorizontalProgress.setVisibility(View.GONE);
-            if (!mInVoiceMode) {
-                mBookmarkButton.setImageDrawable(mBookmarkDrawable);
-                mBookmarkButton.setVisibility(View.VISIBLE);
-                mStopButton.setVisibility(View.GONE);
-            }
-            mInLoad = false;
-        } else {
-            mHorizontalProgress.setProgress(newProgress * PageProgressView.MAX_PROGRESS
-                    / PROGRESS_MAX);
-            if (!mInLoad) {
-                mHorizontalProgress.setVisibility(View.VISIBLE);
-                if (!mInVoiceMode) {
-                    mBookmarkButton.setVisibility(View.GONE);
-                    mStopButton.setVisibility(View.VISIBLE);
-                }
-                mInLoad = true;
-            }
-        }
-    }
-
-    /**
-     * Update the text displayed in the title bar.
-     * @param title String to display.  If null, the new tab string will be
-     *      shown.
-     */
-    @Override
-    void setDisplayTitle(String title) {
-        if (title == null) {
-            mUrlInput.setText(R.string.new_tab);
-        } else {
-            if (mInVoiceMode) {
-                // Add two spaces.  The second one will be replaced with an
-                // image, and the first one will put space between it and the
-                // text
-                SpannableString spannable = new SpannableString(title + "  ");
-                int end = spannable.length();
-                spannable.setSpan(mArcsSpan, end - 1, end,
-                        Spanned.SPAN_MARK_POINT);
-                mUrlInput.setText(spannable);
-            } else {
-                mUrlInput.setText(title);
-            }
-        }
-    }
-
-    @Override
-    public void onFocusChange(View v, boolean hasFocus) {
-        if (v == mUrlInput && hasFocus) {
-            mActivity.closeOptionsMenu();
-        }
-    }
-
-    @Override
-    public void onClick(View v) {
-        if (v == mStopButton) {
-            mUiController.stopLoading();
-        } else if (v == mBookmarkButton) {
-            mUiController.bookmarkCurrentPage(AddBookmarkPage.DEFAULT_FOLDER_ID,
-                    true);
-        }
-    }
-
-    @Override
-    public void setCurrentUrlIsBookmark(boolean isBookmark) {
-        mBookmarkButton.setActivated(isBookmark);
-    }
-}
diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java
index 601d35f..d720257 100644
--- a/src/com/android/browser/TitleBarBase.java
+++ b/src/com/android/browser/TitleBarBase.java
@@ -16,8 +16,13 @@
 
 package com.android.browser;
 
+import com.android.browser.UI.DropdownChangeListener;
 import com.android.browser.UrlInputView.UrlInputListener;
+import com.android.browser.autocomplete.SuggestedTextController.TextChangeWatcher;
 
+import android.animation.Animator;
+import android.animation.Animator.AnimatorListener;
+import android.animation.ObjectAnimator;
 import android.app.SearchManager;
 import android.content.Context;
 import android.content.Intent;
@@ -29,16 +34,38 @@
 import android.graphics.drawable.PaintDrawable;
 import android.os.Bundle;
 import android.speech.RecognizerResultsIntent;
+import android.text.TextUtils;
+import android.view.ContextThemeWrapper;
 import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.View.OnFocusChangeListener;
+import android.view.ViewGroup;
+import android.view.animation.Animation;
+import android.view.animation.Animation.AnimationListener;
+import android.view.animation.AnimationUtils;
+import android.webkit.WebView;
 import android.widget.AbsoluteLayout;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.ImageButton;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
+import android.widget.ProgressBar;
+import android.widget.RelativeLayout;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import java.util.List;
 
 /**
  * Base class for a title bar used by the browser.
  */
-public class TitleBarBase extends LinearLayout implements UrlInputListener {
+public class TitleBarBase extends RelativeLayout
+        implements OnClickListener, OnFocusChangeListener, UrlInputListener,
+        TextChangeWatcher, DeviceAccountLogin.AutoLoginCallback {
 
     protected static final int PROGRESS_MAX = 100;
 
@@ -49,19 +76,229 @@
     protected Drawable mGenericFavicon;
     protected UiController mUiController;
     protected BaseUi mBaseUi;
+    protected FrameLayout mParent;
+    protected PageProgressView mProgress;
     protected UrlInputView mUrlInput;
     protected boolean mInVoiceMode;
+    protected View mContainer;
 
-    public TitleBarBase(Context context, UiController controller, BaseUi ui) {
+
+    // Auto-login UI
+    protected View mAutoLogin;
+    protected Spinner mAutoLoginAccount;
+    protected Button mAutoLoginLogin;
+    protected ProgressBar mAutoLoginProgress;
+    protected TextView mAutoLoginError;
+    protected ImageButton mAutoLoginCancel;
+    protected DeviceAccountLogin mAutoLoginHandler;
+    protected ArrayAdapter<String> mAccountsAdapter;
+    protected boolean mUseQuickControls;
+
+    //state
+    protected boolean mShowing;
+    protected boolean mInLoad;
+    protected boolean mSkipTitleBarAnimations;
+    private Animator mTitleBarAnimator;
+
+    public TitleBarBase(Context context, UiController controller, BaseUi ui,
+            FrameLayout parent) {
         super(context, null);
         mUiController = controller;
         mBaseUi = ui;
+        mParent = parent;
         mGenericFavicon = context.getResources().getDrawable(
                 R.drawable.app_web_browser_sm);
     }
 
-    /* package */ void setProgress(int newProgress) {}
-    /* package */ void setDisplayTitle(String title) {}
+    protected void initLayout(Context context, int layoutId) {
+        LayoutInflater factory = LayoutInflater.from(context);
+        factory.inflate(layoutId, this);
+        mContainer = findViewById(R.id.taburlbar);
+        mProgress = (PageProgressView) findViewById(R.id.progress);
+        mUrlInput = (UrlInputView) findViewById(R.id.url);
+        mLockIcon = (ImageView) findViewById(R.id.lock);
+        mUrlInput.setUrlInputListener(this);
+        mUrlInput.setController(mUiController);
+        mUrlInput.setOnFocusChangeListener(this);
+        mUrlInput.setSelectAllOnFocus(true);
+        mUrlInput.addQueryTextWatcher(this);
+        mAutoLogin = findViewById(R.id.autologin);
+        mAutoLoginAccount = (Spinner) findViewById(R.id.autologin_account);
+        mAutoLoginLogin = (Button) findViewById(R.id.autologin_login);
+        mAutoLoginLogin.setOnClickListener(this);
+        mAutoLoginProgress = (ProgressBar) findViewById(R.id.autologin_progress);
+        mAutoLoginError = (TextView) findViewById(R.id.autologin_error);
+        mAutoLoginCancel = (ImageButton) mAutoLogin.findViewById(R.id.autologin_close);
+        mAutoLoginCancel.setOnClickListener(this);
+    }
+
+    protected void setupUrlInput() {
+    }
+
+    protected void setUseQuickControls(boolean use) {
+        mUseQuickControls = use;
+        setLayoutParams(makeLayoutParams());
+    }
+
+    void setShowProgressOnly(boolean progress) {
+        if (progress && !inAutoLogin()) {
+            mContainer.setVisibility(View.GONE);
+        } else {
+            mContainer.setVisibility(View.VISIBLE);
+        }
+    }
+
+    void setSkipTitleBarAnimations(boolean skip) {
+        mSkipTitleBarAnimations = skip;
+    }
+
+    void setTitleGravity(int gravity) {
+        int newTop = 0;
+        int newLeft = 0;
+        View parent = (View) getParent();
+        if (parent != null) {
+            newLeft = parent.getScrollX();
+        }
+        if (gravity != Gravity.NO_GRAVITY) {
+            if (parent != null) {
+                if (gravity == Gravity.TOP) {
+                    newTop = parent.getScrollY();
+                }
+            }
+        }
+        AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams)
+                getLayoutParams();
+        if (lp != null) {
+            lp.x = newLeft;
+            lp.y = newTop;
+            setLayoutParams(lp);
+        }
+    }
+
+    void show() {
+        if (mUseQuickControls) {
+            mParent.addView(this);
+        } else {
+            if (!mSkipTitleBarAnimations) {
+                cancelTitleBarAnimation(false);
+                int visibleHeight = getVisibleTitleHeight();
+                float startPos = (-getEmbeddedHeight() + visibleHeight);
+                if (getTranslationY() != 0) {
+                    startPos = Math.max(startPos, getTranslationY());
+                }
+                mTitleBarAnimator = ObjectAnimator.ofFloat(this,
+                        "translationY",
+                        startPos, 0);
+                mTitleBarAnimator.start();
+            }
+            mBaseUi.setTitleGravity(Gravity.TOP);
+        }
+        mShowing = true;
+    }
+
+    void hide() {
+        if (mUseQuickControls) {
+            mParent.removeView(this);
+        } else {
+            if (!mSkipTitleBarAnimations) {
+                cancelTitleBarAnimation(false);
+                int visibleHeight = getVisibleTitleHeight();
+                mTitleBarAnimator = ObjectAnimator.ofFloat(this,
+                        "translationY", getTranslationY(),
+                        (-getEmbeddedHeight() + visibleHeight));
+                mTitleBarAnimator.addListener(mHideTileBarAnimatorListener);
+                mTitleBarAnimator.start();
+            } else {
+                mBaseUi.setTitleGravity(Gravity.NO_GRAVITY);
+            }
+        }
+        mShowing = false;
+    }
+
+    boolean isShowing() {
+        return mShowing;
+    }
+
+    void cancelTitleBarAnimation(boolean reset) {
+        if (mTitleBarAnimator != null) {
+            mTitleBarAnimator.cancel();
+            mTitleBarAnimator = null;
+        }
+        if (reset) {
+            setTranslationY(0);
+        }
+    }
+
+    private AnimatorListener mHideTileBarAnimatorListener = new AnimatorListener() {
+
+        boolean mWasCanceled;
+        @Override
+        public void onAnimationStart(Animator animation) {
+            mWasCanceled = false;
+        }
+
+        @Override
+        public void onAnimationRepeat(Animator animation) {
+        }
+
+        @Override
+        public void onAnimationEnd(Animator animation) {
+            if (!mWasCanceled) {
+                setTranslationY(0);
+            }
+            mBaseUi.setTitleGravity(Gravity.NO_GRAVITY);
+        }
+
+        @Override
+        public void onAnimationCancel(Animator animation) {
+            mWasCanceled = true;
+        }
+    };
+
+    private int getVisibleTitleHeight() {
+        Tab tab = mBaseUi.getActiveTab();
+        WebView webview = tab != null ? tab.getWebView() : null;
+        return webview != null ? webview.getVisibleTitleHeight() : 0;
+    }
+
+    /**
+     * Update the progress, from 0 to 100.
+     */
+    void setProgress(int newProgress) {
+        if (newProgress >= PROGRESS_MAX) {
+            mProgress.setProgress(PageProgressView.MAX_PROGRESS);
+            mProgress.setVisibility(View.GONE);
+            mInLoad = false;
+            onProgressStopped();
+            // check if needs to be hidden
+            if (!isEditingUrl() && !inAutoLogin()) {
+                hide();
+                if (mUseQuickControls) {
+                    setShowProgressOnly(false);
+                }
+            }
+        } else {
+            if (!mInLoad) {
+                mProgress.setVisibility(View.VISIBLE);
+                mInLoad = true;
+                onProgressStarted();
+            }
+            mProgress.setProgress(newProgress * PageProgressView.MAX_PROGRESS
+                    / PROGRESS_MAX);
+            if (!mShowing) {
+                if (mUseQuickControls && !isEditingUrl()) {
+                    setShowProgressOnly(true);
+                }
+                show();
+            }
+        }
+    }
+
+    protected void onProgressStarted() {
+    }
+
+    protected void onProgressStopped() {
+    }
 
     /* package */ void setLock(Drawable d) {
         assert mLockIcon != null;
@@ -90,36 +327,203 @@
         mFavicon.setImageDrawable(d);
     }
 
-    /* package */ void setInVoiceMode(boolean inVoiceMode) {}
-
-    /* package */ void setIncognitoMode(boolean incognito) {}
-
-    void setTitleGravity(int gravity) {
-        int newTop = 0;
-        int newLeft = 0;
-        View parent = (View) getParent();
-        if (parent != null) {
-            newLeft = parent.getScrollX();
+    public int getEmbeddedHeight() {
+        int height = mContainer.getHeight();
+        if (mAutoLogin.getVisibility() == View.VISIBLE) {
+            height += mAutoLogin.getHeight();
         }
-        if (gravity != Gravity.NO_GRAVITY) {
-            if (parent != null) {
-                if (gravity == Gravity.TOP) {
-                    newTop = parent.getScrollY();
-                } else if (gravity == Gravity.BOTTOM) {
-                    newTop = parent.getScrollY() + parent.getHeight() - getHeight();
-                }
+        return height;
+    }
+
+    protected void updateAutoLogin(Tab tab, boolean animate) {
+        DeviceAccountLogin login = tab.getDeviceAccountLogin();
+        if (login != null) {
+            mAutoLoginHandler = login;
+            ContextThemeWrapper wrapper = new ContextThemeWrapper(mContext,
+                    android.R.style.Theme_Holo_Light);
+            mAccountsAdapter = new ArrayAdapter<String>(wrapper,
+                    android.R.layout.simple_spinner_item, login.getAccountNames());
+            mAccountsAdapter.setDropDownViewResource(
+                    android.R.layout.simple_spinner_dropdown_item);
+            mAutoLoginAccount.setAdapter(mAccountsAdapter);
+            mAutoLoginAccount.setSelection(0);
+            mAutoLoginAccount.setEnabled(true);
+            mAutoLoginLogin.setEnabled(true);
+            mAutoLoginProgress.setVisibility(View.GONE);
+            mAutoLoginError.setVisibility(View.GONE);
+            switch (login.getState()) {
+                case DeviceAccountLogin.PROCESSING:
+                    mAutoLoginAccount.setEnabled(false);
+                    mAutoLoginLogin.setEnabled(false);
+                    mAutoLoginProgress.setVisibility(View.VISIBLE);
+                    break;
+                case DeviceAccountLogin.FAILED:
+                    mAutoLoginProgress.setVisibility(View.GONE);
+                    mAutoLoginError.setVisibility(View.VISIBLE);
+                    break;
+                case DeviceAccountLogin.INITIAL:
+                    break;
+                default:
+                    throw new IllegalStateException();
             }
-        }
-        AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams) getLayoutParams();
-        if (lp != null) {
-            lp.x = newLeft;
-            lp.y = newTop;
-            setLayoutParams(lp);
+            showAutoLogin(animate);
+        } else {
+            hideAutoLogin(animate);
         }
     }
 
-    public int getEmbeddedHeight() {
-        return getHeight();
+    protected void showAutoLogin(boolean animate) {
+        if (mUseQuickControls) {
+            mBaseUi.showTitleBar();
+        }
+        mAutoLogin.setVisibility(View.VISIBLE);
+        if (animate) {
+            mAutoLogin.startAnimation(AnimationUtils.loadAnimation(
+                    getContext(), R.anim.autologin_enter));
+        }
+    }
+
+    protected void hideAutoLogin(boolean animate) {
+        mAutoLoginHandler = null;
+        if (mUseQuickControls) {
+            mBaseUi.hideTitleBar();
+            mAutoLogin.setVisibility(View.GONE);
+            mBaseUi.refreshWebView();
+        } else {
+            if (animate) {
+                Animation anim = AnimationUtils.loadAnimation(getContext(),
+                        R.anim.autologin_exit);
+                anim.setAnimationListener(new AnimationListener() {
+                    @Override
+                    public void onAnimationEnd(Animation a) {
+                        mAutoLogin.setVisibility(View.GONE);
+                        mBaseUi.refreshWebView();
+                    }
+
+                    @Override
+                    public void onAnimationStart(Animation a) {
+                    }
+
+                    @Override
+                    public void onAnimationRepeat(Animation a) {
+                    }
+                });
+                mAutoLogin.startAnimation(anim);
+            } else if (mAutoLogin.getAnimation() == null) {
+                mAutoLogin.setVisibility(View.GONE);
+                mBaseUi.refreshWebView();
+            }
+        }
+    }
+
+    @Override
+    public void loginFailed() {
+        mAutoLoginAccount.setEnabled(true);
+        mAutoLoginLogin.setEnabled(true);
+        mAutoLoginProgress.setVisibility(View.GONE);
+        mAutoLoginError.setVisibility(View.VISIBLE);
+    }
+
+
+    protected boolean inAutoLogin() {
+        return mAutoLoginHandler != null;
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (mAutoLoginCancel == v) {
+            if (mAutoLoginHandler != null) {
+                mAutoLoginHandler.cancel();
+                mAutoLoginHandler = null;
+            }
+            hideAutoLogin(true);
+        } else if (mAutoLoginLogin == v) {
+            if (mAutoLoginHandler != null) {
+                mAutoLoginAccount.setEnabled(false);
+                mAutoLoginLogin.setEnabled(false);
+                mAutoLoginProgress.setVisibility(View.VISIBLE);
+                mAutoLoginError.setVisibility(View.GONE);
+                mAutoLoginHandler.login(
+                        mAutoLoginAccount.getSelectedItemPosition(), this);
+            }
+        }
+    }
+
+    @Override
+    public void onFocusChange(View view, boolean hasFocus) {
+        // if losing focus and not in touch mode, leave as is
+        if (hasFocus || view.isInTouchMode() || mUrlInput.needsUpdate()) {
+            setFocusState(hasFocus);
+        }
+        if (hasFocus) {
+            mUrlInput.forceIme();
+            if (mInVoiceMode) {
+                mUrlInput.forceFilter();
+            }
+        } else if (!mUrlInput.needsUpdate()) {
+            mUrlInput.dismissDropDown();
+            mUrlInput.hideIME();
+            if (mUrlInput.getText().length() == 0) {
+                Tab currentTab = mUiController.getTabControl().getCurrentTab();
+                if (currentTab != null) {
+                    mUrlInput.setText(currentTab.getUrl(), false);
+                }
+            }
+        }
+        mUrlInput.clearNeedsUpdate();
+    }
+
+    protected void setFocusState(boolean focus) {
+        if (focus) {
+            updateSearchMode(false);
+        }
+    }
+
+    protected void updateSearchMode(boolean userEdited) {
+        setSearchMode(!userEdited || TextUtils.isEmpty(mUrlInput.getUserText()));
+    }
+
+    protected void setSearchMode(boolean voiceSearchEnabled) {}
+
+    boolean isEditingUrl() {
+        return mUrlInput.hasFocus();
+    }
+
+    void stopEditingUrl() {
+        mUrlInput.clearFocus();
+    }
+
+    void setDisplayTitle(String title) {
+        if (!isEditingUrl()) {
+            mUrlInput.setText(title, false);
+        }
+    }
+
+    // UrlInput text watcher
+
+    @Override
+    public void onTextChanged(String newText) {
+        if (mUrlInput.hasFocus()) {
+            // check if input field is empty and adjust voice search state
+            updateSearchMode(true);
+            // clear voice mode when user types
+            setInVoiceMode(false, null);
+        }
+    }
+
+    // voicesearch
+
+    public void setInVoiceMode(boolean voicemode, List<String> voiceResults) {
+        mInVoiceMode = voicemode;
+        mUrlInput.setVoiceResults(voiceResults);
+    }
+
+    void setIncognitoMode(boolean incognito) {
+        mUrlInput.setIncognitoMode(incognito);
+    }
+
+    void clearCompletions() {
+        mUrlInput.setSuggestedText(null);
     }
 
     // UrlInputListener implementation
@@ -183,4 +587,58 @@
     public void setCurrentUrlIsBookmark(boolean isBookmark) {
     }
 
+    @Override
+    public boolean dispatchKeyEventPreIme(KeyEvent evt) {
+        if (evt.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+            // catch back key in order to do slightly more cleanup than usual
+            mUrlInput.clearFocus();
+            return true;
+        }
+        return super.dispatchKeyEventPreIme(evt);
+    }
+
+    protected WebView getCurrentWebView() {
+        Tab t = mBaseUi.getActiveTab();
+        if (t != null) {
+            return t.getWebView();
+        } else {
+            return null;
+        }
+    }
+
+    void registerDropdownChangeListener(DropdownChangeListener d) {
+        mUrlInput.registerDropdownChangeListener(d);
+    }
+
+    /**
+     * called from the Ui when the user wants to edit
+     * @param clearInput clear the input field
+     */
+    void startEditingUrl(boolean clearInput) {
+        // editing takes preference of progress
+        mContainer.setVisibility(View.VISIBLE);
+        if (mUseQuickControls) {
+            mProgress.setVisibility(View.GONE);
+        }
+        if (!mUrlInput.hasFocus()) {
+            mUrlInput.requestFocus();
+        }
+        if (clearInput) {
+            mUrlInput.setText("");
+        } else if (mInVoiceMode) {
+            mUrlInput.showDropDown();
+        }
+    }
+
+    private ViewGroup.LayoutParams makeLayoutParams() {
+        if (mUseQuickControls) {
+            return new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+                    LayoutParams.WRAP_CONTENT);
+        } else {
+            return new AbsoluteLayout.LayoutParams(
+                    LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,
+                    0, 0);
+        }
+    }
+
 }
diff --git a/src/com/android/browser/TitleBarPhone.java b/src/com/android/browser/TitleBarPhone.java
new file mode 100644
index 0000000..875e4b5
--- /dev/null
+++ b/src/com/android/browser/TitleBarPhone.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.browser;
+
+import com.android.browser.autocomplete.SuggestedTextController.TextChangeWatcher;
+
+import android.app.Activity;
+import android.content.Context;
+import android.view.ContextMenu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.View.OnFocusChangeListener;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+
+import java.util.List;
+
+/**
+ * This class represents a title bar for a particular "tab" or "window" in the
+ * browser.
+ */
+public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener,
+        OnClickListener, TextChangeWatcher {
+
+    private Activity mActivity;
+    private ImageView mStopButton;
+    private ImageView mVoiceButton;
+    private boolean mHasLockIcon;
+
+    public TitleBarPhone(Activity activity, UiController controller, PhoneUi ui,
+            FrameLayout parent) {
+        super(activity, controller, ui, parent);
+        mActivity = activity;
+        initLayout(activity, R.layout.title_bar);
+    }
+
+    @Override
+    protected void initLayout(Context context, int layoutId) {
+        super.initLayout(context, layoutId);
+        mLockIcon = (ImageView) findViewById(R.id.lock);
+        mFavicon = (ImageView) findViewById(R.id.favicon);
+        mStopButton = (ImageView) findViewById(R.id.stop);
+        mStopButton.setOnClickListener(this);
+        mVoiceButton = (ImageView) findViewById(R.id.voice);
+        mVoiceButton.setOnClickListener(this);
+        setFocusState(false);
+    }
+
+    @Override
+    public void createContextMenu(ContextMenu menu) {
+        MenuInflater inflater = mActivity.getMenuInflater();
+        inflater.inflate(R.menu.title_context, menu);
+        mActivity.onCreateContextMenu(menu, this, null);
+    }
+
+    @Override
+    public void setInVoiceMode(boolean voicemode, List<String> voiceResults) {
+        super.setInVoiceMode(voicemode, voiceResults);
+    }
+
+    @Override
+    protected void setSearchMode(boolean voiceSearchEnabled) {
+        boolean showvoicebutton = voiceSearchEnabled &&
+                mUiController.supportsVoiceSearch();
+        mVoiceButton.setVisibility(showvoicebutton ? View.VISIBLE :
+                View.GONE);
+    }
+
+    @Override
+    protected void setFocusState(boolean focus) {
+        super.setFocusState(focus);
+        if (focus) {
+            mHasLockIcon = (mLockIcon.getVisibility() == View.VISIBLE);
+            mFavicon.setVisibility(View.GONE);
+            mLockIcon.setVisibility(View.GONE);
+            mStopButton.setVisibility(View.GONE);
+            mVoiceButton.setVisibility(View.VISIBLE);
+        } else {
+            mFavicon.setVisibility(View.VISIBLE);
+            mLockIcon.setVisibility(mHasLockIcon ? View.VISIBLE : View.GONE);
+            if (mInLoad) {
+                mStopButton.setVisibility(View.VISIBLE);
+            } else {
+                mStopButton.setVisibility(View.GONE);
+            }
+            mVoiceButton.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    protected void onProgressStarted() {
+        setFocusState(mUrlInput.hasFocus());
+    }
+
+    @Override
+    protected void onProgressStopped() {
+        setFocusState(mUrlInput.hasFocus());
+    }
+
+    /**
+     * Update the text displayed in the title bar.
+     * @param title String to display.  If null, the new tab string will be
+     *      shown.
+     */
+    @Override
+    void setDisplayTitle(String title) {
+        if (title == null) {
+            mUrlInput.setText(R.string.new_tab);
+        } else {
+            mUrlInput.setText(title);
+        }
+    }
+
+    @Override
+    public void onFocusChange(View v, boolean hasFocus) {
+        if (v == mUrlInput) {
+            if (hasFocus) {
+                mActivity.closeOptionsMenu();
+            }
+        }
+        super.onFocusChange(v, hasFocus);
+        if (mUseQuickControls && !hasFocus) {
+            mBaseUi.hideTitleBar();
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v == mStopButton) {
+            mUiController.stopLoading();
+        } else if (v == mVoiceButton) {
+            mUiController.startVoiceSearch();
+        } else {
+            super.onClick(v);
+        }
+    }
+
+}
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index 5f02002..567b35a 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -16,37 +16,21 @@
 
 package com.android.browser;
 
-import com.android.browser.UI.DropdownChangeListener;
 import com.android.browser.autocomplete.SuggestedTextController.TextChangeWatcher;
-import com.android.browser.search.SearchEngine;
 
-import android.accounts.Account;
 import android.app.Activity;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
-import android.view.ContextThemeWrapper;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.View.OnFocusChangeListener;
-import android.view.ViewGroup;
-import android.view.animation.Animation;
-import android.view.animation.Animation.AnimationListener;
-import android.view.animation.AnimationUtils;
 import android.webkit.WebView;
-import android.widget.AbsoluteLayout;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
 import android.widget.ImageView;
-import android.widget.ProgressBar;
-import android.widget.Spinner;
-import android.widget.TextView;
 
 import java.util.List;
 
@@ -62,37 +46,23 @@
     private Drawable mStopDrawable;
     private Drawable mReloadDrawable;
 
-    private View mContainer;
+    private View mUrlContainer;
     private ImageButton mBackButton;
     private ImageButton mForwardButton;
     private ImageView mStar;
     private ImageView mUrlIcon;
     private ImageView mSearchButton;
-    private View mUrlContainer;
     private View mGoButton;
     private ImageView mStopButton;
     private View mAllButton;
     private View mClearButton;
     private ImageView mVoiceSearch;
-    private PageProgressView mProgressView;
     private Drawable mFocusDrawable;
     private Drawable mUnfocusDrawable;
-    // Auto-login UI
-    private View mAutoLogin;
-    private Spinner mAutoLoginAccount;
-    private Button mAutoLoginLogin;
-    private ProgressBar mAutoLoginProgress;
-    private TextView mAutoLoginError;
-    private ImageButton mAutoLoginCancel;
-    private DeviceAccountLogin mAutoLoginHandler;
-    private ArrayAdapter<String> mAccountsAdapter;
-
-    private boolean mInLoad;
-    private boolean mUseQuickControls;
 
     public TitleBarXLarge(Activity activity, UiController controller,
-            XLargeUi ui) {
-        super(activity, controller, ui);
+            XLargeUi ui, FrameLayout parent) {
+        super(activity, controller, ui, parent);
         mUi = ui;
         Resources resources = activity.getResources();
         mStopDrawable = resources.getDrawable(R.drawable.ic_stop_holo_dark);
@@ -102,27 +72,12 @@
         mUnfocusDrawable = resources.getDrawable(
                 R.drawable.textfield_default_holo_dark);
         mInVoiceMode = false;
-        initLayout(activity);
+        initLayout(activity, R.layout.url_bar);
     }
 
     @Override
-    void setTitleGravity(int gravity) {
-        if (mUseQuickControls) {
-            FrameLayout.LayoutParams lp =
-                    (FrameLayout.LayoutParams) getLayoutParams();
-            lp.gravity = gravity;
-            setLayoutParams(lp);
-        } else {
-            super.setTitleGravity(gravity);
-        }
-    }
-
-    private void initLayout(Context context) {
-        LayoutInflater factory = LayoutInflater.from(context);
-        factory.inflate(R.layout.url_bar, this);
-
-        mContainer = findViewById(R.id.taburlbar);
-        mUrlInput = (UrlInputView) findViewById(R.id.url_focused);
+    protected void initLayout(Context context, int layoutId) {
+        super.initLayout(context, layoutId);
         mAllButton = findViewById(R.id.all_btn);
         // TODO: Change enabled states based on whether you can go
         // back/forward.  Probably should be done inside onPageStarted.
@@ -136,7 +91,6 @@
         mGoButton = findViewById(R.id.go);
         mClearButton = findViewById(R.id.clear);
         mVoiceSearch = (ImageView) findViewById(R.id.voicesearch);
-        mProgressView = (PageProgressView) findViewById(R.id.progress);
         mUrlContainer = findViewById(R.id.urlbar_focused);
         mBackButton.setOnClickListener(this);
         mForwardButton.setOnClickListener(this);
@@ -147,23 +101,7 @@
         mGoButton.setOnClickListener(this);
         mClearButton.setOnClickListener(this);
         mVoiceSearch.setOnClickListener(this);
-        mUrlInput.setUrlInputListener(this);
         mUrlInput.setContainer(mUrlContainer);
-        mUrlInput.setController(mUiController);
-        mUrlInput.setOnFocusChangeListener(this);
-        mUrlInput.setSelectAllOnFocus(true);
-        mUrlInput.addQueryTextWatcher(this);
-        mAutoLogin = findViewById(R.id.autologin);
-        mAutoLoginAccount = (Spinner) findViewById(R.id.autologin_account);
-        mAutoLoginLogin = (Button) findViewById(R.id.autologin_login);
-        mAutoLoginLogin.setOnClickListener(this);
-        mAutoLoginProgress =
-                (ProgressBar) findViewById(R.id.autologin_progress);
-        mAutoLoginError = (TextView) findViewById(R.id.autologin_error);
-        mAutoLoginCancel =
-                (ImageButton) mAutoLogin.findViewById(R.id.autologin_close);
-        mAutoLoginCancel.setOnClickListener(this);
-
         setFocusState(false);
     }
 
@@ -179,100 +117,6 @@
         }
     }
 
-    void updateAutoLogin(Tab tab, boolean animate) {
-        DeviceAccountLogin login = tab.getDeviceAccountLogin();
-        if (login != null) {
-            mAutoLoginHandler = login;
-            mAutoLogin.setVisibility(View.VISIBLE);
-            ContextThemeWrapper wrapper = new ContextThemeWrapper(mContext,
-                    android.R.style.Theme_Holo_Light);
-            mAccountsAdapter = new ArrayAdapter<String>(wrapper,
-                    android.R.layout.simple_spinner_item, login.getAccountNames());
-            mAccountsAdapter.setDropDownViewResource(
-                    android.R.layout.simple_spinner_dropdown_item);
-            mAutoLoginAccount.setAdapter(mAccountsAdapter);
-            mAutoLoginAccount.setSelection(0);
-            mAutoLoginAccount.setEnabled(true);
-            mAutoLoginLogin.setEnabled(true);
-            mAutoLoginProgress.setVisibility(View.GONE);
-            mAutoLoginError.setVisibility(View.GONE);
-            switch (login.getState()) {
-                case DeviceAccountLogin.PROCESSING:
-                    mAutoLoginAccount.setEnabled(false);
-                    mAutoLoginLogin.setEnabled(false);
-                    mAutoLoginProgress.setVisibility(View.VISIBLE);
-                    break;
-                case DeviceAccountLogin.FAILED:
-                    mAutoLoginProgress.setVisibility(View.GONE);
-                    mAutoLoginError.setVisibility(View.VISIBLE);
-                    break;
-                case DeviceAccountLogin.INITIAL:
-                    break;
-                default:
-                    throw new IllegalStateException();
-            }
-            if (mUseQuickControls) {
-                mUi.showTitleBar();
-            } else {
-                if (animate) {
-                    mAutoLogin.startAnimation(AnimationUtils.loadAnimation(
-                            getContext(), R.anim.autologin_enter));
-                }
-            }
-        } else {
-            mAutoLoginHandler = null;
-            if (mUseQuickControls) {
-                mUi.hideTitleBar();
-                mAutoLogin.setVisibility(View.GONE);
-                mUi.refreshWebView();
-            } else {
-                if (animate) {
-                    hideAutoLogin();
-                } else if (mAutoLogin.getAnimation() == null) {
-                    mAutoLogin.setVisibility(View.GONE);
-                    mUi.refreshWebView();
-                }
-            }
-        }
-    }
-
-    boolean inAutoLogin() {
-        return mAutoLoginHandler != null;
-    }
-
-    private ViewGroup.LayoutParams makeLayoutParams() {
-        if (mUseQuickControls) {
-            return new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
-                    LayoutParams.WRAP_CONTENT);
-        } else {
-            return new AbsoluteLayout.LayoutParams(
-                    LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,
-                    0, 0);
-        }
-    }
-
-    @Override
-    public int getEmbeddedHeight() {
-        int height = mContainer.getHeight();
-        if (mAutoLogin.getVisibility() == View.VISIBLE) {
-            height += mAutoLogin.getHeight();
-        }
-        return height;
-    }
-
-    void setUseQuickControls(boolean useQuickControls) {
-        mUseQuickControls = useQuickControls;
-        setLayoutParams(makeLayoutParams());
-    }
-
-    void setShowProgressOnly(boolean progress) {
-        if (progress && !inAutoLogin()) {
-            mContainer.setVisibility(View.GONE);
-        } else {
-            mContainer.setVisibility(View.VISIBLE);
-        }
-    }
-
     @Override
     public void onFocusChange(View view, boolean hasFocus) {
         // if losing focus and not in touch mode, leave as is
@@ -308,47 +152,6 @@
         mStar.setActivated(isBookmark);
     }
 
-    /**
-     * called from the Ui when the user wants to edit
-     * @param clearInput clear the input field
-     */
-    void startEditingUrl(boolean clearInput) {
-        // editing takes preference of progress
-        mContainer.setVisibility(View.VISIBLE);
-        if (mUseQuickControls) {
-            mProgressView.setVisibility(View.GONE);
-        }
-        if (!mUrlInput.hasFocus()) {
-            mUrlInput.requestFocus();
-        }
-        if (clearInput) {
-            mUrlInput.setText("");
-        } else if (mInVoiceMode) {
-            mUrlInput.showDropDown();
-        }
-    }
-
-    boolean isEditingUrl() {
-        return mUrlInput.hasFocus();
-    }
-
-    void stopEditingUrl() {
-        mUrlInput.clearFocus();
-    }
-
-    private void hideAutoLogin() {
-        Animation anim = AnimationUtils.loadAnimation(
-                getContext(), R.anim.autologin_exit);
-        anim.setAnimationListener(new AnimationListener() {
-            @Override public void onAnimationEnd(Animation a) {
-                mAutoLogin.setVisibility(View.GONE);
-                mUi.refreshWebView();
-            }
-            @Override public void onAnimationStart(Animation a) {}
-            @Override public void onAnimationRepeat(Animation a) {}
-        });
-        mAutoLogin.startAnimation(anim);
-    }
 
     @Override
     public void onClick(View v) {
@@ -374,33 +177,12 @@
             clearOrClose();
         } else if (mVoiceSearch == v) {
             mUiController.startVoiceSearch();
-        } else if (mAutoLoginCancel == v) {
-            if (mAutoLoginHandler != null) {
-                mAutoLoginHandler.cancel();
-                mAutoLoginHandler = null;
-            }
-            hideAutoLogin();
-        } else if (mAutoLoginLogin == v) {
-            if (mAutoLoginHandler != null) {
-                mAutoLoginAccount.setEnabled(false);
-                mAutoLoginLogin.setEnabled(false);
-                mAutoLoginProgress.setVisibility(View.VISIBLE);
-                mAutoLoginError.setVisibility(View.GONE);
-                mAutoLoginHandler.login(
-                        mAutoLoginAccount.getSelectedItemPosition(), this);
-            }
+        } else {
+            super.onClick(v);
         }
     }
 
     @Override
-    public void loginFailed() {
-        mAutoLoginAccount.setEnabled(true);
-        mAutoLoginLogin.setEnabled(true);
-        mAutoLoginProgress.setVisibility(View.GONE);
-        mAutoLoginError.setVisibility(View.VISIBLE);
-    }
-
-    @Override
     void setFavicon(Bitmap icon) { }
 
     private void clearOrClose() {
@@ -413,10 +195,10 @@
         }
     }
 
-    private void setFocusState(boolean focus) {
+    @Override
+    protected void setFocusState(boolean focus) {
+        super.setFocusState(focus);
         if (focus) {
-            mUrlInput.setDropDownWidth(mUrlContainer.getWidth());
-            mUrlInput.setDropDownHorizontalOffset(-mUrlInput.getLeft());
             mSearchButton.setVisibility(View.GONE);
             mStar.setVisibility(View.GONE);
             mClearButton.setVisibility(View.VISIBLE);
@@ -446,41 +228,25 @@
         }
     }
 
-    /**
-     * Update the progress, from 0 to 100.
-     */
     @Override
-    void setProgress(int newProgress) {
-        boolean blockvisuals = mUseQuickControls && isEditingUrl();
-        if (newProgress >= PROGRESS_MAX) {
-            if (!blockvisuals) {
-                mProgressView.setProgress(PageProgressView.MAX_PROGRESS);
-                mProgressView.setVisibility(View.GONE);
-                mStopButton.setImageDrawable(mReloadDrawable);
-            }
-            mInLoad = false;
-        } else {
-            if (!mInLoad) {
-                if (!blockvisuals) {
-                    mProgressView.setVisibility(View.VISIBLE);
-                    mStopButton.setImageDrawable(mStopDrawable);
-                }
-                mInLoad = true;
-            }
-            mProgressView.setProgress(newProgress * PageProgressView.MAX_PROGRESS
-                    / PROGRESS_MAX);
-        }
+    protected void onProgressStarted() {
+        mStopButton.setImageDrawable(mStopDrawable);
     }
 
-    private void updateSearchMode(boolean userEdited) {
+    @Override
+    protected void onProgressStopped() {
+        mStopButton.setImageDrawable(mReloadDrawable);
+    }
+
+    @Override
+    protected void updateSearchMode(boolean userEdited) {
         setSearchMode(!userEdited || TextUtils.isEmpty(mUrlInput.getUserText()));
     }
 
-    private void setSearchMode(boolean voiceSearchEnabled) {
-        SearchEngine searchEngine = BrowserSettings.getInstance()
-                .getSearchEngine();
+    @Override
+    protected void setSearchMode(boolean voiceSearchEnabled) {
         boolean showvoicebutton = voiceSearchEnabled &&
-                (searchEngine != null && searchEngine.supportsVoiceSearch());
+                mUiController.supportsVoiceSearch();
         mVoiceSearch.setVisibility(showvoicebutton ? View.VISIBLE :
                 View.GONE);
         mGoButton.setVisibility(voiceSearchEnabled ? View.GONE :
@@ -488,45 +254,14 @@
     }
 
     @Override
-    /* package */ void setDisplayTitle(String title) {
-        if (!isEditingUrl()) {
-            mUrlInput.setText(title, false);
-        }
-    }
-
-    // UrlInput text watcher
-
-    @Override
-    public void onTextChanged(String newText) {
-        if (mUrlInput.hasFocus()) {
-            // check if input field is empty and adjust voice search state
-            updateSearchMode(true);
-            // clear voice mode when user types
-            setInVoiceMode(false, null);
-        }
-    }
-
-    // voicesearch
-
-    @Override
-    public void setInVoiceMode(boolean voicemode) {
-        setInVoiceMode(voicemode, null);
-    }
-
     public void setInVoiceMode(boolean voicemode, List<String> voiceResults) {
-        mInVoiceMode = voicemode;
-        mUrlInput.setVoiceResults(voiceResults);
+        super.setInVoiceMode(voicemode, voiceResults);
         if (voicemode) {
             mUrlIcon.setImageDrawable(mSearchButton.getDrawable());
         }
     }
 
     @Override
-    void setIncognitoMode(boolean incognito) {
-        mUrlInput.setIncognitoMode(incognito);
-    }
-
-    @Override
     public View focusSearch(View focused, int dir) {
         if (FOCUS_DOWN == dir && hasFocus()) {
             return getCurrentWebView();
@@ -534,30 +269,4 @@
         return super.focusSearch(focused, dir);
     }
 
-    void clearCompletions() {
-        mUrlInput.setSuggestedText(null);
-    }
-
-    @Override
-    public boolean dispatchKeyEventPreIme(KeyEvent evt) {
-        if (evt.getKeyCode() == KeyEvent.KEYCODE_BACK) {
-            // catch back key in order to do slightly more cleanup than usual
-            mUrlInput.clearFocus();
-            return true;
-        }
-        return super.dispatchKeyEventPreIme(evt);
-    }
-
-    private WebView getCurrentWebView() {
-        Tab t = mUi.getActiveTab();
-        if (t != null) {
-            return t.getWebView();
-        } else {
-            return null;
-        }
-    }
-
-    void registerDropdownChangeListener(DropdownChangeListener d) {
-        mUrlInput.registerDropdownChangeListener(d);
-    }
 }
diff --git a/src/com/android/browser/UI.java b/src/com/android/browser/UI.java
index 368c829..40fc14a 100644
--- a/src/com/android/browser/UI.java
+++ b/src/com/android/browser/UI.java
@@ -85,7 +85,7 @@
 
     public boolean isCustomViewShowing();
 
-    public void showVoiceTitleBar(String title);
+    public void showVoiceTitleBar(String title, List<String> results);
 
     public void revertVoiceTitleBar(Tab tab);
 
diff --git a/src/com/android/browser/UiController.java b/src/com/android/browser/UiController.java
index 65fa5f8..ed5fa6a 100644
--- a/src/com/android/browser/UiController.java
+++ b/src/com/android/browser/UiController.java
@@ -56,10 +56,10 @@
 
     void bookmarksOrHistoryPicker(boolean openHistory);
 
-    void startSearch(String url);
-
     void startVoiceSearch();
 
+    boolean supportsVoiceSearch();
+
     void showVoiceSearchResults(String title);
 
     void editUrl();
diff --git a/src/com/android/browser/WebViewController.java b/src/com/android/browser/WebViewController.java
index 6b44207..93ca410 100644
--- a/src/com/android/browser/WebViewController.java
+++ b/src/com/android/browser/WebViewController.java
@@ -31,6 +31,8 @@
 import android.webkit.WebChromeClient;
 import android.webkit.WebView;
 
+import java.util.List;
+
 /**
  * WebView aspect of the controller
  */
@@ -85,7 +87,7 @@
 
     void onUserCanceledSsl(Tab tab);
 
-    void activateVoiceSearchMode(String title);
+    void activateVoiceSearchMode(String title, List<String> results);
 
     void revertVoiceSearchMode(Tab tab);
 
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index 8c34fc9..39981b0 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -16,15 +16,10 @@
 
 package com.android.browser;
 
-import com.android.browser.ScrollWebView.ScrollListener;
+import com.android.browser.BrowserWebView.ScrollListener;
 
-import android.animation.Animator;
-import android.animation.Animator.AnimatorListener;
-import android.animation.ObjectAnimator;
 import android.app.ActionBar;
 import android.app.Activity;
-import android.content.pm.PackageManager;
-import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.os.Handler;
 import android.util.Log;
@@ -35,7 +30,6 @@
 import android.view.View;
 import android.webkit.WebChromeClient.CustomViewCallback;
 import android.webkit.WebView;
-import android.widget.FrameLayout;
 
 import java.util.List;
 
@@ -50,8 +44,6 @@
     private TabBar mTabBar;
 
     private TitleBarXLarge mTitleBar;
-    private Animator mTitleBarAnimator;
-    private boolean mSkipTitleBarAnimations;
 
     private boolean mUseQuickControls;
     private PieControl mPieControl;
@@ -64,7 +56,8 @@
     public XLargeUi(Activity browser, UiController controller) {
         super(browser, controller);
         mHandler = new Handler();
-        mTitleBar = new TitleBarXLarge(mActivity, mUiController, this);
+        mTitleBar = new TitleBarXLarge(mActivity, mUiController, this,
+                mContentView);
         mTitleBar.setProgress(100);
         mTabBar = new TabBar(mActivity, mUiController, this);
         mActionBar = mActivity.getActionBar();
@@ -103,16 +96,16 @@
             checkTabCount();
             mPieControl = new PieControl(mActivity, mUiController, this);
             mPieControl.attachToContainer(mContentView);
-            Tab tab = getActiveTab();
-            if ((tab != null) && (tab.getWebView() != null)) {
-                tab.getWebView().setEmbeddedTitleBar(null);
+            WebView web = getWebView();
+            if (web != null) {
+                web.setEmbeddedTitleBar(null);
             }
         } else {
             mActivity.getActionBar().show();
             if (mPieControl != null) {
                 mPieControl.removeFromContainer(mContentView);
             }
-            WebView web = mTabControl.getCurrentWebView();
+            WebView web = getWebView();
             if (web != null) {
                 web.setEmbeddedTitleBar(mTitleBar);
             }
@@ -149,23 +142,14 @@
     @Override
     public WebView createWebView(boolean privateBrowsing) {
         // Create a new WebView
-        ScrollWebView w = new ScrollWebView(mActivity, null,
-                android.R.attr.webViewStyle, privateBrowsing);
-        initWebViewSettings(w);
+        BrowserWebView w = (BrowserWebView) super.createWebView(privateBrowsing);
         w.setScrollListener(this);
-        boolean supportsMultiTouch = mActivity.getPackageManager()
-                .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);
-        w.getSettings().setDisplayZoomControls(!supportsMultiTouch);
-        w.setExpandedTileBounds(true);  // smoother scrolling
         return w;
     }
 
     @Override
     public WebView createSubWebView(boolean privateBrowsing) {
-        ScrollWebView web = (ScrollWebView) createWebView(privateBrowsing);
-        // no scroll listener for subview
-        web.setScrollListener(null);
-        return web;
+        return super.createWebView(privateBrowsing);
     }
 
     @Override
@@ -174,7 +158,7 @@
     }
 
     void stopWebViewScrolling() {
-        ScrollWebView web = (ScrollWebView) mUiController.getCurrentWebView();
+        BrowserWebView web = (BrowserWebView) mUiController.getCurrentWebView();
         if (web != null) {
             web.stopScroll();
         }
@@ -188,31 +172,10 @@
         mTabBar.onProgress(tab, progress);
         if (tab.inForeground()) {
             mTitleBar.setProgress(progress);
-            if (progress == 100) {
-                if (!mTitleBar.isEditingUrl() && !mTitleBar.inAutoLogin()) {
-                    hideTitleBar();
-                    if (mUseQuickControls) {
-                        mTitleBar.setShowProgressOnly(false);
-                    }
-                }
-            } else {
-                if (!isTitleBarShowing()) {
-                    if (mUseQuickControls && !mTitleBar.isEditingUrl()) {
-                        mTitleBar.setShowProgressOnly(true);
-                        setTitleGravity(Gravity.TOP);
-                    }
-                    showTitleBar();
-                }
-            }
         }
     }
 
     @Override
-    public boolean needsRestoreAllTabs() {
-        return true;
-    }
-
-    @Override
     public void addTab(Tab tab) {
         mTabBar.onNewTab(tab);
     }
@@ -223,9 +186,8 @@
 
     @Override
     public void setActiveTab(final Tab tab) {
-        cancelTitleBarAnimation(true);
-        mSkipTitleBarAnimations = true;
-        stopEditingUrl();
+        mTitleBar.cancelTitleBarAnimation(true);
+        mTitleBar.setSkipTitleBarAnimations(true);
         if (mUseQuickControls) {
             if (mActiveTab != null) {
                 captureTab(mActiveTab);
@@ -233,12 +195,12 @@
         }
         super.setActiveTab(tab, true);
         setActiveTab(tab, true);
-        mSkipTitleBarAnimations = false;
+        mTitleBar.setSkipTitleBarAnimations(false);
     }
 
     @Override
     void setActiveTab(Tab tab, boolean needsAttaching) {
-        ScrollWebView view = (ScrollWebView) tab.getWebView();
+        BrowserWebView view = (BrowserWebView) tab.getWebView();
         // TabControl.setCurrentTab has been called before this,
         // so the tab is guaranteed to have a webview
         if (view == null) {
@@ -259,7 +221,7 @@
         }
         mTabBar.onSetActiveTab(tab);
         if (tab.isInVoiceSearchMode()) {
-            showVoiceTitleBar(tab.getVoiceDisplayTitle());
+            showVoiceTitleBar(tab.getVoiceDisplayTitle(), tab.getVoiceSearchResults());
         } else {
             revertVoiceTitleBar(tab);
         }
@@ -267,15 +229,6 @@
         tab.getTopWindow().requestFocus();
     }
 
-    public void captureTab(final Tab tab) {
-        Bitmap sshot = Controller.createScreenshot(tab,
-                (int) mActivity.getResources()
-                        .getDimension(R.dimen.qc_thumb_width),
-                (int) mActivity.getResources()
-                        .getDimension(R.dimen.qc_thumb_height));
-        tab.setScreenshot(sshot);
-    }
-
     @Override
     public void updateTabs(List<Tab> tabs) {
         mTabBar.updateTabs(tabs);
@@ -284,11 +237,11 @@
 
     @Override
     public void removeTab(Tab tab) {
-        cancelTitleBarAnimation(true);
-        mSkipTitleBarAnimations = true;
+        mTitleBar.cancelTitleBarAnimation(true);
+        mTitleBar.setSkipTitleBarAnimations(true);
         super.removeTab(tab);
         mTabBar.onRemoveTab(tab);
-        mSkipTitleBarAnimations = false;
+        mTitleBar.setSkipTitleBarAnimations(false);
     }
 
     protected void onRemoveTabCompleted(Tab tab) {
@@ -304,17 +257,10 @@
 
     @Override
     public void editUrl(boolean clearInput) {
-        if (mUiController.isInCustomActionMode()) {
-            mUiController.endActionMode();
+        if (mUseQuickControls) {
+            getTitleBar().setShowProgressOnly(false);
         }
-        showTitleBar();
-        mTitleBar.startEditingUrl(clearInput);
-    }
-
-    void showTitleBarAndEdit() {
-        mTitleBar.setShowProgressOnly(false);
-        showTitleBar();
-        mTitleBar.startEditingUrl(false);
+        super.editUrl(clearInput);
     }
 
     void stopEditingUrl() {
@@ -324,24 +270,7 @@
     @Override
     protected void showTitleBar() {
         if (canShowTitleBar()) {
-            if (mUseQuickControls) {
-                mContentView.addView(mTitleBar);
-            } else {
-                if (!mSkipTitleBarAnimations) {
-                    cancelTitleBarAnimation(false);
-                    int visibleHeight = getVisibleTitleHeight();
-                    float startPos = (-mTitleBar.getEmbeddedHeight() + visibleHeight);
-                    if (mTitleBar.getTranslationY() != 0) {
-                        startPos = Math.max(startPos, mTitleBar.getTranslationY());
-                    }
-                    mTitleBarAnimator = ObjectAnimator.ofFloat(mTitleBar,
-                            "translationY",
-                            startPos, 0);
-                    mTitleBarAnimator.start();
-                }
-                setTitleGravity(Gravity.TOP);
-            }
-            super.showTitleBar();
+            mTitleBar.show();
             mTabBar.onShowTitleBar();
         }
     }
@@ -350,66 +279,10 @@
     protected void hideTitleBar() {
         if (isTitleBarShowing()) {
             mTabBar.onHideTitleBar();
-            if (mUseQuickControls) {
-                mContentView.removeView(mTitleBar);
-            } else {
-                if (!mSkipTitleBarAnimations) {
-                    cancelTitleBarAnimation(false);
-                    int visibleHeight = getVisibleTitleHeight();
-                    mTitleBarAnimator = ObjectAnimator.ofFloat(mTitleBar,
-                            "translationY", mTitleBar.getTranslationY(),
-                            (-mTitleBar.getEmbeddedHeight() + visibleHeight));
-                    mTitleBarAnimator.addListener(mHideTileBarAnimatorListener);
-                    mTitleBarAnimator.start();
-                } else {
-                    setTitleGravity(Gravity.NO_GRAVITY);
-                }
-            }
-            super.hideTitleBar();
+            mTitleBar.hide();
         }
     }
 
-    private void cancelTitleBarAnimation(boolean reset) {
-        if (mTitleBarAnimator != null) {
-            mTitleBarAnimator.cancel();
-            mTitleBarAnimator = null;
-        }
-        if (reset) {
-            mTitleBar.setTranslationY(0);
-        }
-    }
-
-    private int getVisibleTitleHeight() {
-        WebView webview = mActiveTab != null ? mActiveTab.getWebView() : null;
-        return webview != null ? webview.getVisibleTitleHeight() : 0;
-    }
-
-    private AnimatorListener mHideTileBarAnimatorListener = new AnimatorListener() {
-
-        boolean mWasCanceled;
-        @Override
-        public void onAnimationStart(Animator animation) {
-            mWasCanceled = false;
-        }
-
-        @Override
-        public void onAnimationRepeat(Animator animation) {
-        }
-
-        @Override
-        public void onAnimationEnd(Animator animation) {
-            if (!mWasCanceled) {
-                mTitleBar.setTranslationY(0);
-            }
-            setTitleGravity(Gravity.NO_GRAVITY);
-        }
-
-        @Override
-        public void onAnimationCancel(Animator animation) {
-            mWasCanceled = true;
-        }
-    };
-
     public boolean isEditingUrl() {
         return mTitleBar.isEditingUrl();
     }
@@ -421,12 +294,7 @@
 
     @Override
     protected void setTitleGravity(int gravity) {
-        if (mUseQuickControls) {
-            FrameLayout.LayoutParams lp =
-                (FrameLayout.LayoutParams) mTitleBar.getLayoutParams();
-            lp.gravity = gravity;
-            mTitleBar.setLayoutParams(lp);
-        } else {
+        if (!mUseQuickControls) {
             super.setTitleGravity(gravity);
         }
     }
@@ -460,18 +328,6 @@
     }
 
     @Override
-    protected void updateAutoLogin(Tab tab, boolean animate) {
-        mTitleBar.updateAutoLogin(tab, animate);
-    }
-
-    protected void refreshWebView() {
-        Tab tab = getActiveTab();
-        if ((tab != null) && (tab.getWebView() != null)) {
-            tab.getWebView().invalidate();
-        }
-    }
-
-    @Override
     public void setUrlTitle(Tab tab) {
         super.setUrlTitle(tab);
         mTabBar.onUrlAndTitle(tab, tab.getUrl(), tab.getTitle());
@@ -485,11 +341,7 @@
     }
 
     @Override
-    public void showVoiceTitleBar(String title) {
-        List<String> vsresults = null;
-        if (getActiveTab() != null) {
-            vsresults = getActiveTab().getVoiceSearchResults();
-        }
+    public void showVoiceTitleBar(String title, List<String> vsresults) {
         mTitleBar.setInVoiceMode(true, vsresults);
         mTitleBar.setDisplayTitle(title);
     }
@@ -550,11 +402,6 @@
     }
 
     @Override
-    public void registerDropdownChangeListener(DropdownChangeListener d) {
-        mTitleBar.registerDropdownChangeListener(d);
-    }
-
-    @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
         if (mUseQuickControls) {
             mPieControl.onMenuOpened(menu);
diff --git a/src/com/android/browser/preferences/LabPreferencesFragment.java b/src/com/android/browser/preferences/LabPreferencesFragment.java
index a06dc3e..88a9690 100644
--- a/src/com/android/browser/preferences/LabPreferencesFragment.java
+++ b/src/com/android/browser/preferences/LabPreferencesFragment.java
@@ -42,21 +42,25 @@
         addPreferencesFromResource(R.xml.lab_preferences);
 
         Preference e = findPreference(BrowserSettings.PREF_QUICK_CONTROLS);
-        e.setOnPreferenceChangeListener(this);
+        if (e != null) {
+            e.setOnPreferenceChangeListener(this);
+        }
         useInstantPref = findPreference(BrowserSettings.PREF_USE_INSTANT);
     }
 
     @Override
     public void onResume() {
         super.onResume();
-        useInstantPref.setEnabled(false);
+        if (useInstantPref != null) {
+            useInstantPref.setEnabled(false);
 
-        // Enable the "use instant" preference only if the selected
-        // search engine is google.
-        if (mBrowserSettings.getSearchEngine() != null) {
-            final String currentName = mBrowserSettings.getSearchEngine().getName();
-            if (SearchEngine.GOOGLE.equals(currentName)) {
-                useInstantPref.setEnabled(true);
+            // Enable the "use instant" preference only if the selected
+            // search engine is google.
+            if (mBrowserSettings.getSearchEngine() != null) {
+                final String currentName = mBrowserSettings.getSearchEngine().getName();
+                if (SearchEngine.GOOGLE.equals(currentName)) {
+                    useInstantPref.setEnabled(true);
+                }
             }
         }
     }
diff --git a/src/com/android/browser/view/StopProgressView.java b/src/com/android/browser/view/StopProgressView.java
new file mode 100644
index 0000000..64fa5d0
--- /dev/null
+++ b/src/com/android/browser/view/StopProgressView.java
@@ -0,0 +1,98 @@
+
+package com.android.browser.view;
+
+import com.android.browser.R;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.widget.ProgressBar;
+
+
+public class StopProgressView extends ProgressBar {
+
+    Drawable mOverlayDrawable;
+    Drawable mProgressDrawable;
+    int mWidth;
+    int mHeight;
+
+    /**
+     * @param context
+     * @param attrs
+     * @param defStyle
+     * @param styleRes
+     */
+    public StopProgressView(Context context, AttributeSet attrs, int defStyle, int styleRes) {
+        super(context, attrs, defStyle, styleRes);
+        init(attrs);
+    }
+
+    /**
+     * @param context
+     * @param attrs
+     * @param defStyle
+     */
+    public StopProgressView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        init(attrs);
+    }
+
+    /**
+     * @param context
+     * @param attrs
+     */
+    public StopProgressView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(attrs);
+    }
+
+    /**
+     * @param context
+     */
+    public StopProgressView(Context context) {
+        super(context);
+        init(null);
+    }
+
+    private void init(AttributeSet attrs) {
+        mProgressDrawable = getIndeterminateDrawable();
+        setImageDrawable(mContext.getResources()
+                .getDrawable(R.drawable.ic_stop_holo_dark));
+    }
+
+    public void hideProgress() {
+        setIndeterminateDrawable(null);
+    }
+
+    public void showProgress() {
+        setIndeterminateDrawable(mProgressDrawable);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        super.onLayout(changed, left, top, right, bottom);
+        mWidth = (right - left) * 2 / 3;
+        mHeight = (bottom - top) * 2 / 3;
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        if (mOverlayDrawable != null) {
+            int l = (getWidth() - mWidth) / 2;
+            int t = (getHeight() - mHeight) / 2;
+            mOverlayDrawable.setBounds(l, t, l + mWidth, t + mHeight);
+            mOverlayDrawable.draw(canvas);
+        }
+    }
+
+    public Drawable getDrawable() {
+        return mOverlayDrawable;
+    }
+
+    public void setImageDrawable(Drawable d) {
+        mOverlayDrawable = d;
+    }
+
+}