am 999477f9: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit '999477f9f68152533be14daa933cd7574f4ea6ab' into eclair

* commit '999477f9f68152533be14daa933cd7574f4ea6ab':
  Import revised translations.  DO NOT MERGE
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9fdf63b..3d970ab 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,25 +1,25 @@
 <!--
-/* //device/apps/Browser/AndroidManifest.xml
-**
-** Copyright 2006, 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.
-*/
+/*
+ * Copyright 2006, 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.
+ */
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.browser">
 
     <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
+    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
     <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/>
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
@@ -28,12 +28,15 @@
     <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WAKE_LOCK"/>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
     <uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
+    <uses-permission android:name="android.permission.BACKUP_DATA" />
 
     <application   android:name="Browser"
                    android:label="@string/application_name"
                    android:icon="@drawable/ic_launcher_browser"
+                   android:backupAgent=".BrowserBackupAgent"
                    android:taskAffinity="android.task.browser" >
 
         <provider android:name="BrowserProvider"
@@ -59,6 +62,7 @@
                 <data android:scheme="http" />
                 <data android:scheme="https" />
                 <data android:scheme="about" />
+                <data android:scheme="javascript" />
             </intent-filter>
             <!--  For these schemes where any of these particular MIME types
                   have been supplied, we are a good candidate. -->
@@ -107,20 +111,18 @@
             </intent-filter>
             <meta-data android:name="android.app.searchable"
                     android:resource="@xml/searchable" />
-            <intent-filter>
-                <action android:name="android.net.http.NETWORK_STATE" />
-                <action android:name="android.intent.action.PROXY_CHANGE" />
-            </intent-filter>
         </activity>
 
         <activity android:name="CombinedBookmarkHistoryActivity" android:label=""
-                  android:launchMode="singleTop" android:configChanges="orientation|keyboardHidden">
+                  android:launchMode="singleTop" android:configChanges="orientation|keyboardHidden"
+                  android:theme="@style/BookmarkTheme" >
+            <meta-data android:name="android.app.default_searchable"
+                    android:value=".BrowserActivity" />
         </activity>
 
         <activity android:name="BrowserBookmarksPage" android:label="@string/bookmarks"
                   android:launchMode="singleTop" android:configChanges="orientation|keyboardHidden">
         </activity>
-
         <activity android:name="MostVisitedActivity" android:label=""
                 android:launchMode="singleTop" android:configChanges="orientation|keyboardHidden"/>
 
@@ -152,14 +154,8 @@
                   android:configChanges="orientation|keyboardHidden">
         </activity>
 
-        <activity android:name="GearsDialog" android:process=":dialog"
-                  android:configChanges="orientation|keyboardHidden"
-                  android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name="GearsNativeDialog"
-                  android:configChanges="orientation|keyboardHidden"
-                  android:theme="@android:style/Theme.Dialog">
+        <activity android:name="WebsiteSettingsActivity" android:label=""
+                  android:configChanges="orientation|keyboardHidden">
         </activity>
 
         <activity android:name="BookmarkSearch"
@@ -175,14 +171,6 @@
                     android:resource="@xml/bookmarks_searchable" />
         </activity>
 
-        <service android:name="GearsDialogService"
-                 android:process=":dialog"
-                 android:exported="false">
-            <intent-filter>
-                <action android:name="com.android.browser.IGearsDialogService" />
-            </intent-filter>
-        </service>
-
         <activity android:name="AddBookmarkPage" android:label="Save bookmark" android:theme="@android:style/Theme.Dialog"
                   android:configChanges="orientation|keyboardHidden" android:windowSoftInputMode="stateHidden">
             <intent-filter>
@@ -195,6 +183,12 @@
         <!-- Makes .BrowserActivity the search target for any activity in Browser -->
         <meta-data android:name="android.app.default_searchable" android:value=".BrowserActivity" />
 
+        <activity android:name="android.webkit.PluginActivity">
+            <intent-filter>
+                <action android:name="android.intent.webkit.PLUGIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
 
     </application>
 
diff --git a/assets/plugins/gears-0.5.17.0/dummy b/assets/plugins/gears-0.5.17.0/dummy
deleted file mode 100644
index 50f9ab9..0000000
--- a/assets/plugins/gears-0.5.17.0/dummy
+++ /dev/null
@@ -1 +0,0 @@
-This file is used to ensure this subdirectory is created.
diff --git a/assets/plugins/gears.so b/assets/plugins/gears.so
deleted file mode 100644
index 56b3386..0000000
--- a/assets/plugins/gears.so
+++ /dev/null
Binary files differ
diff --git a/res/anim/find_dialog_enter.xml b/res/anim/find_dialog_enter.xml
index 6e19c21..5e597a4 100644
--- a/res/anim/find_dialog_enter.xml
+++ b/res/anim/find_dialog_enter.xml
@@ -1,21 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/anim/options_panel_enter.xml
-**
-** Copyright 2007, 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.
-*/
+<!-- Copyright (C) 2007 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.
 -->
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/res/anim/find_dialog_exit.xml b/res/anim/find_dialog_exit.xml
index 5775bab..854abd0 100644
--- a/res/anim/find_dialog_exit.xml
+++ b/res/anim/find_dialog_exit.xml
@@ -1,21 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/anim/options_panel_exit.xml
-**
-** Copyright 2007, 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.
-*/
+<!-- Copyright (C) 2007 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.
 -->
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/res/anim/title_bar_enter.xml b/res/anim/title_bar_enter.xml
new file mode 100644
index 0000000..ce4df1d
--- /dev/null
+++ b/res/anim/title_bar_enter.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+    android:interpolator="@android:anim/decelerate_interpolator">
+	<translate android:fromYDelta="-25%" android:toYDelta="0"
+            android:duration="@android:integer/config_shortAnimTime"/>
+	<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+            android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/res/anim/title_bar_exit.xml b/res/anim/title_bar_exit.xml
new file mode 100644
index 0000000..b56710c
--- /dev/null
+++ b/res/anim/title_bar_exit.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+    android:interpolator="@android:anim/accelerate_interpolator">
+	<translate android:fromYDelta="0" android:toYDelta="-50%"
+            android:duration="@android:integer/config_shortAnimTime"/>
+	<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+            android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/res/drawable-hdpi/app_web_browser_sm.png b/res/drawable-hdpi/app_web_browser_sm.png
new file mode 100644
index 0000000..ec9372c
--- /dev/null
+++ b/res/drawable-hdpi/app_web_browser_sm.png
Binary files differ
diff --git a/res/drawable-hdpi/bookmark_shadow.9.png b/res/drawable-hdpi/bookmark_shadow.9.png
new file mode 100755
index 0000000..570a802
--- /dev/null
+++ b/res/drawable-hdpi/bookmark_shadow.9.png
Binary files differ
diff --git a/res/drawable-hdpi/browser_thumbnail.png b/res/drawable-hdpi/browser_thumbnail.png
new file mode 100644
index 0000000..590a005
--- /dev/null
+++ b/res/drawable-hdpi/browser_thumbnail.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_close_window.png b/res/drawable-hdpi/btn_close_window.png
new file mode 100644
index 0000000..12e5c55
--- /dev/null
+++ b/res/drawable-hdpi/btn_close_window.png
Binary files differ
diff --git a/res/drawable-hdpi/dialog_divider_horizontal_light.9.png b/res/drawable-hdpi/dialog_divider_horizontal_light.9.png
new file mode 100644
index 0000000..8659acf
--- /dev/null
+++ b/res/drawable-hdpi/dialog_divider_horizontal_light.9.png
Binary files differ
diff --git a/res/drawable-hdpi/fav_icn_background.png b/res/drawable-hdpi/fav_icn_background.png
new file mode 100644
index 0000000..a4ee08a
--- /dev/null
+++ b/res/drawable-hdpi/fav_icn_background.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_bookmark_browsertab.png b/res/drawable-hdpi/ic_btn_bookmark_browsertab.png
new file mode 100755
index 0000000..b633696
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_bookmark_browsertab.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_bookmarks.png b/res/drawable-hdpi/ic_btn_bookmarks.png
new file mode 100644
index 0000000..092590b
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_bookmarks.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_close_panel.png b/res/drawable-hdpi/ic_btn_close_panel.png
new file mode 100644
index 0000000..a1327c2
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_close_panel.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_find_next.png b/res/drawable-hdpi/ic_btn_find_next.png
new file mode 100644
index 0000000..b696a6b
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_find_next.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_find_prev.png b/res/drawable-hdpi/ic_btn_find_prev.png
new file mode 100644
index 0000000..5550c5a
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_find_prev.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_stop_v2.png b/res/drawable-hdpi/ic_btn_stop_v2.png
new file mode 100644
index 0000000..2c97223
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_stop_v2.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_close_tab.png b/res/drawable-hdpi/ic_close_tab.png
new file mode 100755
index 0000000..ae86d2f
--- /dev/null
+++ b/res/drawable-hdpi/ic_close_tab.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_bookmark.png b/res/drawable-hdpi/ic_dialog_bookmark.png
new file mode 100644
index 0000000..0ec7756
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_browser_certificate_partially_secure.png b/res/drawable-hdpi/ic_dialog_browser_certificate_partially_secure.png
new file mode 100644
index 0000000..6a803d4
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_browser_certificate_partially_secure.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_browser_certificate_secure.png b/res/drawable-hdpi/ic_dialog_browser_certificate_secure.png
new file mode 100644
index 0000000..5648f64
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_browser_certificate_secure.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_browser_security_bad.png b/res/drawable-hdpi/ic_dialog_browser_security_bad.png
new file mode 100644
index 0000000..a0a8ff2
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_browser_security_bad.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_browser_security_good.png b/res/drawable-hdpi/ic_dialog_browser_security_good.png
new file mode 100644
index 0000000..e9b4092
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_browser_security_good.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_dialog_menu_generic.png b/res/drawable-hdpi/ic_dialog_menu_generic.png
new file mode 100644
index 0000000..f9527b6
--- /dev/null
+++ b/res/drawable-hdpi/ic_dialog_menu_generic.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_browser.png b/res/drawable-hdpi/ic_launcher_browser.png
new file mode 100644
index 0000000..cdce53e
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_browser.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_drm_file.png b/res/drawable-hdpi/ic_launcher_drm_file.png
new file mode 100644
index 0000000..9df1c55
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_drm_file.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_browser_bookmark.png b/res/drawable-hdpi/ic_launcher_shortcut_browser_bookmark.png
new file mode 100644
index 0000000..f861650
--- /dev/null
+++ b/res/drawable-hdpi/ic_launcher_shortcut_browser_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_bookmark.png b/res/drawable-hdpi/ic_list_bookmark.png
new file mode 100644
index 0000000..13f8067
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_data_large.png b/res/drawable-hdpi/ic_list_data_large.png
new file mode 100644
index 0000000..aaa035d
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_data_large.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_data_off.png b/res/drawable-hdpi/ic_list_data_off.png
new file mode 100644
index 0000000..f7eb6af
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_data_off.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_data_small.png b/res/drawable-hdpi/ic_list_data_small.png
new file mode 100644
index 0000000..eb90a6b
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_data_small.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_gps_denied.png b/res/drawable-hdpi/ic_list_gps_denied.png
new file mode 100644
index 0000000..97dbc9b
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_gps_denied.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_gps_on.png b/res/drawable-hdpi/ic_list_gps_on.png
new file mode 100644
index 0000000..2c02e58
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_gps_on.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_list_new_window.png b/res/drawable-hdpi/ic_list_new_window.png
new file mode 100644
index 0000000..e5e4645
--- /dev/null
+++ b/res/drawable-hdpi/ic_list_new_window.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_bookmark.png b/res/drawable-hdpi/ic_menu_add_bookmark.png
new file mode 100644
index 0000000..28beaaa
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_add_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_bookmark.png b/res/drawable-hdpi/ic_menu_bookmark.png
new file mode 100644
index 0000000..16e7339
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_bookmarks.png b/res/drawable-hdpi/ic_menu_bookmarks.png
new file mode 100755
index 0000000..3644acf
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_bookmarks.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_list.png b/res/drawable-hdpi/ic_menu_list.png
new file mode 100644
index 0000000..cf95f2f
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_list.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_new_window.png b/res/drawable-hdpi/ic_menu_new_window.png
new file mode 100644
index 0000000..fa544fc
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_new_window.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_thumbnail.png b/res/drawable-hdpi/ic_menu_thumbnail.png
new file mode 100644
index 0000000..bfc99aa
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_thumbnail.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_windows.png b/res/drawable-hdpi/ic_menu_windows.png
new file mode 100644
index 0000000..0a27b95
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_windows.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_bookmark.png b/res/drawable-hdpi/ic_search_category_bookmark.png
new file mode 100644
index 0000000..f94776a
--- /dev/null
+++ b/res/drawable-hdpi/ic_search_category_bookmark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_browser.png b/res/drawable-hdpi/ic_search_category_browser.png
new file mode 100644
index 0000000..fbafafb
--- /dev/null
+++ b/res/drawable-hdpi/ic_search_category_browser.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_history.png b/res/drawable-hdpi/ic_search_category_history.png
new file mode 100644
index 0000000..8ca6089
--- /dev/null
+++ b/res/drawable-hdpi/ic_search_category_history.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_suggest.png b/res/drawable-hdpi/ic_search_category_suggest.png
new file mode 100644
index 0000000..8e96638
--- /dev/null
+++ b/res/drawable-hdpi/ic_search_category_suggest.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_bookmarks_selected.png b/res/drawable-hdpi/ic_tab_bookmarks_selected.png
new file mode 100644
index 0000000..8e1c3ae
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_bookmarks_selected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_bookmarks_unselected.png b/res/drawable-hdpi/ic_tab_bookmarks_unselected.png
new file mode 100644
index 0000000..95efcb1
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_bookmarks_unselected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_history_selected.png b/res/drawable-hdpi/ic_tab_history_selected.png
new file mode 100644
index 0000000..e23a0fc
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_history_selected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_history_unselected.png b/res/drawable-hdpi/ic_tab_history_unselected.png
new file mode 100644
index 0000000..663ff46
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_history_unselected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_most_visited_selected.png b/res/drawable-hdpi/ic_tab_most_visited_selected.png
new file mode 100644
index 0000000..04ffd57
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_most_visited_selected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_tab_most_visited_unselected.png b/res/drawable-hdpi/ic_tab_most_visited_unselected.png
new file mode 100644
index 0000000..6127920
--- /dev/null
+++ b/res/drawable-hdpi/ic_tab_most_visited_unselected.png
Binary files differ
diff --git a/res/drawable-hdpi/page_indicator.png b/res/drawable-hdpi/page_indicator.png
new file mode 100644
index 0000000..d00b900
--- /dev/null
+++ b/res/drawable-hdpi/page_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/page_indicator_unselected2.png b/res/drawable-hdpi/page_indicator_unselected2.png
new file mode 100644
index 0000000..a34fd2e
--- /dev/null
+++ b/res/drawable-hdpi/page_indicator_unselected2.png
Binary files differ
diff --git a/res/drawable-hdpi/search_plate_browser.9.png b/res/drawable-hdpi/search_plate_browser.9.png
new file mode 100644
index 0000000..f078259
--- /dev/null
+++ b/res/drawable-hdpi/search_plate_browser.9.png
Binary files differ
diff --git a/res/drawable-hdpi/ssl_icon.png b/res/drawable-hdpi/ssl_icon.png
new file mode 100644
index 0000000..666debc
--- /dev/null
+++ b/res/drawable-hdpi/ssl_icon.png
Binary files differ
diff --git a/res/drawable/app_web_browser_sm.png b/res/drawable-mdpi/app_web_browser_sm.png
similarity index 100%
rename from res/drawable/app_web_browser_sm.png
rename to res/drawable-mdpi/app_web_browser_sm.png
Binary files differ
diff --git a/res/drawable-mdpi/bookmark_shadow.9.png b/res/drawable-mdpi/bookmark_shadow.9.png
new file mode 100644
index 0000000..3c706be
--- /dev/null
+++ b/res/drawable-mdpi/bookmark_shadow.9.png
Binary files differ
diff --git a/res/drawable-mdpi/browser_thumbnail.png b/res/drawable-mdpi/browser_thumbnail.png
new file mode 100644
index 0000000..2d54e07
--- /dev/null
+++ b/res/drawable-mdpi/browser_thumbnail.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_close_window.png b/res/drawable-mdpi/btn_close_window.png
new file mode 100644
index 0000000..53f878b
--- /dev/null
+++ b/res/drawable-mdpi/btn_close_window.png
Binary files differ
diff --git a/res/drawable/dialog_divider_horizontal_light.9.png b/res/drawable-mdpi/dialog_divider_horizontal_light.9.png
similarity index 100%
rename from res/drawable/dialog_divider_horizontal_light.9.png
rename to res/drawable-mdpi/dialog_divider_horizontal_light.9.png
Binary files differ
diff --git a/res/drawable/fav_icn_background.png b/res/drawable-mdpi/fav_icn_background.png
similarity index 100%
rename from res/drawable/fav_icn_background.png
rename to res/drawable-mdpi/fav_icn_background.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_bookmark_browsertab.png b/res/drawable-mdpi/ic_btn_bookmark_browsertab.png
new file mode 100644
index 0000000..1c52124
--- /dev/null
+++ b/res/drawable-mdpi/ic_btn_bookmark_browsertab.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_bookmarks.png b/res/drawable-mdpi/ic_btn_bookmarks.png
new file mode 100644
index 0000000..c307fee
--- /dev/null
+++ b/res/drawable-mdpi/ic_btn_bookmarks.png
Binary files differ
diff --git a/res/drawable/ic_btn_close_panel.png b/res/drawable-mdpi/ic_btn_close_panel.png
similarity index 100%
rename from res/drawable/ic_btn_close_panel.png
rename to res/drawable-mdpi/ic_btn_close_panel.png
Binary files differ
diff --git a/res/drawable/ic_btn_find_next.png b/res/drawable-mdpi/ic_btn_find_next.png
similarity index 100%
rename from res/drawable/ic_btn_find_next.png
rename to res/drawable-mdpi/ic_btn_find_next.png
Binary files differ
diff --git a/res/drawable/ic_btn_find_prev.png b/res/drawable-mdpi/ic_btn_find_prev.png
similarity index 100%
rename from res/drawable/ic_btn_find_prev.png
rename to res/drawable-mdpi/ic_btn_find_prev.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_stop_v2.png b/res/drawable-mdpi/ic_btn_stop_v2.png
new file mode 100644
index 0000000..89f01e7
--- /dev/null
+++ b/res/drawable-mdpi/ic_btn_stop_v2.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_close_tab.png b/res/drawable-mdpi/ic_close_tab.png
new file mode 100644
index 0000000..44a789e
--- /dev/null
+++ b/res/drawable-mdpi/ic_close_tab.png
Binary files differ
diff --git a/res/drawable/ic_dialog_bookmark.png b/res/drawable-mdpi/ic_dialog_bookmark.png
similarity index 100%
rename from res/drawable/ic_dialog_bookmark.png
rename to res/drawable-mdpi/ic_dialog_bookmark.png
Binary files differ
diff --git a/res/drawable/ic_dialog_browser_certificate_partially_secure.png b/res/drawable-mdpi/ic_dialog_browser_certificate_partially_secure.png
similarity index 100%
rename from res/drawable/ic_dialog_browser_certificate_partially_secure.png
rename to res/drawable-mdpi/ic_dialog_browser_certificate_partially_secure.png
Binary files differ
diff --git a/res/drawable/ic_dialog_browser_certificate_secure.png b/res/drawable-mdpi/ic_dialog_browser_certificate_secure.png
similarity index 100%
rename from res/drawable/ic_dialog_browser_certificate_secure.png
rename to res/drawable-mdpi/ic_dialog_browser_certificate_secure.png
Binary files differ
diff --git a/res/drawable/ic_dialog_browser_security_bad.png b/res/drawable-mdpi/ic_dialog_browser_security_bad.png
similarity index 100%
rename from res/drawable/ic_dialog_browser_security_bad.png
rename to res/drawable-mdpi/ic_dialog_browser_security_bad.png
Binary files differ
diff --git a/res/drawable/ic_dialog_browser_security_good.png b/res/drawable-mdpi/ic_dialog_browser_security_good.png
similarity index 100%
rename from res/drawable/ic_dialog_browser_security_good.png
rename to res/drawable-mdpi/ic_dialog_browser_security_good.png
Binary files differ
diff --git a/res/drawable/ic_dialog_menu_generic.png b/res/drawable-mdpi/ic_dialog_menu_generic.png
similarity index 100%
rename from res/drawable/ic_dialog_menu_generic.png
rename to res/drawable-mdpi/ic_dialog_menu_generic.png
Binary files differ
diff --git a/res/drawable/ic_launcher_browser.png b/res/drawable-mdpi/ic_launcher_browser.png
similarity index 100%
rename from res/drawable/ic_launcher_browser.png
rename to res/drawable-mdpi/ic_launcher_browser.png
Binary files differ
diff --git a/res/drawable/ic_launcher_drm_file.png b/res/drawable-mdpi/ic_launcher_drm_file.png
similarity index 100%
rename from res/drawable/ic_launcher_drm_file.png
rename to res/drawable-mdpi/ic_launcher_drm_file.png
Binary files differ
diff --git a/res/drawable/ic_launcher_shortcut_browser_bookmark.png b/res/drawable-mdpi/ic_launcher_shortcut_browser_bookmark.png
similarity index 100%
rename from res/drawable/ic_launcher_shortcut_browser_bookmark.png
rename to res/drawable-mdpi/ic_launcher_shortcut_browser_bookmark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_bookmark.png b/res/drawable-mdpi/ic_list_bookmark.png
new file mode 100644
index 0000000..8e75121
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_bookmark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_data_large.png b/res/drawable-mdpi/ic_list_data_large.png
new file mode 100644
index 0000000..58f7c2f
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_data_large.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_data_off.png b/res/drawable-mdpi/ic_list_data_off.png
new file mode 100644
index 0000000..69d4eae
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_data_off.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_data_small.png b/res/drawable-mdpi/ic_list_data_small.png
new file mode 100644
index 0000000..3d40655
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_data_small.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_gps_denied.png b/res/drawable-mdpi/ic_list_gps_denied.png
new file mode 100644
index 0000000..d53a5c1
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_gps_denied.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_gps_on.png b/res/drawable-mdpi/ic_list_gps_on.png
new file mode 100644
index 0000000..15ff6ee
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_gps_on.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_list_new_window.png b/res/drawable-mdpi/ic_list_new_window.png
new file mode 100644
index 0000000..61c3e63
--- /dev/null
+++ b/res/drawable-mdpi/ic_list_new_window.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_bookmark.png b/res/drawable-mdpi/ic_menu_add_bookmark.png
new file mode 100644
index 0000000..3e38bb9
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_add_bookmark.png
Binary files differ
diff --git a/res/drawable/ic_menu_bookmark.png b/res/drawable-mdpi/ic_menu_bookmark.png
similarity index 100%
rename from res/drawable/ic_menu_bookmark.png
rename to res/drawable-mdpi/ic_menu_bookmark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_bookmarks.png b/res/drawable-mdpi/ic_menu_bookmarks.png
new file mode 100755
index 0000000..1ac78b6
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_bookmarks.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_list.png b/res/drawable-mdpi/ic_menu_list.png
new file mode 100644
index 0000000..b2d35cc
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_list.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_new_window.png b/res/drawable-mdpi/ic_menu_new_window.png
new file mode 100644
index 0000000..7fb9948
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_new_window.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_thumbnail.png b/res/drawable-mdpi/ic_menu_thumbnail.png
new file mode 100644
index 0000000..74a87e2
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_thumbnail.png
Binary files differ
diff --git a/res/drawable/ic_menu_windows.png b/res/drawable-mdpi/ic_menu_windows.png
similarity index 100%
rename from res/drawable/ic_menu_windows.png
rename to res/drawable-mdpi/ic_menu_windows.png
Binary files differ
diff --git a/res/drawable/ic_search_category_bookmark.png b/res/drawable-mdpi/ic_search_category_bookmark.png
similarity index 100%
rename from res/drawable/ic_search_category_bookmark.png
rename to res/drawable-mdpi/ic_search_category_bookmark.png
Binary files differ
diff --git a/res/drawable/ic_search_category_browser.png b/res/drawable-mdpi/ic_search_category_browser.png
similarity index 100%
rename from res/drawable/ic_search_category_browser.png
rename to res/drawable-mdpi/ic_search_category_browser.png
Binary files differ
diff --git a/res/drawable/ic_search_category_history.png b/res/drawable-mdpi/ic_search_category_history.png
similarity index 100%
rename from res/drawable/ic_search_category_history.png
rename to res/drawable-mdpi/ic_search_category_history.png
Binary files differ
diff --git a/res/drawable/ic_search_category_suggest.png b/res/drawable-mdpi/ic_search_category_suggest.png
similarity index 100%
rename from res/drawable/ic_search_category_suggest.png
rename to res/drawable-mdpi/ic_search_category_suggest.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_bookmarks_selected.png b/res/drawable-mdpi/ic_tab_bookmarks_selected.png
new file mode 100644
index 0000000..f5e0100
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_bookmarks_selected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_bookmarks_unselected.png b/res/drawable-mdpi/ic_tab_bookmarks_unselected.png
new file mode 100644
index 0000000..598b098
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_bookmarks_unselected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_history_selected.png b/res/drawable-mdpi/ic_tab_history_selected.png
new file mode 100644
index 0000000..211e23f
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_history_selected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_history_unselected.png b/res/drawable-mdpi/ic_tab_history_unselected.png
new file mode 100644
index 0000000..df6b14b
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_history_unselected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_most_visited_selected.png b/res/drawable-mdpi/ic_tab_most_visited_selected.png
new file mode 100644
index 0000000..50564ec
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_most_visited_selected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_tab_most_visited_unselected.png b/res/drawable-mdpi/ic_tab_most_visited_unselected.png
new file mode 100644
index 0000000..105ff2e
--- /dev/null
+++ b/res/drawable-mdpi/ic_tab_most_visited_unselected.png
Binary files differ
diff --git a/res/drawable/page_indicator.png b/res/drawable-mdpi/page_indicator.png
similarity index 100%
rename from res/drawable/page_indicator.png
rename to res/drawable-mdpi/page_indicator.png
Binary files differ
diff --git a/res/drawable/page_indicator_unselected2.png b/res/drawable-mdpi/page_indicator_unselected2.png
similarity index 100%
rename from res/drawable/page_indicator_unselected2.png
rename to res/drawable-mdpi/page_indicator_unselected2.png
Binary files differ
diff --git a/res/drawable-mdpi/search_plate_browser.9.png b/res/drawable-mdpi/search_plate_browser.9.png
new file mode 100644
index 0000000..0436dcf
--- /dev/null
+++ b/res/drawable-mdpi/search_plate_browser.9.png
Binary files differ
diff --git a/res/drawable/ssl_icon.png b/res/drawable-mdpi/ssl_icon.png
similarity index 100%
rename from res/drawable/ssl_icon.png
rename to res/drawable-mdpi/ssl_icon.png
Binary files differ
diff --git a/res/drawable/blank.xml b/res/drawable/blank.xml
new file mode 100644
index 0000000..724f5e7
--- /dev/null
+++ b/res/drawable/blank.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <corners android:radius="5dip"/>
+            <solid android:color="@color/white"/>
+        </shape>
+    </item>
+</layer-list>
diff --git a/res/drawable/browser_bookmark_tab.xml b/res/drawable/browser_bookmark_tab.xml
index 76684cb..49b66c7 100644
--- a/res/drawable/browser_bookmark_tab.xml
+++ b/res/drawable/browser_bookmark_tab.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true" android:drawable="@drawable/ic_tab_browser_bookmark_selected"/>
-    <item android:state_selected="false" android:drawable="@drawable/ic_tab_browser_bookmark_unselected"/>
+    <item android:state_selected="true" android:drawable="@drawable/ic_tab_bookmarks_selected"/>
+    <item android:state_selected="false" android:drawable="@drawable/ic_tab_bookmarks_unselected"/>
 </selector>
     
diff --git a/res/drawable/browser_history_tab.xml b/res/drawable/browser_history_tab.xml
index b5329ea..1fbd0ce 100644
--- a/res/drawable/browser_history_tab.xml
+++ b/res/drawable/browser_history_tab.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true" android:drawable="@drawable/ic_tab_browser_history_selected"/>
-    <item android:state_selected="false" android:drawable="@drawable/ic_tab_browser_history_unselected"/>
+    <item android:state_selected="true" android:drawable="@drawable/ic_tab_history_selected"/>
+    <item android:state_selected="false" android:drawable="@drawable/ic_tab_history_unselected"/>
 </selector>
 
diff --git a/res/drawable/browser_visited_tab.xml b/res/drawable/browser_visited_tab.xml
index d1b4404..b9d6eb7 100644
--- a/res/drawable/browser_visited_tab.xml
+++ b/res/drawable/browser_visited_tab.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true" android:drawable="@drawable/ic_tab_browser_visited_selected"/>
-    <item android:state_selected="false" android:drawable="@drawable/ic_tab_browser_visited_unselected"/>
+    <item android:state_selected="true" android:drawable="@drawable/ic_tab_most_visited_selected"/>
+    <item android:state_selected="false" android:drawable="@drawable/ic_tab_most_visited_unselected"/>
 </selector>
 
diff --git a/res/drawable/btn_bookmark.xml b/res/drawable/btn_bookmark.xml
new file mode 100644
index 0000000..ce169d0
--- /dev/null
+++ b/res/drawable/btn_bookmark.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<!-- Custom layout file which mimics the btn_search_dialog_voice look, but draws
+        the pressed state even without window focus -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true"
+        android:drawable="@*android:drawable/btn_search_dialog_voice_pressed" />
+    <item android:state_pressed="false"
+        android:drawable="@*android:drawable/btn_search_dialog_voice_default" />
+</selector>
diff --git a/res/drawable/button_line.xml b/res/drawable/button_line.xml
new file mode 100644
index 0000000..67869d0
--- /dev/null
+++ b/res/drawable/button_line.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:width="2dip">
+            <solid android:color="#ff000000"/>
+        </shape>
+    </item>
+    <item android:left="1dip" android:width="1dip">
+        <shape>
+            <solid android:color="#ffffffff"/>
+        </shape>
+    </item>
+</layer-list>
diff --git a/res/drawable/close_background.xml b/res/drawable/close_background.xml
new file mode 100644
index 0000000..627712f
--- /dev/null
+++ b/res/drawable/close_background.xml
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_window_focused="false"
+        android:drawable="@android:color/transparent" />
+    <item android:state_focused="false" android:state_pressed="true"
+        android:drawable="@*android:drawable/list_selector_background_transition" />
+    <item android:state_focused="false" android:state_pressed="false"
+        android:drawable="@color/black"/>
+</selector>
diff --git a/res/drawable/default_video_poster.png b/res/drawable/default_video_poster.png
new file mode 100755
index 0000000..f457f23
--- /dev/null
+++ b/res/drawable/default_video_poster.png
Binary files differ
diff --git a/res/drawable/gears.png b/res/drawable/gears.png
deleted file mode 100644
index bd0fb08..0000000
--- a/res/drawable/gears.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_button.xml b/res/drawable/gears_button.xml
deleted file mode 100755
index ec8cebb..0000000
--- a/res/drawable/gears_button.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
-*/
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:state_focused="true" android:state_pressed="false"
-    android:state_enabled="true"
-    android:drawable="@drawable/gears_button_selected" />
-  <item android:state_enabled="true" android:state_pressed="true"
-    android:drawable="@drawable/gears_button_pressed" />
-  <item android:state_enabled="true" android:state_focused="false"
-    android:state_pressed="false"
-    android:drawable="@drawable/gears_button_default" />
-  <item android:drawable="@drawable/gears_button_default" />
-</selector>
diff --git a/res/drawable/gears_button_default.9.png b/res/drawable/gears_button_default.9.png
deleted file mode 100644
index 3b1d065..0000000
--- a/res/drawable/gears_button_default.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_button_pressed.9.png b/res/drawable/gears_button_pressed.9.png
deleted file mode 100644
index 7b56794..0000000
--- a/res/drawable/gears_button_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_button_selected.9.png b/res/drawable/gears_button_selected.9.png
deleted file mode 100644
index e1d5608..0000000
--- a/res/drawable/gears_button_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_icon_32x32.png b/res/drawable/gears_icon_32x32.png
deleted file mode 100644
index f703f7f..0000000
--- a/res/drawable/gears_icon_32x32.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_icon_48x48.png b/res/drawable/gears_icon_48x48.png
deleted file mode 100644
index da5493b..0000000
--- a/res/drawable/gears_icon_48x48.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_local_data.png b/res/drawable/gears_local_data.png
deleted file mode 100644
index 4c43456..0000000
--- a/res/drawable/gears_local_data.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/gears_location_data.png b/res/drawable/gears_location_data.png
deleted file mode 100644
index f69ad75..0000000
--- a/res/drawable/gears_location_data.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_new_window.png b/res/drawable/ic_new_window.png
deleted file mode 100644
index 3f8442d..0000000
--- a/res/drawable/ic_new_window.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_bookmark_selected.png b/res/drawable/ic_tab_browser_bookmark_selected.png
deleted file mode 100644
index 6f54305..0000000
--- a/res/drawable/ic_tab_browser_bookmark_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_bookmark_unselected.png b/res/drawable/ic_tab_browser_bookmark_unselected.png
deleted file mode 100644
index 5037860..0000000
--- a/res/drawable/ic_tab_browser_bookmark_unselected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_history_selected.png b/res/drawable/ic_tab_browser_history_selected.png
deleted file mode 100644
index d9355f6..0000000
--- a/res/drawable/ic_tab_browser_history_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_history_unselected.png b/res/drawable/ic_tab_browser_history_unselected.png
deleted file mode 100644
index c5c794a..0000000
--- a/res/drawable/ic_tab_browser_history_unselected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_visited_selected.png b/res/drawable/ic_tab_browser_visited_selected.png
deleted file mode 100644
index 9d79107..0000000
--- a/res/drawable/ic_tab_browser_visited_selected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_tab_browser_visited_unselected.png b/res/drawable/ic_tab_browser_visited_unselected.png
deleted file mode 100644
index 55d76e9..0000000
--- a/res/drawable/ic_tab_browser_visited_unselected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/title_text.xml b/res/drawable/title_text.xml
new file mode 100644
index 0000000..6a214d9
--- /dev/null
+++ b/res/drawable/title_text.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<!-- Custom layout file which mimics the standard edit_text look, but draws the
+        pressed state even without window focus -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true"
+            android:drawable="@*android:drawable/textfield_pressed" />
+    <item android:state_pressed="false"
+            android:drawable="@*android:drawable/textfield_default" />
+</selector>
diff --git a/res/layout/active_tabs.xml b/res/layout/active_tabs.xml
new file mode 100644
index 0000000..d25f154
--- /dev/null
+++ b/res/layout/active_tabs.xml
@@ -0,0 +1,44 @@
+<?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="fill_parent"
+    android:layout_width="fill_parent"
+    android:orientation="vertical"
+    android:background="@color/black"
+    >
+    <RelativeLayout
+        style="?android:attr/windowTitleBackgroundStyle"
+        android:layout_width="fill_parent"
+        android:layout_height="?android:attr/windowTitleSize"
+        >
+        <TextView android:id="@android:id/title"
+            style="?android:attr/windowTitleStyle"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_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="fill_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:cacheColorHint="@color/black"
+        />
+</LinearLayout>
diff --git a/res/layout/add_new_bookmark.xml b/res/layout/add_new_bookmark.xml
index bb56b93..1880e20 100644
--- a/res/layout/add_new_bookmark.xml
+++ b/res/layout/add_new_bookmark.xml
@@ -31,7 +31,7 @@
             android:layout_marginLeft="5dip"
             android:layout_marginRight="11dip"
             android:focusable="false"
-            android:src="@*android:drawable/sym_action_add"
+            android:src="@drawable/ic_list_bookmark"
             android:scaleType="fitCenter"
             />
     <LinearLayout
diff --git a/res/layout/bookmark_thumbnail.xml b/res/layout/bookmark_thumbnail.xml
new file mode 100644
index 0000000..8dc5564
--- /dev/null
+++ b/res/layout/bookmark_thumbnail.xml
@@ -0,0 +1,79 @@
+<?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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical"
+    android:padding="0dip"
+    >
+
+    <ImageView android:id="@+id/thumb"
+        android:src="@drawable/browser_thumbnail"
+        android:scaleType="center"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="center"
+        />
+
+    <!-- FIXME: Want to have a gradient over the thumb -->
+
+    <!-- This holds the star for addbookmark -->
+    <LinearLayout android:id="@+id/holder"
+        android:layout_height="fill_parent"
+        android:layout_width="fill_parent"
+        android:orientation="horizontal"
+        android:background="#99000000"
+        android:gravity="center"
+        android:layout_alignBottom="@+id/thumb"
+        android:layout_alignTop="@+id/thumb"
+        >
+        <ImageView
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:src="@drawable/ic_list_bookmark"
+            />
+        <TextView
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="bold"
+            android:textColor="@color/white"
+            android:text="@string/add_bookmark_short"
+            />
+    </LinearLayout>
+
+    <TextView android:id="@+id/label"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textStyle="bold"
+        android:textColor="@color/white"
+        android:maxLines="1"
+        android:paddingLeft="2dip"
+        android:paddingRight="2dip"
+        android:paddingTop="0dip"
+        android:paddingBottom="0dip"
+        android:layout_marginTop="0dip"
+        android:scrollHorizontally="true"
+        android:ellipsize="marquee"
+        android:layout_below="@+id/thumb"
+        android:layout_alignLeft="@+id/thumb"
+        android:layout_alignRight="@+id/thumb"
+        />
+
+</RelativeLayout>
diff --git a/res/layout/browser_add_bookmark.xml b/res/layout/browser_add_bookmark.xml
index ca84f30..9fb2b46 100644
--- a/res/layout/browser_add_bookmark.xml
+++ b/res/layout/browser_add_bookmark.xml
@@ -20,6 +20,15 @@
     android:orientation="vertical"
     >
 
+    <ImageView android:id="@+id/titleDivider"
+        android:layout_width="fill_parent"
+        android:layout_height="1dip"
+        android:scaleType="fitXY"
+        android:gravity="fill_horizontal"
+        android:src="@drawable/dialog_divider_horizontal_light"
+        android:layout_marginLeft="10dip"
+        android:layout_marginRight="10dip"/>
+
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
diff --git a/res/layout/browser_downloads_page.xml b/res/layout/browser_downloads_page.xml
index c83a727..1d4d4e6 100644
--- a/res/layout/browser_downloads_page.xml
+++ b/res/layout/browser_downloads_page.xml
@@ -18,8 +18,14 @@
 ** limitations under the License.
 */
 -->
-
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/list"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"/>
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+    <ListView 
+        android:id="@+id/list"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"/>
+    <ViewStub 
+        android:id="@+id/empty"
+        android:layout="@layout/no_downloads"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"/>
+</merge>
diff --git a/res/layout/browser_subwindow.xml b/res/layout/browser_subwindow.xml
index 5b00bf7..0eb9e72 100644
--- a/res/layout/browser_subwindow.xml
+++ b/res/layout/browser_subwindow.xml
@@ -30,6 +30,8 @@
             <WebView android:id="@+id/webview"
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
+                android:fadeScrollbars="true"
+                android:scrollbarStyle="outsideOverlay"
                 android:layout_weight="1" />
         </LinearLayout>
     </FrameLayout>
diff --git a/res/layout/custom_screen.xml b/res/layout/custom_screen.xml
new file mode 100644
index 0000000..8bc03fb
--- /dev/null
+++ b/res/layout/custom_screen.xml
@@ -0,0 +1,38 @@
+<?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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android">
+    <FrameLayout android:id="@+id/fullscreen_custom_content"
+        android:visibility="gone"
+        android:background="@color/black"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+    />
+    <LinearLayout android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+
+        <LinearLayout android:id="@+id/error_console"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+
+        <FrameLayout android:id="@+id/main_content"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+        />
+    </LinearLayout>
+</FrameLayout>
diff --git a/res/layout/empty_history.xml b/res/layout/empty_history.xml
index cbaffd0..8fd3c01 100644
--- a/res/layout/empty_history.xml
+++ b/res/layout/empty_history.xml
@@ -14,7 +14,8 @@
      limitations under the License.
 -->
 
-<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/empty_view"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:text="@string/empty_history"
diff --git a/res/layout/error_console.xml b/res/layout/error_console.xml
new file mode 100644
index 0000000..0fffcde
--- /dev/null
+++ b/res/layout/error_console.xml
@@ -0,0 +1,67 @@
+<?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:id="@+id/error_console_view_group_id"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical"
+    android:background="#000000">
+
+    <TextView android:id="@+id/error_console_header_id"
+        android:text="@string/error_console_header_text_minimized"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="2dip"
+        android:paddingBottom="2dip"
+        android:paddingLeft="5dip"
+        style="?android:attr/listSeparatorTextViewStyle"
+        android:visibility="gone"
+    />
+
+    <view class="com.android.browser.ErrorConsoleView$ErrorConsoleListView"
+        android:id="@+id/error_console_list_id"
+        android:layout_width="fill_parent"
+        android:layout_height="200dip"
+        android:visibility="gone"
+        android:layout_weight="1"
+        android:cacheColorHint="#000000"
+    />
+
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/error_console_eval_view_group_id"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone">
+
+        <EditText android:id="@+id/error_console_eval_text_id"
+            android:hint="@string/error_console_eval_text_hint"
+            android:layout_height="wrap_content"
+            android:scrollHorizontally="true"
+            android:inputType="text"
+            android:layout_width="0dip"
+            android:layout_gravity="left"
+            android:layout_weight="1.0"
+        />
+
+        <Button android:id="@+id/error_console_eval_button_id"
+            android:text="@string/error_console_eval_button_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/gears_dialog_permission.xml b/res/layout/gears_dialog_permission.xml
deleted file mode 100644
index 01914e2..0000000
--- a/res/layout/gears_dialog_permission.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
- */
--->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-  android:layout_width="fill_parent"
-  android:layout_height="wrap_content"
-  android:paddingBottom="10dip">
-
-  <LinearLayout
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:paddingTop="10dip"
-    android:paddingLeft="10dip"
-    android:paddingRight="10dip"
-    android:layout_height="wrap_content">
-
-    <LinearLayout
-      android:layout_width="fill_parent"
-      android:layout_height="wrap_content"
-      android:orientation="horizontal">
-
-      <ImageView
-        android:id="@+id/origin_icon"
-        android:padding="10dip"
-        android:layout_centerHorizontal="true"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:visibility="gone"
-        android:adjustViewBounds="true"
-        android:src="@drawable/gears"/>
-
-      <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:padding="4dip"
-        android:orientation="vertical">
-
-        <TextView
-          android:id="@+id/origin_title"
-          android:layout_width="fill_parent"
-          android:layout_height="wrap_content"
-          android:visibility="gone"
-          android:textStyle="bold"
-          android:gravity="left"
-          android:textSize="16dip"
-          android:textColor="@color/white"/>
-
-        <TextView
-          android:id="@+id/origin_subtitle"
-          android:layout_width="fill_parent"
-          android:layout_height="wrap_content"
-          android:visibility="gone"
-          android:gravity="left"
-          android:textSize="13dip"
-          android:textColor="@color/white"/>
-
-        <TextView
-          android:id="@+id/origin_message"
-          android:layout_width="fill_parent"
-          android:layout_height="wrap_content"
-          android:visibility="gone"
-          android:paddingTop="10dip"
-          android:gravity="left"
-          android:textSize="13dip"
-          android:textColor="@color/white"/>
-
-      </LinearLayout>
-
-    </LinearLayout>
-
-    <TextView
-      android:id="@+id/privacy_policy_label"
-      android:layout_width="fill_parent"
-      android:layout_height="wrap_content"
-      android:paddingTop="10dip"
-      android:gravity="center_horizontal"
-      android:textSize="13dip"
-      android:textStyle="italic"
-      android:textColor="@color/white"
-      android:visibility="gone"
-      android:text="@string/privacy_policy" />
-
-    <TextView
-      android:id="@+id/permission_dialog_message"
-      android:layout_width="fill_parent"
-      android:layout_height="wrap_content"
-      android:paddingLeft="4dip"
-      android:paddingTop="10dip"
-      android:gravity="left"
-      android:textSize="16dip"
-      android:textColor="@color/white"/>
-
-  </LinearLayout>
-
-</ScrollView>
diff --git a/res/layout/gears_dialog_settings.xml b/res/layout/gears_dialog_settings.xml
deleted file mode 100644
index a9026db..0000000
--- a/res/layout/gears_dialog_settings.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-  android:orientation="vertical"
-  android:layout_width="wrap_content"
-  android:layout_height="wrap_content">
-
-  <LinearLayout
-    android:orientation="vertical"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:background="@color/gray"
-    android:padding="1px">
-
-    <LinearLayout
-      android:orientation="vertical"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:background="@color/white">
-
-      <ListView android:id="@+id/sites_list"
-        android:padding="4dip"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        style="@android:style/Widget.ListView.White" />
-
-    </LinearLayout>
-
-  </LinearLayout>
-
-  <TextView
-    android:id="@+id/gears_version"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:paddingTop="10dip"
-    android:gravity="center_horizontal"
-    android:textSize="13dip"
-    android:textStyle="italic"
-    android:textColor="@color/black" />
-
-</LinearLayout>
diff --git a/res/layout/gears_dialog_settings_row.xml b/res/layout/gears_dialog_settings_row.xml
deleted file mode 100644
index 11d757a..0000000
--- a/res/layout/gears_dialog_settings_row.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-  android:orientation="vertical"
-  android:layout_width="fill_parent"
-  android:layout_height="wrap_content"
-  android:textSize="13dip"
-  android:background="@color/white"
-  android:textColor="@color/black">
-
-  <LinearLayout
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:padding="4dip">
-
-    <TextView
-      android:id="@+id/origin_name"
-      android:layout_width="0dip"
-      android:layout_height="wrap_content"
-      android:layout_weight="1"
-      android:textColor="@color/black"
-      android:textStyle="bold"/>
-
-    <Button
-      android:id="@+id/origin_remove"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      style="@style/gears_button"
-      android:text="@string/remove"/>
-
-  </LinearLayout>
-
-  <TableLayout
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:stretchColumns="0"
-    android:shrinkColumns="0">
-
-    <TableRow
-      android:id="@+id/local_storage_choice"
-      android:visibility="gone">
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:textColor="@color/black"
-        android:gravity="center_vertical"
-        android:text="@string/local_storage"/>
-
-      <RadioGroup
-        android:orientation="horizontal"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent">
-        <RadioButton
-          android:id="@+id/local_storage_allowed"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:textColor="@color/black"
-          android:textSize="13dip"
-          android:text="@string/allowed"/>
-
-        <RadioButton
-          android:id="@+id/local_storage_denied"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:textColor="@color/black"
-          android:textSize="13dip"
-          android:text="@string/denied"/>
-      </RadioGroup>
-
-    </TableRow>
-
-    <TableRow
-      android:id="@+id/location_data_choice"
-      android:visibility="gone">
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:textColor="@color/black"
-        android:layout_gravity="center_vertical"
-        android:text="@string/location"/>
-
-      <RadioGroup
-        android:orientation="horizontal"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent">
-        <RadioButton
-          android:id="@+id/location_data_allowed"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:textColor="@color/black"
-          android:textSize="13dip"
-          android:text="@string/allowed"/>
-
-        <RadioButton
-          android:id="@+id/location_data_denied"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:textColor="@color/black"
-          android:textSize="13dip"
-          android:text="@string/denied"/>
-      </RadioGroup>
-
-    </TableRow>
-
-  </TableLayout>
-
-</LinearLayout>
diff --git a/res/layout/gears_settings.xml b/res/layout/gears_settings.xml
deleted file mode 100644
index e3a4cbe..0000000
--- a/res/layout/gears_settings.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-  android:drawingCacheQuality="auto"
-  android:layout_width="fill_parent"
-  android:layout_height="wrap_content"
-  android:orientation="vertical"
-  android:padding="0dip">
-
-  <ListView android:id="@+id/sites_list"
-    android:padding="4dip"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content" />
-
-  <LinearLayout
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <ImageView android:id="@+id/titleDivider"
-        android:layout_width="fill_parent"
-        android:layout_height="1dip"
-        android:scaleType="fitXY"
-        android:gravity="fill_horizontal"
-        android:src="@drawable/dialog_divider_horizontal_light"
-        android:layout_marginLeft="10dip"
-        android:layout_marginRight="10dip"/>
-
-  </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/gears_settings_row.xml b/res/layout/gears_settings_row.xml
deleted file mode 100644
index 6a1e851..0000000
--- a/res/layout/gears_settings_row.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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.
- */
--->
-
-<com.android.internal.view.menu.ListMenuItemView
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  android:layout_width="fill_parent"
-  android:layout_height="?android:attr/listPreferredItemHeight">
-
-  <RelativeLayout
-    android:layout_width="0dip"
-    android:layout_weight="1"
-    android:layout_height="wrap_content"
-    android:layout_gravity="center_vertical"
-    android:layout_marginLeft="6dip"
-    android:layout_marginRight="6dip"
-    android:duplicateParentState="true">
-
-    <TextView
-      android:id="@+id/title"
-      android:layout_width="fill_parent"
-      android:layout_height="wrap_content"
-      android:layout_alignParentTop="true"
-      android:layout_alignParentLeft="true"
-      android:textAppearance="?android:attr/textAppearanceMedium"
-      android:singleLine="true"
-      android:duplicateParentState="true"
-      android:ellipsize="start"
-      android:fadingEdge="none"/>
-
-    <TextView
-      android:id="@+id/subtitle"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_below="@id/title"
-      android:layout_alignParentLeft="true"
-      android:textAppearance="?android:attr/textAppearanceSmall"
-      android:singleLine="false"
-      android:duplicateParentState="true"/>
-
-    <TextView
-      android:id="@+id/info"
-      android:visibility="gone"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_below="@id/subtitle"
-      android:textAppearance="?android:attr/textAppearanceMedium"
-      android:singleLine="true"
-      android:layout_centerHorizontal="true"
-      android:duplicateParentState="true"
-      android:ellipsize="marquee"
-      android:fadingEdge="horizontal"/>
-
-  </RelativeLayout>
-
-  <LinearLayout
-    android:layout_width="wrap_content"
-    android:layout_height="fill_parent"
-    android:paddingLeft="10dip"
-    android:gravity="center_vertical"
-    android:orientation="horizontal">
-
-    <ImageView
-      android:id="@+id/icon"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:visibility="gone"
-      android:src="@drawable/ic_dialog_menu_generic" />
-
-    <CheckBox
-      android:id="@+id/checkbox"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_alignParentLeft="true"
-      android:drawablePadding="10dip"
-      android:focusable="false"
-      android:clickable="false"
-      android:duplicateParentState="true"
-      android:visibility="gone"
-      android:textSize="16dip"/>
-
-  </LinearLayout>
-
-</com.android.internal.view.menu.ListMenuItemView>
diff --git a/res/layout/geolocation_permissions_prompt.xml b/res/layout/geolocation_permissions_prompt.xml
new file mode 100755
index 0000000..357da00
--- /dev/null
+++ b/res/layout/geolocation_permissions_prompt.xml
@@ -0,0 +1,90 @@
+<?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.
+
+     This is the layout for the Geolocation permissions prompt.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fitsSystemWindows="true"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content">
+
+    <!-- Use an inner element as we can't show a hidden outermost element -->
+    <LinearLayout android:id="@+id/inner"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/black"
+        android:paddingTop="1px"
+        android:visibility="gone">
+
+        <!-- White line -->
+        <View
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="1px"
+            android:background="@color/white" />
+
+        <!-- Container for content -->
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:background="@color/geolocation_permissions_prompt_background"
+            android:padding="6dip">
+
+            <!-- 'google.com wants to know your location' -->
+            <TextView android:id="@+id/message"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:textSize="14dip"
+                android:textColor="@color/black" />
+
+            <!-- Checkbox -->
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+                <CheckBox android:id="@+id/remember"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+                <TextView
+                    android:paddingLeft="4dip"
+                    android:text="@string/geolocation_permissions_prompt_remember"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textSize="14dip"
+                    android:textColor="@color/black" />
+            </LinearLayout>
+
+            <!-- Buttons -->
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+                <Button android:id="@+id/share_button"
+                    android:text="@string/geolocation_permissions_prompt_share"
+                    android:layout_weight="1"
+                    android:layout_width="0dip"
+                    android:layout_height="wrap_content" />
+                <Button android:id="@+id/dont_share_button"
+                    android:text="@string/geolocation_permissions_prompt_dont_share"
+                    android:layout_weight="1"
+                    android:layout_width="0dip"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/gears_dialog.xml b/res/layout/permission_dialog.xml
similarity index 64%
rename from res/layout/gears_dialog.xml
rename to res/layout/permission_dialog.xml
index 57d4f0b..ff24eaf 100644
--- a/res/layout/gears_dialog.xml
+++ b/res/layout/permission_dialog.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 /*
- * Copyright 2008, The Android Open Source Project
+ * Copyright 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.
@@ -27,49 +27,26 @@
   <LinearLayout
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
+    android:orientation="horizontal"
     android:padding="10dip">
 
-    <LinearLayout
-      android:layout_width="fill_parent"
+    <ImageView
+      android:id="@+id/icon"
+      android:paddingRight="10dip"
+      android:layout_width="wrap_content"
       android:layout_height="wrap_content"
-      android:orientation="vertical">
+      android:layout_centerHorizontal="true"/>
 
-      <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <ImageView
-          android:id="@+id/icon"
-          android:paddingRight="10dip"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_centerHorizontal="true"/>
-
-        <TextView
-          android:id="@+id/dialog_title"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_centerVertical="true"
-          android:gravity="center_vertical"
-          android:visibility="gone"
-          android:textSize="16dip"
-          android:textStyle="bold"
-          android:textColor="@color/white"/>
-
-        <TextView
-          android:id="@+id/dialog_message"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:visibility="gone"
-          android:gravity="center_vertical"
-          android:textSize="20dip"
-          android:textColor="@color/white"/>
-
-      </LinearLayout>
-
-    </LinearLayout>
+    <TextView
+      android:id="@+id/dialog_title"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_centerVertical="true"
+      android:gravity="center_vertical"
+      android:visibility="gone"
+      android:textSize="16dip"
+      android:textStyle="bold"
+      android:textColor="@color/white"/>
 
   </LinearLayout>
 
@@ -89,37 +66,43 @@
 
   </LinearLayout>
 
-  <LinearLayout
-    android:id="@+id/panel_content"
+  <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:padding="0dip"
-    android:layout_weight="1" />
-
-  <RelativeLayout
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:paddingLeft="10dip"
-    android:paddingRight="10dip"
-    android:paddingTop="0dip">
+    android:paddingBottom="10dip"
+    android:layout_weight="1">
 
     <LinearLayout
       android:orientation="vertical"
       android:layout_width="fill_parent"
+      android:paddingTop="10dip"
+      android:paddingLeft="10dip"
+      android:paddingRight="10dip"
       android:layout_height="wrap_content">
 
       <TextView
-        android:id="@+id/selection"
+        android:id="@+id/origin"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:textSize="13dip"
-        android:gravity="right"
         android:visibility="gone"
+        android:textStyle="bold"
+        android:gravity="left"
+        android:textSize="16dip"
+        android:textColor="@color/white"/>
+
+      <TextView
+        android:id="@+id/dialog_message"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:paddingLeft="4dip"
+        android:paddingTop="10dip"
+        android:gravity="left"
+        android:textSize="16dip"
         android:textColor="@color/white"/>
 
     </LinearLayout>
 
-  </RelativeLayout>
+  </ScrollView>
 
   <LinearLayout
     android:layout_width="fill_parent"
@@ -138,8 +121,8 @@
 
     <Button
       android:id="@+id/button_allow"
-      android:layout_width="96px"
-      android:layout_height="48px"
+      android:layout_width="96dip"
+      android:layout_height="48dip"
       android:layout_gravity="left"
       android:layout_weight="1"
       android:maxLines="2"
@@ -147,8 +130,8 @@
 
     <Button
       android:id="@+id/button_alwaysdeny"
-      android:layout_width="96px"
-      android:layout_height="48px"
+      android:layout_width="96dip"
+      android:layout_height="48dip"
       android:layout_gravity="left"
       android:layout_weight="1"
       android:maxLines="2"
@@ -156,8 +139,8 @@
 
     <Button
       android:id="@+id/button_deny"
-      android:layout_width="96px"
-      android:layout_height="48px"
+      android:layout_width="96dip"
+      android:layout_height="48dip"
       android:layout_gravity="right"
       android:layout_weight="1"
       android:maxLines="2"
diff --git a/res/layout/tab.xml b/res/layout/tab.xml
new file mode 100755
index 0000000..e6ec970
--- /dev/null
+++ b/res/layout/tab.xml
@@ -0,0 +1,40 @@
+<?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.
+
+
+     This layout provides the structure for a browser tab. A tab contains the
+     WebView and any number of other UI elements specific to that tab.
+     Currently, the only such element is the Geolocation permissions prompt.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:fitsSystemWindows="true"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+
+    <!-- Wrapper layout for the WebView, which must be in a FrameLayout. -->
+    <FrameLayout android:id="@+id/webview_wrapper"
+        android:layout_width="fill_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1" />
+
+    <!-- Geolocation permissions prompt -->
+    <com.android.browser.GeolocationPermissionsPrompt
+        android:id="@+id/geolocation_permissions_prompt"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/res/layout/tab_view.xml b/res/layout/tab_view.xml
new file mode 100644
index 0000000..a5302f4
--- /dev/null
+++ b/res/layout/tab_view.xml
@@ -0,0 +1,73 @@
+<?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="fill_parent"
+    android:orientation="horizontal"
+    android:gravity="center_vertical"
+    >
+    <!-- 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
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        >
+        <TextView android:id="@+id/title"
+            android:layout_width="fill_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="fill_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:maxLines="1"
+            android:singleLine="true"
+            android:ellipsize="end"
+            />
+    </LinearLayout>
+    <View android:id="@+id/divider"
+        android:background="#ff313431"
+        android:layout_width="1dip"
+        android:layout_height="fill_parent"
+        android:layout_marginLeft="8dip"
+        android:layout_marginTop="5dip"
+        android:layout_marginBottom="5dip"
+        />
+    <view class="com.android.browser.ActiveTabsPage$CloseHolder" android:id="@+id/close"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:paddingLeft="18dip"
+        android:paddingRight="18dip"
+        android:background="@drawable/close_background"
+        android:src="@drawable/btn_close_window"
+        android:scaleType="center"
+        />
+</LinearLayout>
diff --git a/res/layout/tab_view_add_tab.xml b/res/layout/tab_view_add_tab.xml
new file mode 100644
index 0000000..0752a84
--- /dev/null
+++ b/res/layout/tab_view_add_tab.xml
@@ -0,0 +1,39 @@
+<?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="fill_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_list_new_window"/>
+    <TextView
+        android:layout_width="fill_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/tabs.xml b/res/layout/tabs.xml
index 7cf5b5d..759e0c7 100644
--- a/res/layout/tabs.xml
+++ b/res/layout/tabs.xml
@@ -13,7 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
 <TabHost xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@android:id/tabhost"
     android:layout_width="fill_parent"
@@ -26,10 +25,7 @@
 
         <TabWidget android:id="@android:id/tabs"
             android:layout_width="fill_parent"
-            android:layout_height="68dip"
-            android:paddingLeft="1dip"
-            android:paddingRight="1dip"
-            android:paddingTop="4dip"
+            android:layout_height="wrap_content"
         />
 
         <FrameLayout android:id="@android:id/tabcontent"
@@ -38,4 +34,4 @@
             android:layout_weight="1"
         />
     </LinearLayout>
-</TabHost>
\ No newline at end of file
+</TabHost>
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
new file mode 100644
index 0000000..1ea33fc
--- /dev/null
+++ b/res/layout/title_bar.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   Copyright 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_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingLeft="8dip"
+    android:paddingRight="12dip"
+    android:paddingTop="2dip"
+    android:paddingBottom="1dip"
+    android:background="@drawable/search_plate_browser" >
+
+    <ProgressBar android:id="@+id/progress_horizontal"
+        style="?android:attr/progressBarStyleHorizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="5dip"
+        android:max="100"
+        />
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        >
+
+        <LinearLayout android:id="@+id/title_bg"
+            android:background="@drawable/title_text"
+            android:layout_width="0dip"
+            android:layout_weight="1.0"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            >
+                <ImageView android:id="@+id/favicon"
+                    android:layout_width="20dip"
+                    android:layout_height="20dip"
+                    android:layout_marginLeft="3dip"
+                    />
+                <ImageView android:id="@+id/lock"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="6dip"
+                    android:visibility="gone"
+                    />
+                <TextView
+                    android:id="@+id/title"
+                    android:layout_height="wrap_content"
+                    android:layout_width="0dip"
+                    android:layout_weight="1.0"
+                    android:paddingLeft="8dip"
+                    android:paddingRight="6dip"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="@color/black"
+                    android:gravity="center_vertical"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                />
+        </LinearLayout>
+        <ImageView
+            android:id="@+id/rt_btn"
+            android:layout_width="wrap_content"
+            android:layout_height="fill_parent"
+            android:layout_marginLeft="6dip"
+            android:scaleType="center"
+            android:layout_marginBottom="4dip"
+            android:background="@drawable/btn_bookmark"
+            android:src="@drawable/ic_btn_bookmarks"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/title_bar_bg.xml b/res/layout/title_bar_bg.xml
new file mode 100644
index 0000000..3e19c5c
--- /dev/null
+++ b/res/layout/title_bar_bg.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   Copyright 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:layout_width="wrap_content"
+    android:orientation="vertical"
+    >
+        <view class="com.android.browser.BrowserActivity$Shadow"
+            android:id="@+id/shadow"
+            android:layout_height="5dip"
+            android:layout_width="fill_parent"
+            android:background="@*android:drawable/title_bar_shadow"
+            />
+</LinearLayout>
diff --git a/res/layout/video_loading_progress.xml b/res/layout/video_loading_progress.xml
new file mode 100644
index 0000000..dd818bd
--- /dev/null
+++ b/res/layout/video_loading_progress.xml
@@ -0,0 +1,36 @@
+<?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:id="@+id/progress_indicator"
+         android:orientation="vertical"
+         android:layout_centerInParent="true"
+         android:layout_width="wrap_content"
+         android:layout_height="wrap_content">
+
+       <ProgressBar android:id="@android:id/progress"
+           style="?android:attr/progressBarStyleLarge"
+           android:layout_gravity="center"
+           android:layout_width="wrap_content"
+           android:layout_height="wrap_content" />
+
+       <TextView android:paddingTop="5dip"
+           android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:layout_gravity="center"
+           android:text="@string/loading_video" android:textSize="14sp"
+           android:textColor="?android:attr/textColorPrimary" />
+ </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/website_settings_row.xml b/res/layout/website_settings_row.xml
new file mode 100644
index 0000000..4901ff1
--- /dev/null
+++ b/res/layout/website_settings_row.xml
@@ -0,0 +1,75 @@
+<?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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+  android:drawingCacheQuality="auto"
+  android:layout_width="fill_parent"
+  android:layout_height="?android:attr/listPreferredItemHeight"
+  android:gravity="center"
+  android:padding="0dip">
+
+  <ImageView android:id="@+id/icon"
+    android:layout_width="32dip"
+    android:layout_height="32dip"
+    android:layout_alignParentTop="true"
+    android:layout_alignParentLeft="true"
+    android:layout_alignParentBottom="true"
+    android:padding="2dip" />
+
+  <LinearLayout android:id="@+id/features"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_alignParentTop="true"
+    android:layout_alignParentBottom="true"
+    android:layout_alignParentRight="true"
+    android:gravity="center"
+    android:padding="0dip"
+    android:layout_marginRight="2dip">
+
+    <ImageView android:id="@+id/location_icon"
+      android:layout_width="32dip"
+      android:layout_height="32dip"
+      android:padding="2dip" />
+
+    <ImageView android:id="@+id/usage_icon"
+      android:layout_width="32dip"
+      android:layout_height="32dip"
+      android:padding="2dip" />
+
+  </LinearLayout>
+
+  <TextView android:id="@+id/title"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_alignParentTop="true"
+    android:layout_alignWithParentIfMissing="true"
+    android:layout_toRightOf="@id/icon"
+    android:layout_toLeftOf="@id/features"
+    android:layout_marginLeft="6dip"
+    android:layout_marginTop="6dip"
+    android:textAppearance="?android:attr/textAppearanceLarge"/>
+
+  <TextView android:id="@+id/subtitle"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_toRightOf="@id/icon"
+    android:layout_toLeftOf="@id/features"
+    android:layout_below="@id/title"
+    android:layout_alignLeft="@id/title"
+    android:layout_marginBottom="2dip"
+    android:textAppearance="?android:attr/textAppearanceSmall"/>
+
+</RelativeLayout>
diff --git a/res/menu/bookmarks.xml b/res/menu/bookmarks.xml
index 50dcfa9..a8781c2 100644
--- a/res/menu/bookmarks.xml
+++ b/res/menu/bookmarks.xml
@@ -16,6 +16,8 @@
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:id="@+id/new_context_menu_id"
-        android:icon="@android:drawable/ic_menu_add"
+        android:icon="@drawable/ic_menu_add_bookmark"
         android:title="@string/bookmark_page" />
+    <item android:id="@+id/switch_mode_menu_id"
+        />
 </menu>
diff --git a/res/menu/bookmarkscontext.xml b/res/menu/bookmarkscontext.xml
index b43e242..badbb00 100644
--- a/res/menu/bookmarkscontext.xml
+++ b/res/menu/bookmarkscontext.xml
@@ -28,11 +28,13 @@
       android:title="@string/edit_bookmark"/>
     <item android:id="@+id/shortcut_context_menu_id"
       android:title="@string/create_shortcut_bookmark"/>
-    <item android:id="@+id/send_context_menu_id"
-      android:title="@string/tab_picker_send_url"/>
+    <item android:id="@+id/share_link_context_menu_id"
+      android:title="@string/contextmenu_sharelink"/>
     <item android:id="@+id/copy_url_context_menu_id"
       android:title="@string/contextmenu_copylink"/>
     <item android:id="@+id/delete_context_menu_id"
       android:title="@string/remove_bookmark"/>
+    <item android:id="@+id/homepage_context_menu_id"
+      android:title="@string/set_as_homepage"/>
   </group>
 </menu>
diff --git a/res/menu/browser.xml b/res/menu/browser.xml
index 088fb6e..2752c3a 100644
--- a/res/menu/browser.xml
+++ b/res/menu/browser.xml
@@ -16,35 +16,41 @@
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <group android:id="@+id/MAIN_MENU">
-        <item android:id="@+id/goto_menu_id"
-            android:title="@string/goto_dot" 
-            android:alphabeticShortcut="l" 
-            android:icon="@android:drawable/ic_menu_search"/>
+        <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_menu_bookmark" />
-        <item android:id="@+id/windows_menu_id"
-            android:title="@string/view_tabs" 
-            android:alphabeticShortcut="t" 
-            android:titleCondensed="@string/view_tabs_condensed"
-            android:icon="@drawable/ic_menu_windows" />
+            android:title="@string/bookmarks"
+            android:alphabeticShortcut="b"
+            android:icon="@drawable/ic_menu_bookmarks"
+            />
+        <item android:id="@+id/active_tabs_menu_id"
+            android:title="@string/active_tabs"
+            android:icon="@drawable/ic_menu_windows"
+            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:title="@string/forward"
             android:alphabeticShortcut="k"
             android:icon="@*android:drawable/ic_menu_forward" />
+        <item android:id="@+id/add_bookmark_menu_id"
+            android:title="@string/save_to_bookmarks"
+            android:icon="@drawable/ic_menu_add_bookmark"
+            android:alphabeticShortcut="a" />
         <item android:id="@+id/find_menu_id"
-            android:title="@string/find_dot" 
+            android:title="@string/find_dot"
             android:alphabeticShortcut="f" />
         <item android:id="@+id/select_text_id"
-            android:title="@string/select_dot" />
+            android:title="@string/select_dot"
+            android:alphabeticShortcut="e" />
         <item android:id="@+id/page_info_menu_id"
             android:title="@string/page_info"
             android:alphabeticShortcut="g" />
         <item android:id="@+id/share_page_menu_id"
-            android:title="@string/share_page"/>
+            android:title="@string/share_page"
+            android:alphabeticShortcut="s" />
         <item android:id="@+id/view_downloads_menu_id"
             android:title="@string/menu_view_download"
             android:alphabeticShortcut="d" />
@@ -57,10 +63,6 @@
             android:visible="false" />
     </group>
     <group android:id="@+id/MAIN_SHORTCUT_MENU" android:visible="false">
-        <item android:id="@+id/back_menu_id"
-            android:alphabeticShortcut="j" />
-        <item android:id="@+id/close_menu_id"
-            android:alphabeticShortcut="w" />
         <item android:id="@+id/homepage_menu_id"
             android:alphabeticShortcut="&#32;" />
         <item android:id="@+id/classic_history_menu_id"
@@ -85,29 +87,27 @@
             android:alphabeticShortcut="7" />
         <item android:id="@+id/window_eight_menu_id"
             android:alphabeticShortcut="8" />
-    </group>
-    <group android:id="@+id/TAB_MENU">
-        <item android:id="@+id/new_tab_menu_id"
-            android:title="@string/tab_picker_new_tab"
-            android:alphabeticShortcut="t" 
-            android:icon="@android:drawable/ic_menu_add" />
-        <item android:id="@+id/bookmarks_tab_menu_id"
-            android:title="@string/bookmarks" 
-            android:alphabeticShortcut="b" 
-            android:icon="@drawable/ic_menu_bookmark" />
-        <item android:id="@+id/history_tab_menu_id"
-            android:title="@string/history"
-            android:alphabeticShortcut="h" 
-            android:icon="@android:drawable/ic_menu_recent_history" />
+        <item android:id="@+id/back_menu_id"
+            android:title="@string/back"
+            android:drawable="@*android:drawable/ic_menu_back"
+            android:alphabeticShortcut="j" />
+        <item android:id="@+id/goto_menu_id"
+            android:title="@string/goto_dot"
+            android:alphabeticShortcut="l"
+            android:icon="@android:drawable/ic_menu_search"/>
+        <item android:id="@+id/close_menu_id"
+            android:icon="@drawable/ic_btn_close_panel"
+            android:title="@string/tab_picker_remove_tab"
+            android:alphabeticShortcut="w" />
     </group>
     <!-- these items are toggled in and out of @+id/stop_reload_menu_id -->
     <item android:id="@+id/stop_menu_id"
-        android:title="@string/stop" 
+        android:title="@string/stop"
         android:icon="@*android:drawable/ic_menu_stop"
         android:visible="false" />
     <item android:id="@+id/reload_menu_id"
-        android:title="@string/reload" 
-        android:icon="@*android:drawable/ic_menu_refresh" 
+        android:title="@string/reload"
+        android:icon="@*android:drawable/ic_menu_refresh"
         android:visible="false" />
 </menu>
  
diff --git a/res/menu/historycontext.xml b/res/menu/historycontext.xml
index dfda010..bd4ede4 100644
--- a/res/menu/historycontext.xml
+++ b/res/menu/historycontext.xml
@@ -23,8 +23,10 @@
         android:title="@string/save_to_bookmarks"/>   
     <item android:id="@+id/share_link_context_menu_id"
         android:title="@string/contextmenu_sharelink"/>
-    <item android:id="@+id/copy_context_menu_id"
+    <item android:id="@+id/copy_url_context_menu_id"
         android:title="@string/contextmenu_copylink"/> 
     <item android:id="@+id/delete_context_menu_id"
-        android:title="@string/remove_history_item"/> 
+        android:title="@string/remove_history_item"/>
+    <item android:id="@+id/homepage_context_menu_id"
+        android:title="@string/set_as_homepage"/>
 </menu>
diff --git a/res/menu/title_context.xml b/res/menu/title_context.xml
new file mode 100644
index 0000000..a60f102
--- /dev/null
+++ b/res/menu/title_context.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- These are for the context menu for the title bar.  Note that we need a
+            different item from share_page_menu_id, which looks at the top
+            window (possibly a subwindow), because this should be the main
+            window.-->
+    <item android:id="@+id/title_bar_share_page_url"
+        android:title="@string/share_page"/>
+    <item android:id="@+id/title_bar_copy_page_url"
+        android:title="@string/copy_page_url"/>
+</menu>
diff --git a/res/menu/websitesettings.xml b/res/menu/websitesettings.xml
new file mode 100644
index 0000000..5acc8a5
--- /dev/null
+++ b/res/menu/websitesettings.xml
@@ -0,0 +1,21 @@
+<!-- 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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/website_settings_menu_clear_all"
+          android:title="@string/website_settings_clear_all"
+          android:icon="@android:drawable/ic_menu_close_clear_cancel" />
+</menu>
+
diff --git a/res/values-cs/arrays.xml b/res/values-cs/arrays.xml
new file mode 100644
index 0000000..84ef7b7
--- /dev/null
+++ b/res/values-cs/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Není povolena žádná kvóta"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 7915e49..758c3d8 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Prohlížeč"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nová karta"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Záložky"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Často navštěvované"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historie"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"Počet shod: <xliff:g id="NUMBER">%d</xliff:g>"</item>
     <item quantity="other" msgid="6616125067364315405">"Počet shod: <xliff:g id="NUMBER">%d</xliff:g>"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Načítání..."</string>
     <string name="page_info" msgid="4048529256302257195">"Informace o stránce"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Zobrazit informace o stránce"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adresa:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Zastavuji..."</string>
     <string name="stop" msgid="5687251076030630074">"Zastavit"</string>
     <string name="reload" msgid="8585220783228408062">"Obnovit"</string>
+    <string name="back" msgid="8414603107175713668">"Zpět"</string>
     <string name="forward" msgid="4288210890526641577">"Předat dál"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Zrušit"</string>
     <string name="location" msgid="969988560160364559">"Umístění"</string>
     <string name="name" msgid="5990326151488445481">"Název"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Přidat do záložek"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Přidat záložku"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Upravit záložku"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Přidat odkaz na plochu"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Otevřít"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Smazat záložku"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Odebrat ze záložek"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Odstranit z historie"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Nastavit jako domovskou stránku"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Uloženo do záložek."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Domovská stránka byla nastavena"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Záložka musí mít název."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Záložka musí mít umístění."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Nelze vytvořit prázdnou záložku."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Adresa URL není platná."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Smazat"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Přidat poslední zobrazenou stránku do záložek"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Zobrazit jako miniatury"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Zobrazit jako seznam"</string>
     <string name="current_page" msgid="7510129573681663135">"od "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Záložka <xliff:g id="BOOKMARK">%s</xliff:g> bude smazána."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Otevřít v novém okně"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Nastavit domovskou stránku"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Automaticky přizpůsobit stránky"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Přizpůsobit velikost webových stránek obrazovce"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Zobrazit pouze na šířku"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Stránky vždy prohlížet v zobrazení na šířku"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Nastavení ochrany osobních údajů"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Vymazat mezipaměť"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Smazat veškerý obsah stránek z mezipaměti"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Mezipaměť bude vymazána."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Vymazat všechen obsah a databáze uložené do místní mezipaměti"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Obsah a databáze uložené do místní mezipaměti budou vymazány."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Vymazat všechny soubory cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Vymazat všechny cookies"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Všechny soubory cookie budou smazány."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Vymazat hesla"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Vymazat všechna uložená hesla"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Všechna uložená hesla budou vymazána."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Povolit polohu"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Povolit webovým stránkám požádat o přístup k informacím o vaší poloze"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Zrušit přístup k informacím o poloze"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Zrušit přístup k informacím o poloze pro všechny webové stránky"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Zrušit přístup k informacím o poloze pro všechny webové stránky"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Nastavení zabezpečení"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Zapamatovat hesla"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Ukládat uživatelská jména a hesla na webových stránkách"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Blízko"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Výchozí přiblížení"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Když se stránka načte:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Zobrazit přehled stránky"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Upřesnit nastavení"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Povolit službu Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplikace, které rozšiřují funkce prohlížeče"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Nastavení služby Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Seznam pluginů"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Nejsou nainstalované žádné pluginy."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplikace, které rozšiřují funkce prohlížeče"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Nastavení webových stránek"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Zobrazit pokročilá nastavení pro jednotlivé webové stránky"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Obnovit výchozí"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Vymazat všechna data prohlížeče a obnovit všechna nastavení na výchozí hodnoty"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Všechna data prohlížeče budou vymazána a bude použito výchozí nastavení."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Potvrdit"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Stránka, kterou se pokoušíte zobrazit, obsahuje data, která již byla odeslána (POSTDATA). Pokud data odešlete znovu, jakákoli akce vykonaná pomocí formuláře na stránce bude provedena znovu (např. hledání či nákup online)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Žádné připojení k síti"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Po obnovení připojení bude pokračovat načítání stránky."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Vymazat historii"</string>
     <string name="browser_history" msgid="2979476257919939232">"Nedávno navštívené stránky"</string>
     <string name="empty_history" msgid="8738772352308207274">"Historie prohlížeče je prázdná."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Přidat záložku..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Přidat"</string>
     <string name="no_database" msgid="2256698896757181084">"Databáze neexistuje."</string>
-    <string name="search_hint" msgid="3385577802557697397">"Zadejte webovou adresu"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Vyhledejte nebo zadejte adresu URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Přejít"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Záložky a webová historie"</string>
     <string name="attention" msgid="3473639060042811244">"Upozornění"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Nelze stáhnout. Velikost položky nelze určit."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Stahování bylo přerušeno a nelze v něm pokračovat."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Testovací verze prohlížeče"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Vyhledat na webu"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Povolit úložiště"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Tyto webové stránky chtějí uložit informace do vašeho telefonu."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Přistupovat k poloze"</string>
-    <string name="location_message" msgid="1729456751935683242">"Tyto stránky by chtěly přistupovat k vaší poloze."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Vytvořit zástupce"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Tento web chce vytvořit zástupce této stránky na domovské obrazovce."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Níže uvedená tabulka zobrazuje oprávnění, která jste udělili jednotlivým webům, které se pokusily použít službu Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Výběr souboru"</string>
-    <string name="image_message" msgid="5450245866521896891">"Zvolený obrázek"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Nastavení služby Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Chcete-li zjistit, jak bude vaše poloha využita, přečtěte si zásady ochrany osobních údajů těchto stránek."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Povolit místní úložiště"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Tyto stránky mohou ukládat informace do vašeho telefonu"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Tento web nemůže ukládat informace do vašeho telefonu"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Povolit zjištění polohy"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Tyto stránky mohou zjistit vaši aktuální polohu"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Tyto stránky nemohou zjistit vaši aktuální polohu"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Odstranit tento web ze služby Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Nejsou nastavena žádná oprávnění"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Odebrat tyto stránky"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Všechna oprávnění a všechna data uložená do telefonu těmito stránkami budou vymazána."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Tyto stránky budou ukládat informace do tohoto telefonu."\n" Toto nastavení můžete změnit zde:"\n" Nastavení -&gt; Nastavení služby Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Tyto stránky nebudou nikdy ukládat informace do tohoto telefonu."\n" Toto nastavení můžete změnit zde:"\n" Nastavení -&gt; Nastavení služby Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Tyto stránky mohou přistupovat k vaší aktuální poloze."\n" Toto nastavení můžete změnit zde:"\n" Nastavení -&gt; Nastavení služby Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Tyto stránky nebudou přistupovat k vaší aktuální poloze."\n" Toto nastavení můžete změnit zde:"\n" Nastavení -&gt; Nastavení služby Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Zástupce vytvořen"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nepovolit nikdy"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Zrušit"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nepovolit nikdy"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Zrušit"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Použít"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Zrušit"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Zrušit"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"cesta:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Nebyly vybrány žádné soubory"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Byl vybrán jeden soubor"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"souborů bylo vybráno"</string>
-    <string name="remove" msgid="7820112494467011374">"Odstranit"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Místní úložiště"</string>
-    <string name="allowed" msgid="1599514934221911624">"Povoleno"</string>
-    <string name="denied" msgid="7470209521858372968">"Odepřeno"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Nerozpoznaný typ dialogu"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Paměť prohlížeče je plná"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Kliknutím uvolníte místo."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Vymazat uložená data"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Odebrat všechny databáze přidružené k těmto webovým stránkám"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Vymazat uložená data"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Všechna data uložená těmito webovými stránkami budou smazána"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Vymazat vše"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Zrušit"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB uloženo ve vašem telefonu"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"Stránky <xliff:g id="WEBPAGE">%s</xliff:g> požadují informace o vaší poloze"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Sdílet"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Nesdílet"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Zapamatovat"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Zrušit přístup k informacím o poloze"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Tyto stránky mohou aktuálně získat přístup k informacím o vaší poloze"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Tyto stránky nemohou aktuálně získat přístup k informacím o vaší poloze"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Zrušit přístup k informacím o poloze"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Přístup těchto webových stránek k informacím o poloze bude zrušen"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Zrušit přístup"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Zrušit"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Přehled"</string>
 </resources>
diff --git a/res/values-da/arrays.xml b/res/values-da/arrays.xml
new file mode 100644
index 0000000..2048215
--- /dev/null
+++ b/res/values-da/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Der er ingen tilladt kvote"</item>
+    <item msgid="7374272188672967690">"5 Mb"</item>
+    <item msgid="8699352701856136738">"10 Mb"</item>
+    <item msgid="2018822431469084862">"30 Mb"</item>
+    <item msgid="5383642976774534074">"100 Mb"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 032032a..e5c4ede 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Browser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Ny fane"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Bogmærker"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Mest besøgte"</string>
     <string name="tab_history" msgid="1979267558744613746">"Oversigt"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> matches"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> matches"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Indlæser ..."</string>
     <string name="page_info" msgid="4048529256302257195">"Sideoplysninger"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Vis sideoplysninger"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adresse:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Standser ..."</string>
     <string name="stop" msgid="5687251076030630074">"Stop"</string>
     <string name="reload" msgid="8585220783228408062">"Opdater"</string>
+    <string name="back" msgid="8414603107175713668">"Tilbage"</string>
     <string name="forward" msgid="4288210890526641577">"Fremad"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Annuller"</string>
     <string name="location" msgid="969988560160364559">"Placering"</string>
     <string name="name" msgid="5990326151488445481">"Navn"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Tilføj et bogmærke"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Tilføj bogmærke"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Rediger bogmærke"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Føj genvej til Start"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Åbn"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Slet bogmærke"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Fjern fra bogmærker"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Fjern fra oversigt"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Indstil som startside"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Gemt i bogmærker."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Startsiden er indstillet"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Bogmærke skal have et navn."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Bogmærke skal have en placering."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Der kan ikke oprettes et tomt bogmærke."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Webadresse er ikke gyldig."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Slet"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Tilføj bogmærke ved sidst viste side"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniaturevisning"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Listevisning"</string>
     <string name="current_page" msgid="7510129573681663135">"fra "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Bogmærket \"<xliff:g id="BOOKMARK">%s</xliff:g>\" slettes."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Åbn i et nyt vindue"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Indstil startside"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Aut. tilpassede sider"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Formater websider til at passe til skærmen"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Kun landskabsvisning"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Læs altid sider i den bredere landskabsretning på skærmen"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Fortrolighedsindstillinger"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Ryd cache"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Slet alt cachelagret sideindhold"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Cachen ryddes."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Ryd lokalt cachelagret indhold og databaser"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Lokalt cachelagret indhold og databaser ryddes."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Ryd alle cookiedata"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Ryd alle browsercookierne"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Alle cookies ryddes."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Ryd adgangskoder"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Ryd alle gemte adgangskoder"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Alle gemte adgangskoder ryddes."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Aktiver placering"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Tillad websteder at anmode om adgang til din placering"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Ryd placeringsadgang"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Ryd placeringsadgang for alle websteder"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Ryd placeringsadgang for alle websteder"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Sikkerhedsindstillinger"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Husk adgangskoder"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Gem brugernavne og adgangskoder til websteder"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Luk"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Standardzoom"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Når en side indlæses:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Vis oversigt over siden"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Avancerede indstillinger"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Aktiver Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Programmer, der udvider browserfunktionalitet"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Indstillinger for Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Liste over plugins"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Der er ingen installerede plugins."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Programmer, der udvider browserfunktionalitet"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Webstedsindstillinger"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Vis avancerede indstillinger for individuelle websteder"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Nulstil til standard"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Ryd alle browserdata, og nulstil alle indstillinger til standard"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Alle browserdata slettes, og indstillingerne vender tilbage til standardværdier."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Bekræft"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Den side, du prøver at få vist, indeholder data, der allerede er indsendt (\"POSTDATA\"). Hvis du sender dataene igen, gentages alle handlinger, som formularen på siden udførte (som f.eks. en søgning eller et online køb)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Der er ingen netværksforbindelse"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Indlæsningen af siden fortsættes, når forbindelsen er genoprettet."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Ryd oversigt"</string>
     <string name="browser_history" msgid="2979476257919939232">"Nyligt besøgte sider"</string>
     <string name="empty_history" msgid="8738772352308207274">"Browseroversigt er tom."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Tilføj bogmærke ..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Tilføj"</string>
     <string name="no_database" msgid="2256698896757181084">"Der er ingen database!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Indtast webadresse"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Søg efter eller indtast en webadresse"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Gå"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Bogmærker og weboversigt"</string>
     <string name="attention" msgid="3473639060042811244">"Bemærk"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Der kan ikke downloades. Størrelsen på elementet kan ikke afgøres."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Download blev afbrudt. Den kan ikke genoptages."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browsertestkørsel"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Søg på nettet"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Tillad lagring"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Dette websted ønsker at gemme oplysninger på din telefon."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Få adgang til din placering"</string>
-    <string name="location_message" msgid="1729456751935683242">"Dette websted ønsker at få adgang til din placering."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Opret en genvej"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Dette websted vil gerne oprette en genvej til denne side på din startskærm."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Nedenstående tabel viser de tilladelser, du har givet til hvert websted, som har forsøgt at bruge Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Filsamler"</string>
-    <string name="image_message" msgid="5450245866521896891">"Valgt billede"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Indstillinger for Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Læs webstedets fortrolighedspolitik for at se, hvordan din placering bruges."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Tillad lokal lagring"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Dette websted kan gemme oplysninger på din telefon"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Dette websted kan ikke gemme oplysninger på din telefon"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Tillad lokaliseringsregistrering"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Dette websted kan læse din aktuelle placering"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Dette websted kan ikke læse din aktuelle placering"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Fjern dette websted fra Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Der er ikke indstillet nogen tillad."</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Fjern dette websted"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Alle tilladelser ryddes, og alle data, som er gemt på din telefon af webstedet, slettes."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Dette websted gemmer oplysninger på din telefon."\n" Skift denne indstilling i:"\n" Indstillinger-&gt; Indstillinger for Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Dette websted gemmer aldrig oplysninger på din telefon."\n" Skift denne indstilling i:"\n" Indstillinger-&gt; Indstillinger for Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Dette websted har adgang til din aktuelle placering."\n" Skift denne indstilling i:"\n" Indstillinger -&gt; Indstillinger for Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Dette websted har ikke adgang til din aktuelle placering."\n" Skift denne indstilling i:"\n" Indstillinger -&gt; Indstillinger for Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Genvej oprettet"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Tillad aldrig"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Annuller"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Tillad aldrig"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Annuller"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Anvend"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Annuller"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Annuller"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"sti:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Der blev ikke valgt nogen filer"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Der er valgt én fil"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"valgte filer"</string>
-    <string name="remove" msgid="7820112494467011374">"Fjern"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Lokal lagring"</string>
-    <string name="allowed" msgid="1599514934221911624">"Tilladt"</string>
-    <string name="denied" msgid="7470209521858372968">"Afvist"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Ikke anerkendt dialogtype"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Browserlageret er fuldt"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Klik her for at frigøre plads."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Ryd lagrede data"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Fjern alle databaser, der er tilknyttet dette websted"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Ryd lagrede data"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Alle data, der er lagret af dette websted, slettes"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Ryd alle"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Annuller"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Mb lagret på din telefon"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> ønsker at kende din placering"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Del"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Del ikke"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Husk"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Ryd placeringsadgang"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Dette websted kan i øjeblikket få adgang til din placering"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Dette websted har i øjeblikket adgang til din placering"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Ryd placeringsadgang"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Placeringsadgang ryddes for dette websted"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Ryd adgang"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Annuller"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Oversigt"</string>
 </resources>
diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml
new file mode 100644
index 0000000..bfee20d
--- /dev/null
+++ b/res/values-de/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Kein Kontingent erlaubt"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 39540a7..071592a 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Browser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Neue Registerkarte"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Lesezeichen"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Meistbesucht"</string>
     <string name="tab_history" msgid="1979267558744613746">"Verlauf"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> Übereinstimmungen"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> Übereinstimmungen"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Ladevorgang läuft..."</string>
     <string name="page_info" msgid="4048529256302257195">"Seiten-Info"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Seiten-Info anzeigen"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adresse:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Wird angehalten..."</string>
     <string name="stop" msgid="5687251076030630074">"Anhalten"</string>
     <string name="reload" msgid="8585220783228408062">"Aktualisieren"</string>
+    <string name="back" msgid="8414603107175713668">"Zurück"</string>
     <string name="forward" msgid="4288210890526641577">"Weiter"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Abbrechen"</string>
     <string name="location" msgid="969988560160364559">"Ort"</string>
     <string name="name" msgid="5990326151488445481">"Name"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Lesezeichen"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Lesezeichen hinzufügen"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Lesezeichen bearbeiten"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Shortcut zur Startseite hinzufügen"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Öffnen"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Lesezeichen löschen"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Aus Lesezeichen entfernen"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Aus Verlauf entfernen"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Als Startseite festlegen"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Gespeichert in Lesezeichen."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Startseite festgelegt"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Das Lesezeichen muss über einen Namen verfügen."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Das Lesezeichen muss über einen Speicherort verfügen."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Sie können kein leeres Lesezeichen erstellen."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL ist nicht gültig."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Löschen"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Lesezeichen für zuletzt besuchte Seite"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniaturansicht"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Listenansicht"</string>
     <string name="current_page" msgid="7510129573681663135">"von "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Lesezeichen \"<xliff:g id="BOOKMARK">%s</xliff:g>\" wird gelöscht."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"In neuem Fenster öffnen"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Startseite festlegen"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Seiten autom. anpassen"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Webseiten an den Bildschirm anpassen"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Nur Anzeige im Querformat"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Seiten immer im breiteren Querformat auf dem Bildschirm lesen"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Datenschutzeinstellungen"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Cache löschen"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Alle Seiteninhalte im Cache löschen"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Der Cache wird gelöscht."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Content und Datenbanken aus dem lokalen Cache löschen"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Content und Datenbanken werden aus dem lokalen Cache gelöscht."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Alle Cookiedaten löschen"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Alle Browser-Cookies löschen"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Alle Cookies werden gelöscht."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Passwörter löschen"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Alle gespeicherten Passwörter löschen"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Alle gespeicherten Passwörter werden gelöscht."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Standort aktivieren"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Zugriff auf Ihren Standort für Websites ermöglichen"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Standortzugriff löschen"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Standortzugriff für alle Websites löschen"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Standortzugriff für alle Websites löschen"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Sicherheitseinstellungen"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Passwörter merken"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Nutzernamen und Passwörter für Websites speichern"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Schließen"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Standard-Zoom"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Beim Laden einer Seite:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Überblick über diese Seite anzeigen"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Erweiterte Einstellungen"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Gears aktivieren"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Anwendungen, die die Browserfunktionen erweitern"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears-Einstellungen"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Liste der Plug-Ins"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Keine Plug-Ins installiert."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Vom Browser nicht unterstützte Anwendungen"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Websiteeinstellungen"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Erweiterte Einstellungen für einzelne Websites anzeigen"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Auf Standard zurücksetzen"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Alle Browserdaten löschen und Einstellungen auf Standard zurücksetzen"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Alle Browserdaten werden gelöscht. Alle Einstellungen werden auf die Standardeinstellung zurückgesetzt."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Bestätigen"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Die Seite, die Sie anzuzeigen versuchen, enthält Daten, die bereits gesendet wurde (\"POST-DATEN\"). Wenn Sie die Daten erneut senden, wird jede Aktion, die das Formular auf der Seite ausgeführt hat, wiederholt (wie beispielsweise eine Suche oder ein Online-Kauf)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Keine Netzwerkverbindung"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Die Seite wird weiter geladen, nachdem die Verbindung wiederhergestellt wurde."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Verlauf löschen"</string>
     <string name="browser_history" msgid="2979476257919939232">"Zuletzt besuchte Seiten"</string>
     <string name="empty_history" msgid="8738772352308207274">"Browserverlauf ist leer."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Lesezeichen hinzufügen..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Hinzufügen"</string>
     <string name="no_database" msgid="2256698896757181084">"Keine Datenbank!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Webadresse eingeben"</string>
+    <string name="search_hint" msgid="4647356319916631820">"URL suchen oder eingeben"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Los"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Lesezeichen und Webprotokoll"</string>
     <string name="attention" msgid="3473639060042811244">"Achtung"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Download kann nicht gestartet werden, da die Größe des Elements nicht bestimmt werden kann."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Download wurde unterbrochen und kann nicht fortgesetzt werden."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Web durchsuchen"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Speicher zulassen"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Diese Website möchte Informationen auf Ihrem Telefon speichern."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Zugriff auf Ihren Standort"</string>
-    <string name="location_message" msgid="1729456751935683242">"Diese Website möchte auf Ihren Standort zugreifen."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Verknüpfung erstellen"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Diese Website möchte eine Verknüpfung zu diese Seite auf Ihrem Startbildschirm erstellen."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Die folgende Tabelle zeigt die Berechtigungen, die Sie jeder Website erteilt haben, die versucht hat, Gears zu verwenden."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"File Picker"</string>
-    <string name="image_message" msgid="5450245866521896891">"Gewähltes Bild"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears-Einstellungen"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Lesen Sie die Datenschutzbestimmungen dieser Website, um herauszufinden, wie Ihr Ort verwendet wird."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Lokalen Speicher zulassen"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Diese Website kann Informationen auf Ihrem Telefon speichern."</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Diese Website kann keine Informationen auf Ihrem Telefon speichern."</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Standorterkennung zulassen"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Diese Website kann Ihren aktuellen Standort erkennen."</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Diese Website kann Ihren aktuellen Standort nicht erkennen."</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Diese Website aus Gears entfernen"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Keine Berechtigungen festgelegt"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Diese Website entfernen"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Alle Berechtigungen sowie alle von der Website auf Ihrem Telefon gespeicherten Daten werden gelöscht."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Diese Website speichert Informationen auf diesem Telefon."\n" Ändern Sie diese Einstellung unter"\n" Einstellungen -&gt; Gears-Einstellungen."</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Diese Website speichert nie Informationen auf diesem Telefon."\n" Ändern Sie diese Einstellung unter"\n" Einstellungen -&gt; Gears-Einstellungen."</string>
-    <string name="location_notification" msgid="3495804750470905804">"Diese Website hat Zugriff auf Ihren aktuellen Standort."\n" Ändern Sie diese Einstellung unter"\n" Einstellungen -&gt; Gears-Einstellungen."</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Diese Website hat keinen Zugriff auf Ihren aktuellen Standort."\n" Ändern Sie diese Einstellung unter"\n" Einstellungen -&gt; Gears-Einstellungen."</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Verknüpfung erstellt"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nie zulassen"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Abbrechen"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nie zulassen"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Abbrechen"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Anwenden"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Abbrechen"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Abbrechen"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"Pfad:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Keine Dateien ausgewählt"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Eine Datei ausgewählt"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"Dateien ausgewählt"</string>
-    <string name="remove" msgid="7820112494467011374">"Entfernen"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Lokaler Speicher"</string>
-    <string name="allowed" msgid="1599514934221911624">"Zugelassen"</string>
-    <string name="denied" msgid="7470209521858372968">"Abgelehnt"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Unbekannter Dialogtyp"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Browserspeicher voll"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Klicken Sie, um Speicherplatz freizugeben."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Gespeicherte Daten löschen"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Alle mit dieser Website verknüpften Datenbanken entfernen"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Gespeicherte Daten löschen"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Alle von dieser Website gespeicherten Daten werden gelöscht."</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Alles löschen"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Abbrechen"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Auf Ihrem Telefon gespeicherte MB"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> möchte Ihren Standort in Erfahrung bringen."</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Freigeben"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Nicht freigeben"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Speichern"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Standortzugriff löschen"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Diese Website hat derzeit Zugriff auf Ihren Standort."</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Diese Website hat derzeit keinen Zugriff auf Ihren Standort."</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Standortzugriff löschen"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Der Standortzugriff für diese Website wird gelöscht."</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Zugriff löschen"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Abbrechen"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Übersicht"</string>
 </resources>
diff --git a/res/values-el/arrays.xml b/res/values-el/arrays.xml
new file mode 100644
index 0000000..c1c25c5
--- /dev/null
+++ b/res/values-el/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Δεν επιτρέπονται όρια"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index b829e75..5b1c029 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Πρόγραμμα περιήγησης"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Νέα καρτέλα"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Σελιδοδείκτες"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Οι πιο δημοφιλείς"</string>
     <string name="tab_history" msgid="1979267558744613746">"Ιστορικό"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> αποτελέσματα"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> αποτελέσματα"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Φόρτωση..."</string>
     <string name="page_info" msgid="4048529256302257195">"Πληροφορίες σελίδας"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Προβολή πληροφοριών σελίδας"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Διεύθυνση:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Διακοπή..."</string>
     <string name="stop" msgid="5687251076030630074">"Διακοπή"</string>
     <string name="reload" msgid="8585220783228408062">"Ανανέωση"</string>
+    <string name="back" msgid="8414603107175713668">"Πίσω"</string>
     <string name="forward" msgid="4288210890526641577">"Εμπρός"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Ακύρωση"</string>
     <string name="location" msgid="969988560160364559">"Τοποθεσία"</string>
     <string name="name" msgid="5990326151488445481">"Όνομα"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Σελιδοδείκτης"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Προσθήκη σελιδοδείκτη"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Επεξεργασία σελιδοδείκτη"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Προσθήκη συντόμευσης στην αρχική οθόνη"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Άνοιγμα"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Διαγραφή σελιδοδείκτη"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Κατάργηση από τους σελιδοδείκτες"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Κατάργηση από το ιστορικό"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Ορισμός ως αρχική σελίδα"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Αποθηκεύτηκε στους σελιδοδείκτες."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Ορισμός αρχικής σελίδας"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Ο σελιδοδείκτης πρέπει να έχει ένα όνομα."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Ο σελιδοδείκτης πρέπει να έχει μια τοποθεσία."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Δεν είναι δυνατή η δημιουργία κενού σελιδοδείκτη."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Μη έγκυρη διεύθυνση URL."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Διαγραφή"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Προσθήκη της τελευταίας σελίδας που προβλήθηκε στους σελιδοδείκτες"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Προβολή μικρογραφίας"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Προβολή λίστας"</string>
     <string name="current_page" msgid="7510129573681663135">"από "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Ο σελιδοδείκτης \"<xliff:g id="BOOKMARK">%s</xliff:g>\" θα διαγραφεί."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Άνοιγμα σε νέο παράθυρο"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Ορισμός ως αρχική σελίδα"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Αυτόματη προσαρμογή σελίδων"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Μορφ/ση ιστοσ.για προσαρμ.τους στο μέγ.οθόν."</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Μόνο οριζόντια προβολή"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Ανάγνωση σελίδων πάντα σε ευρύ, οριζόντιο προσανατολισμό οθόνης"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Ρυθμίσεις απορρήτου"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Εκκαθάριση προσωρινής μνήμης"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Διαγραφή όλου του περιεχομένου των προσωρινά αποθηκευμένων σελίδων"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Θα γίνει εκκαθάριση της προσωρινής μνήμης."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Εκκαθάριση τοπικά αποθηκευμένου στη μνήμη cache περιεχομένου και βάσεων δεδομένων"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Τοπικά αποθηκευμένο στη μνήμη cache περιεχόμενο και βάσεις δεδομένων θα απαλειφθούν."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Εκκαθάριση όλων των δεδομένων cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Εκκαθάριση όλων των cookie του προγράμματος περιήγησης"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Θα γίνει εκκαθάριση όλων των cookie."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Εκκαθάριση κωδικών πρόσβασης"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Εκκαθάριση όλων των αποθηκευμένων κωδικών πρόσβασης"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Θα γίνει εκκαθάριση όλων των αποθηκευμένων κωδικών πρόσβασης."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Ενεργοποίηση τοποθεσίας"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Να επιτρέπεται σε ιστότοπους το αίτημα πρόσβασης στην τοποθεσία σας"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Εκκαθάριση πρόσβασης τοποθεσίας"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Εκκαθάριση πρόσβασης τοποθεσίας για όλους τους ιστότοπους"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Εκκαθάριση πρόσβασης τοποθεσίας για όλους τους ιστότοπους"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Ρυθμίσεις ασφαλείας"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Απομνημόνευση κωδικών πρόσβασης"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Αποθ.ονομάτων χρήστη και κωδ.πρόσβ.για τους ιστότ."</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Κλείσιμο"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Προεπιλεγμένο ζουμ"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Κατά τη φόρτωση μιας σελίδας:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Προβολή επισκόπησης της σελίδας"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Σύνθετες ρυθμίσεις"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Ενεργοποίηση Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Εφαρμογές που επεκτείνουν τις δυνατότητες του προγράμματος περιήγησης"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Ρυθμίσεις Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Λίστα προσθηκών"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Δεν υπάρχουν εγκατεστημένες προσθήκες."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Εφαρμογές που επεκτ.τις δυνατ.του προγρ.περιήγ."</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Ρυθμίσεις ιστότοπου"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Προβολή σύνθετων ρυθμίσεων για μεμονωμένους ιστότοπους"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Επαναφορά προεπιλογών"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Εκκαθ.όλων των δεδ.του προγρ.περιήγ.και επαναφ.όλων των ρυθμ.στις προεπ.ρυθμ."</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Θα γίνει εκκαθάριση όλων των δεδομένων του προγράμματος περιήγησης και επαναφορά των ρυθμίσεων στις προεπιλεγμένες τιμές."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Επιβεβαίωση"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Η σελίδα που προσπαθείτε να προβάλλετε, περιέχει δεδομένα που έχουν ήδη υποβληθεί (\"POSTDATA\"). Εάν αποστείλετε ξανά τα δεδομένα, όλες οι ενέργειες που εκτελέστηκαν από τη φόρμα στη σελίδα (όπως μια αναζήτηση ή μια αγορά στο διαδίκτυο) θα επαναληφθούν."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Δεν υπάρχει σύνδεση δικτύου"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Η φόρτωση της σελίδας θα συνεχιστεί μετά την επαναφορά της σύνδεσης."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Εκκαθάριση ιστορικού"</string>
     <string name="browser_history" msgid="2979476257919939232">"Σελίδες που έχετε επισκεφθεί πρόσφατα"</string>
     <string name="empty_history" msgid="8738772352308207274">"Το ιστορικό του προγράμματος περιήγησης είναι κενό."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Προσθήκη σελιδοδείκτη..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Προσθήκη"</string>
     <string name="no_database" msgid="2256698896757181084">"Δεν υπάρχει βάση δεδομένων!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Πληκτρολογήστε τη διεύθυνση ιστού"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Αναζήτηση ή πληκτρολόγηση διεύθυνσης URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Μετάβαση"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Σελιδοδείκτες και ιστορικό ιστού"</string>
     <string name="attention" msgid="3473639060042811244">"Προσοχή"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Δεν είναι δυνατή η λήψη. Δεν είναι δυνατός ο προσδιορισμός του μεγέθους του στοιχείου."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Η λήψη διακόπηκε. Δεν είναι δυνατή η συνέχισή της."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Πρόγραμμα εκτέλεσης δοκιμών προγράμματος περιήγησης"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Αναζήτηση στον ιστό"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Να επιτρέπεται η αποθήκευση"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Αυτός ο ιστότοπος θέλει να αποθηκεύσει πληροφορίες στο τηλέφωνό σας."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Πρόσβαση στην τοποθεσία σας"</string>
-    <string name="location_message" msgid="1729456751935683242">"Αυτός ο ιστότοπος θέλει να αποκτήσει πρόσβαση στην τοποθεσία σας."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Δημιουργία συντόμευσης"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Αυτός ο ιστότοπος θέλει να δημιουργήσει μια συντόμευση αυτής της σελίδας στην αρχική σας οθόνη."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Ο παρακάτω πίνακας εμφανίζει τα δικαιώματα που έχετε παραχωρήσει σε κάθε ιστότοπο που προσπάθησε να χρησιμοποιήσει το Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Πρόγραμμα επιλογής αρχείων"</string>
-    <string name="image_message" msgid="5450245866521896891">"Επιλεγμένη εικόνα"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Ρυθμίσεις Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Διαβάστε την πολιτική απορρήτου αυτού του ιστότοπου για να μάθετε πώς θα χρησιμοποιηθεί η τοποθεσία σας."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Να επιτρέπεται η τοπική αποθήκευση"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Αυτός ο ιστότοπος μπορεί να αποθηκεύσει πληροφορίες στο τηλέφωνό σας"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Αυτός ο ιστότοπος δεν μπορεί να αποθηκεύσει πληροφορίες στο τηλέφωνό σας"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Να επιτρέπεται ο εντοπισμός τοποθεσίας"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Είναι δυνατή η ανάγνωση της τοποθεσίας σας από αυτόν τον ιστότοπο"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Δεν είναι δυνατή η ανάγνωση της τοποθεσίας σας από αυτόν τον ιστότοπο"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Κατάργηση αυτού του ιστότοπου από το Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Δεν έχουν οριστεί δικαιώματα"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Κατάργηση αυτού του ιστότοπου"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Θα γίνει εκκαθάριση όλων των δικαιωμάτων και τα δεδομένα που έχουν αποθηκευτεί στο τηλέφωνό σας από τον ιστότοπο, θα διαγραφούν."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Αυτός ο ιστότοπος θα αποθηκεύσει πληροφορίες στο τηλέφωνό σας."\n" Αλλάξτε αυτήν τη ρύθμιση στο μενού:"\n" Ρυθμίσεις -&gt; Ρυθμίσεις Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Αυτός ο ιστότοπος δεν θα αποθηκεύσει ποτέ πληροφορίες στο τηλέφωνό σας."\n" Αλλάξτε αυτήν τη ρύθμιση στο μενού:"\n" Ρυθμίσεις -&gt; Ρυθμίσεις Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Αυτός ο ιστότοπος μπορεί να αποκτήσει πρόσβαση στην τρέχουσα τοποθεσία σας."\n" Αλλάξτε αυτήν τη ρύθμιση στο μενού:"\n" Ρυθμίσεις -&gt; Ρυθμίσεις Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Αυτός ο ιστότοπος δεν θα έχει πρόσβαση στην τοποθεσία σας."\n" Αλλάξτε αυτήν τη ρύθμιση από το μενού:"\n" Ρυθμίσεις -&gt; Ρυθμίσεις Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Η συντόμευση δημιουργήθηκε"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Να μην επιτρέπεται ποτέ"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Ακύρωση"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Να μην επιτρέπεται ποτέ"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Ακύρωση"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Εφαρμογή"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Ακύρωση"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Ακύρωση"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"διαδρομή:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Δεν έχουν επιλεχθεί αρχεία"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Επιλέχθηκε ένα αρχείο"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"επιλεγμένα αρχεία"</string>
-    <string name="remove" msgid="7820112494467011374">"Κατάργηση"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Τοπικός χώρος αποθήκευσης"</string>
-    <string name="allowed" msgid="1599514934221911624">"Επιτρέπεται"</string>
-    <string name="denied" msgid="7470209521858372968">"Απορρίφθηκε"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Άγνωστος τύπος πλαισίου διαλόγου"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Χώρος αποθήκευσης προγράμματος περιήγησης πλήρης"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Κάντε κλικ για να αποδεσμεύσετε χώρο."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Εκκαθάριση αποθηκευμένων δεδομένων"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Κατάργηση όλων των βάσεων δεδομένων που σχετίζονται με αυτόν τον ιστότοπο"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Εκκαθάριση αποθηκευμένων δεδομένων"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Όλα τα δεδομένα που αποθηκεύτηκαν από αυτόν τον ιστότοπο θα διαγραφούν"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Εκκαθάριση όλων"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Άκυρο"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB αποθηκευμένα στο τηλέφωνό σας"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"Η τοποθεσία <xliff:g id="WEBPAGE">%s</xliff:g> θέλει να μάθει την τοποθεσία σας"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Κοινή χρήση"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Χωρίς κοινή χρήση"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Διατήρηση"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Εκκαθάριση πρόσβασης τοποθεσίας"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Η πρόσβαση στην τοποθεσία για αυτόν τον ιστότοπο θα απαλειφθεί"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Εκκαθάριση πρόσβασης"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Άκυρο"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Επισκόπηση"</string>
 </resources>
diff --git a/res/values-es-rUS/arrays.xml b/res/values-es-rUS/arrays.xml
new file mode 100644
index 0000000..a622228
--- /dev/null
+++ b/res/values-es-rUS/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Cuota no permitida"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index ef6e6f8..1b1f6e2 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -16,6 +16,8 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Navegador"</string>
+    <string name="new_tab" msgid="4505722538297295141">"Ventana nueva"</string>
+    <string name="active_tabs" msgid="3050623868203544623">"Windows"</string>
     <string name="tab_bookmarks" msgid="2305793036003473653">"Marcadores"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Más visitados"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historial"</string>
@@ -34,6 +36,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> coincide"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> coincide"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Cargando…"</string>
     <string name="page_info" msgid="4048529256302257195">"Información de la página"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Ver información de la página"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Dirección:"</string>
@@ -59,25 +62,32 @@
     <string name="stopping" msgid="4839698519340302982">"Deteniendo..."</string>
     <string name="stop" msgid="5687251076030630074">"Detener"</string>
     <string name="reload" msgid="8585220783228408062">"Actualizar"</string>
+    <string name="back" msgid="8414603107175713668">"Atrás"</string>
     <string name="forward" msgid="4288210890526641577">"Reenviar"</string>
     <string name="save" msgid="5922311934992468496">"Aceptar"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Cancelar"</string>
     <string name="location" msgid="969988560160364559">"Ubicación"</string>
     <string name="name" msgid="5990326151488445481">"Nombre"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Marcador"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Agregar marcador"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Editar marcador"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Agregar acceso directo a la página de inicio"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Abrir"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Eliminar marcador"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Eliminar de marcadores"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Suprimir del historial"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Definir como página principal"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Guardado en los marcadores."</string>
+    <string name="bookmark_not_saved" msgid="700600955089376724">"No se pudo agregar a favoritos."</string>
+    <string name="homepage_set" msgid="8768087280310966395">"Configuración de página principal."</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"El marcador debe tener un nombre."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"El marcador debe tener una ubicación."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"No es posible crear un marcador vacío."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"La URL no es válida."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Eliminar"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Última página vista del marcador"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Vista en miniatura"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Vista de lista"</string>
     <string name="current_page" msgid="7510129573681663135">"de "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"El marcador \"<xliff:g id="BOOKMARK">%s</xliff:g>\" se eliminará."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Abrir en una ventana nueva"</string>
@@ -97,6 +107,7 @@
     <string name="shortcut_bookmark" msgid="3974876480401135895">"Marcador"</string>
     <string name="history" msgid="2451240511251410032">"Historial"</string>
     <string name="menu_view_download" msgid="2124570321712995120">"Descargas"</string>
+    <string name="copy_page_url" msgid="7635062169011319208">"Copiar la url de la página"</string>
     <string name="share_page" msgid="593756995297268343">"Compartir página"</string>
     <string name="contextmenu_openlink" msgid="7237961252214188935">"Abrir"</string>
     <string name="contextmenu_openlink_newwindow" msgid="992765050093960353">"Abrir en una ventana nueva"</string>
@@ -111,39 +122,48 @@
     <string name="contextmenu_add_contact" msgid="3183511922223645716">"Agregar contacto"</string>
     <string name="contextmenu_send_mail" msgid="1014513374828775660">"Enviar correo electrónico"</string>
     <string name="contextmenu_map" msgid="7471390435434034912">"Situar en el mapa"</string>
+    <string name="choosertitle_sharevia" msgid="4600490613341909086">"Compartir mediante"</string>
     <string name="clear" msgid="7070043081700011461">"Borrar"</string>
     <string name="replace" msgid="4843033491070384047">"Reemplazar"</string>
     <string name="browser_bookmarks_page_bookmarks_text" msgid="6787605028726162673">"Marcadores"</string>
     <string name="menu_preferences" msgid="6709237687234102240">"Configurac."</string>
     <string name="pref_content_title" msgid="722227111894838633">"Configuración del contenido de la página"</string>
     <string name="pref_content_load_images" msgid="2125616852957377561">"Cargar imágenes"</string>
-    <string name="pref_content_load_images_summary" msgid="5149716777459747214">"Visualizar imágenes en páginas web"</string>
+    <string name="pref_content_load_images_summary" msgid="5055874125248398584">"Visualizar imágenes en páginas web"</string>
     <string name="pref_content_block_popups" msgid="7808433807197256726">"Bloq. ventanas emerg."</string>
     <string name="pref_content_javascript" msgid="4570972030299516843">"Habilitar JavaScript"</string>
     <string name="pref_content_open_in_background" msgid="824123779725118663">"Abrir en modo subord."</string>
-    <string name="pref_content_open_in_background_summary" msgid="1543556325431215041">"Las ventanas nuevas se abren detrás de la actual"</string>
+    <string name="pref_content_plugins" msgid="7231944644794301582">"Activar complementos"</string>
+    <string name="pref_content_open_in_background_summary" msgid="1737664075721181678">"Abrir ventanas nuevas detrás de la actual"</string>
     <string name="pref_content_homepage" msgid="6082437160778559806">"Definir página de inicio"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Ajuste automát. de pág."</string>
-    <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Formatea las páginas web para que se ajusten a la pantalla"</string>
+    <string name="pref_content_autofit_summary" msgid="4587831659894879986">"Formatea las páginas web para que se ajusten a la pantalla"</string>
+    <string name="pref_content_landscape_only" msgid="2022546812766219672">"Visualización horizontal solamente"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1008238895535428855">"Mostrar páginas sólo en la orientación de pantalla horizontal más ancha"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Configuración de privacidad"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Borrar caché"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Eliminar todo el contenido de la página del caché"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Se borrará el caché."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Borrar el contenido y las bases de datos de la memoria caché local"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="5541011591300753881">"Se suprimirá el contenido y las bases de datos de la memoria caché local."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Borrar datos de cookies"</string>
-    <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Borrar todas las cookies del navegador"</string>
-    <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Se borrarán todas las cookies."</string>
+    <string name="pref_privacy_clear_cookies_summary" msgid="6962742063990677520">"Eliminar todas las cookies del navegador"</string>
+    <string name="pref_privacy_clear_cookies_dlg" msgid="552855688091432682">"Se suprimirán todas las cookies."</string>
     <string name="pref_privacy_clear_history" msgid="8723795508825198477">"Borrar historial"</string>
     <string name="pref_privacy_clear_history_summary" msgid="6868501330708940734">"Borrar el historial de navegación del navegador"</string>
-    <string name="pref_privacy_clear_history_dlg" msgid="1433519059550861064">"Se borrará el historial del navegador."</string>
+    <string name="pref_privacy_clear_history_dlg" msgid="544903007914753853">"Se suprimirá el historial del navegador."</string>
     <string name="pref_privacy_clear_form_data" msgid="4232668196344383987">"Borrar datos del formulario"</string>
     <string name="pref_privacy_clear_form_data_summary" msgid="1790390894719517167">"Borrar todos los datos guardados del formulario"</string>
-    <string name="pref_privacy_clear_form_data_dlg" msgid="567352105409238549">"Se borrarán todos los datos guardados del formulario."</string>
+    <string name="pref_privacy_clear_form_data_dlg" msgid="4443621086781197928">"Se suprimirán todos los datos guardados del formulario."</string>
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Borrar contraseñas"</string>
-    <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Borrar todas las contraseñas guardadas"</string>
-    <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Se borrarán todas las contraseñas guardadas."</string>
+    <string name="pref_privacy_clear_passwords_summary" msgid="8856782718942903335">"Eliminar todas las contraseñas guardadas"</string>
+    <string name="pref_privacy_clear_passwords_dlg" msgid="2083869328824248255">"Se suprimirán todas las contraseñas guardadas."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Activar ubicación"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Permitir que los sitios soliciten acceso a tu ubicación"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Borrar acceso a la ubicación"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Borrar acceso a la ubicación para todos los sitios web"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Borrar acceso a la ubicación para todos los sitios web"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Configuración de seguridad"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Recordar contraseñas"</string>
-    <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Guardar nombres de usuario y contraseñas para sitios web"</string>
+    <string name="pref_security_remember_passwords_summary" msgid="256388703356349137">"Guardar los nombres de usuario y las contraseñas de los sitios web"</string>
     <string name="pref_security_save_form_data" msgid="1213669802810198893">"Recordar datos del form."</string>
     <string name="pref_security_save_form_data_summary" msgid="4994074685153708026">"Recordar los datos ingresados en los formularios para uso futuro"</string>
     <string name="pref_security_show_security_warning" msgid="8901135676266754559">"Mostrar advert. de seguridad"</string>
@@ -166,16 +186,14 @@
     <item msgid="3840999588443167001">"Cerrar"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Predeterminar zoom"</string>
+    <string name="pref_content_load_page" msgid="2219810141690955452">"Abrir las páginas en descripción general"</string>
+    <string name="pref_content_load_page_summary" msgid="8792093504054149369">"Mostrar la descripción general de las páginas nuevas abiertas"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Configuración avanzada"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Habilitar Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplicaciones que amplían la funcionalidad del navegador"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Configuración de Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista de complementos"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"No hay complementos instalados."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplicaciones que amplían la funcionalidad del navegador"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Configuración del sitio web"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Ver configuración avanzada para sitios web individuales"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Restabl. a valores predet."</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Borrar todos los datos del navegador y restablecer la configuración a los valores predeterminados"</string>
-    <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Se borrarán todos los datos del navegador y la configuración volverá a los valores predeterminados."</string>
+    <string name="pref_extras_reset_default_dlg" msgid="6894807766578874830">"Se suprimirán todos los datos del navegador y la configuración volverá a los valores predeterminados."</string>
     <string name="pref_extras_reset_default_dlg_title" msgid="2250334970728938936">"Restablecer a los valores predeterminados"</string>
     <string name="pref_development_title" msgid="3263854204533056480">"Depurar"</string>
     <string name="pref_default_text_encoding" msgid="5742965543955558478">"Codificación de texto"</string>
@@ -189,19 +207,19 @@
     <string name="pref_default_text_encoding_dialogtitle" msgid="5508255018084978547">"Codificación de texto"</string>
     <string name="pref_default_text_encoding_default" msgid="5272126711231936722">"Latino-1"</string>
     <string name="browserFrameRedirect" msgid="7049675479777828343">"Redireccionamiento"</string>
-    <string name="browserFrame307Post" msgid="739650008647852203">"Esta página web está siendo redireccionada. ¿Deseas reenviar los datos que ingresaste en tu formulario a la ubicación nueva?"</string>
+    <string name="browserFrame307Post" msgid="1429094844669510768">"Esta página web está siendo redireccionada. ¿Deseas reenviar los datos que ingresaste en tu formulario a la ubicación nueva?"</string>
     <string name="browserFrameNetworkErrorLabel" msgid="126892350904924893">"Problema de conectividad de datos"</string>
     <string name="browserFrameFileErrorLabel" msgid="8063691502792670367">"Problema con el archivo"</string>
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Confirmar"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"La página que intentas ver contiene datos que ya se han suministrado (\"POSTDATA\"). Si vuelves a enviar los datos, se repetirán las acciones que haya realizado el formulario (como una búsqueda o compra en línea)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"No hay conexión a la red"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"La página continuará cargando cuando se haya restablecido la conexión."</string>
+    <string name="loadSuspended" msgid="3133656588880851273">"El navegador no puede cargar esta página debido a que no hay conexión a Internet."</string>
     <string name="clear_history" msgid="5998307092715979619">"Borrar historial"</string>
-    <string name="browser_history" msgid="2979476257919939232">"Últimas páginas visitadas"</string>
+    <string name="browser_history" msgid="1038987118290272525">"Páginas visitadas recientemente"</string>
     <string name="empty_history" msgid="8738772352308207274">"El historial del navegador está vacío."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Agregar marcador..."</string>
-    <string name="no_database" msgid="2256698896757181084">"No hay base de datos"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Escribe la dirección web"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Agregar"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Buscar o escribir URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Ir"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Marcadores e historial web"</string>
     <string name="attention" msgid="3473639060042811244">"Atención"</string>
@@ -240,58 +258,37 @@
     <string name="download_pending_network" msgid="6548714525679461053">"Esperando la conexión de datos..."</string>
     <string name="download_running_paused" msgid="6418029352085656495">"Esperando la conexión de datos..."</string>
     <string name="download_canceled" msgid="6057083743144492515">"Descarga cancelada."</string>
-    <string name="download_not_acceptable" msgid="282108828207321357">"No es posible realizar la descarga. El contenido no se admite en el teléfono."</string>
+    <string name="download_not_acceptable" msgid="313769696131563652">"No es posible realizar la descarga. El contenido no se admite en este teléfono."</string>
     <string name="download_file_error" msgid="1206648050615176113">"No es posible terminar la descarga. No hay espacio suficiente."</string>
     <string name="download_length_required" msgid="9038605488460437406">"No es posible realizar la descarga. No puede determinarse el tamaño del elemento."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Descarga interrumpida. No se puede retomar."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Ejecutor de pruebas del navegador"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Buscar en Internet"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Permitir almacenamiento"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Este sitio web desea almacenar información en tu teléfono."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Acceder a tu ubicación"</string>
-    <string name="location_message" msgid="1729456751935683242">"Este sitio web desea acceder a tu ubicación."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Crear un acceso directo"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Este sitio web desea crear un acceso directo a esta página en tu pantalla de inicio"</string>
-    <string name="settings_message" msgid="6171686603006325199">"En la siguiente tabla, se muestran los permisos que has otorgado a cada sitio que ha intentado utilizar Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"File Picker"</string>
-    <string name="image_message" msgid="5450245866521896891">"Imagen seleccionada"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Configuración de Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Lee la política de privacidad del sitio para ver cómo se utilizará tu ubicación."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Permitir almacenamiento local"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Este sitio puede guardar información en tu teléfono"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Este sitio no puede guardar información en tu teléfono"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Permitir detección de ubicación"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Este sitio puede leer tu ubicación actual"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Este sitio no puede leer tu ubicación actual"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Suprimir este sitio de Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"No hay permisos definidos"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Suprimir este sitio"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Se borrarán todos los permisos y se eliminarán los datos del sitio almacenados en el teléfono."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Este sitio almacenará información en este teléfono. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Este sitio nunca almacenará información en este teléfono. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Este sitio puede acceder a tu ubicación. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Este sitio no accederá a tu ubicación. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Acceso directo creado"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"No permitir nunca"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"Aceptar"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Cancelar"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"No permitir nunca"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"Aceptar"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Cancelar"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Aplicar"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Cancelar"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"Aceptar"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Cancelar"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"ruta:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"No hay archivos seleccionados"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Un archivo seleccionado"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"archivo seleccionado"</string>
-    <string name="remove" msgid="7820112494467011374">"Eliminar"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Almacenamiento local"</string>
-    <string name="allowed" msgid="1599514934221911624">"Permitido"</string>
-    <string name="denied" msgid="7470209521858372968">"Denegado"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tipo de diálogo no reconocido"</string>
-    <string name="default_button" msgid="3901922329454578908">"Aceptar"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Almacenamiento del navegador lleno"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Hacer clic para liberar espacio"</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Borrar datos almacenados"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Eliminar todas las bases de datos asociadas con este sitio web"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Borrar datos almacenados"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Todos los datos almacenados por este sitio web serán suprimidos"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="2516563534211898636">"Eliminar todos"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Cancelar"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB almacenados en tu teléfono"</string>
+    <string name="loading_video" msgid="4887871585216091096">"Cargando el video"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="356796102004052471">"<xliff:g id="WEBSITE_ORIGIN">%s</xliff:g> quiere conocer tu ubicación"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="9084486342048347976">"Compartir ubicación"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="6303025160237860300">"Rechazar"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="3118526300707348308">"Recordar la preferencia"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Borrar acceso a la ubicación"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Este sitio puede acceder a tu ubicación actualmente"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Este sitio no puede acceder a tu ubicación actualmente"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Borrar acceso a la ubicación"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"El acceso a la ubicación para este sitio web será borrado"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Borrar acceso"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Cancelar"</string>
+    <string name="website_settings_clear_all" msgid="8739804325997655980">"Eliminar todos"</string>
+    <string name="website_settings_clear_all_dialog_title" msgid="7791826325122461718">"¿Deseas eliminar toda la configuración del sitio web?"</string>
+    <string name="website_settings_clear_all_dialog_message" msgid="6150502090601476333">"Se suprimirán todos los datos del sitio web y los permisos de ubicación."</string>
+    <string name="website_settings_clear_all_dialog_ok_button" msgid="6401582240627669431">"Suprimir todos los datos"</string>
+    <string name="website_settings_clear_all_dialog_cancel_button" msgid="1896757051856611674">"Cancelar"</string>
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Descripción general"</string>
 </resources>
diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml
new file mode 100644
index 0000000..074f300
--- /dev/null
+++ b/res/values-es/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Ninguna cuota permitida"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index c034f95..2a94bfd 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Navegador"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nueva ficha"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Marcadores"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Más visitados"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historial"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> coincidencias"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> coincidencias"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Cargando..."</string>
     <string name="page_info" msgid="4048529256302257195">"Información de página"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Ver información de página"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Dirección:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Deteniendo..."</string>
     <string name="stop" msgid="5687251076030630074">"Detener"</string>
     <string name="reload" msgid="8585220783228408062">"Actualizar"</string>
+    <string name="back" msgid="8414603107175713668">"Anterior"</string>
     <string name="forward" msgid="4288210890526641577">"Siguiente"</string>
     <string name="save" msgid="5922311934992468496">"Aceptar"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Cancelar"</string>
     <string name="location" msgid="969988560160364559">"Ubicación"</string>
     <string name="name" msgid="5990326151488445481">"Nombre"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Marcar"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Añadir marcador"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Editar marcador"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Añadir acceso directo a página principal"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Abrir"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Eliminar marcador"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Eliminar de marcadores"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Elliminar del historial"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Establecer como página principal"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Guardar en marcadores"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Página principal establecida"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"El marcador debe tener un nombre."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"El marcador debe tener una ubicación."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"No se puede crear un marcador vacío."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"La URL no es válida."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Suprimir"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Marcar como última página vista"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Vista de miniaturas"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Vista de lista"</string>
     <string name="current_page" msgid="7510129573681663135">"de "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Se eliminará el marcador \"<xliff:g id="BOOKMARK">%s</xliff:g>\"."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Abrir en ventana nueva"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Establecer página principal"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Ajustar páginas automát."</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Configurar las páginas web para ajustarlas a la pantalla"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Vista solo horizontal"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Leer siempre las páginas con la orientación de pantalla horizontal"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Configuración de privacidad"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Borrar caché"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Eliminar todo el contenido de la página almacenado en caché"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Se borrará la caché."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Borrar bases de datos y contenido de la memoria caché local"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Las bases de datos y el contenido se borrarán de la memoria caché local."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Borrar los datos de cookies"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Borrar todas las cookies del navegador"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Se borrarán todas las cookies."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Borrar contraseñas"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Borrar todas las contraseñas guardadas"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Se borrarán todas las contraseñas guardadas."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Habilitar ubicación"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Permitir que los sitios soliciten acceso a tu ubicación"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Permitir acceso a la ubicación"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Permitir que todos los sitios web accedan a la ubicación"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Permitir que todos los sitios web accedan a la ubicación"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Configuración de seguridad"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Recordar contraseñas"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Guardar nombres de usuario y contraseñas de sitios web"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Cerca"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Zoom predeterminado"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Cuando la página se cargue:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Mostrar información general sobre la página"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Configuración avanzada"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Habilitar Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplicaciones que amplían las funciones del navegador"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Configuración de Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista de complementos"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Ningún complemento instalado"</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplicaciones que amplían las funciones del navegador"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Configuración del sitio web"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Ver configuración avanzada de sitios web individuales"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Restablecer valores pred."</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Borrar todos los datos del navegador y restablecer la configuración predeterminada"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Se borrarán todos los datos del navegador y se restablecerá la configuración predeterminada."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"OK"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"La página que intentas ver contiene datos que ya se han enviado (\"POSTDATA\"). Si reenvías los datos, se repetirá cualquier acción realizada por el formulario de la página (como las búsquedas o las compras online)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Sin conexión de red"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"La página seguirá cargándose una vez que se restablezca la conexión."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Borrar historial"</string>
     <string name="browser_history" msgid="2979476257919939232">"Páginas visitadas recientemente"</string>
     <string name="empty_history" msgid="8738772352308207274">"El historial del navegador está vacío."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Añadir marcador…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Añadir"</string>
     <string name="no_database" msgid="2256698896757181084">"No hay ninguna base de datos."</string>
-    <string name="search_hint" msgid="3385577802557697397">"Introduce la dirección web."</string>
+    <string name="search_hint" msgid="4647356319916631820">"Busca o escribe una URL."</string>
     <string name="search_button_text" msgid="5235226933877634410">"Ir"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Marcadores e historial web"</string>
     <string name="attention" msgid="3473639060042811244">"Atención"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"No se puede realizar la descarga, porque no es posible determinar el tamaño del elemento."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"La descarga se ha interrumpido y no se puede reanudar."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Realizador de pruebas del navegador"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Buscar en la Web"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Permitir almacenamiento"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Este sitio web desea almacenar información en el teléfono."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Acceso a tu ubicación"</string>
-    <string name="location_message" msgid="1729456751935683242">"Este sitio web desea tener acceso a tu ubicación."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Crear un acceso directo"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Este sitio web desea crear un acceso directo a esta página en tu página principal."</string>
-    <string name="settings_message" msgid="6171686603006325199">"En la tabla que aparece a continuación se muestran los permisos que has concedido a los distintos sitios web que han intentado utilizar Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Selector de archivos"</string>
-    <string name="image_message" msgid="5450245866521896891">"Imagen seleccionada"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Configuración de Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Lee la política de privacidad del sitio para saber cómo se utilizará tu ubicación."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Permitir almacenamiento local"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Este sitio puede guardar información en el teléfono."</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Este sitio no puede guardar información en el teléfono."</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Permitir detección de ubicación"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Este sitio puede leer tu ubicación actual."</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Este sitio no puede leer tu ubicación actual."</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Eliminar este sitio de Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"No hay permisos establecidos."</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Eliminar este sitio"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Se borrarán todos los permisos y se eliminarán todos los datos que el sitio haya almacenado en el teléfono."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Este sitio puede almacenar información en el teléfono."\n" Puedes modificar esta opción en:"\n" Configuración -&gt; Configuración de Gears."</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Este sitio no puede almacenar nunca información en el teléfono."\n" Puedes modificar esta opción en:"\n" Configuración -&gt; Configuración de Gears."</string>
-    <string name="location_notification" msgid="3495804750470905804">"Este sitio puede acceder a tu ubicación actual."\n" Puedes modificar esta opción en:"\n" Configuración -&gt; Configuración de Gears."</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Este sitio no puede acceder a tu ubicación actual."\n" Puedes modificar esta opción en:"\n" Configuración -&gt; Configuración de Gears."</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Acceso directo creado"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"No permitir nunca"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"Aceptar"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Cancelar"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"No permitir nunca"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"Aceptar"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Cancelar"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Aplicar"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Cancelar"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"Aceptar"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Cancelar"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"ruta:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Ningún archivo seleccionado"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Un archivo seleccionado"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"archivos seleccionados"</string>
-    <string name="remove" msgid="7820112494467011374">"Eliminar"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Almacenamiento local"</string>
-    <string name="allowed" msgid="1599514934221911624">"Permitido"</string>
-    <string name="denied" msgid="7470209521858372968">"Denegado"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tipo de cuadro de diálogo no reconocido"</string>
-    <string name="default_button" msgid="3901922329454578908">"Aceptar"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Espacio de almacenamiento del navegador agotado"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Haz clic aquí para liberar espacio."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Borrar datos almacenados"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Eliminar todas las bases de datos asociadas a este sitio web"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Borrar datos almacenados"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Todos los datos almacenados por este sitio web se eliminarán."</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Borrar todo"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Cancelar"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB almacenados en tu teléfono"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> quiere conocer tu ubicación."</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Compartir"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"No compartir"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Recordar"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Permitir acceso a la ubicación"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Este sitio puede acceder actualmente a tu ubicación."</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Este sitio no puede acceder actualmente a tu ubicación."</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Permitir acceso a la ubicación"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Se permitirá que este sitio web acceda a tu ubicación."</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Permitir acceso"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Cancelar"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Información general"</string>
 </resources>
diff --git a/res/values-fr/arrays.xml b/res/values-fr/arrays.xml
new file mode 100644
index 0000000..f0ea8e8
--- /dev/null
+++ b/res/values-fr/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Aucun quota autorisé"</item>
+    <item msgid="7374272188672967690">"5 Mo"</item>
+    <item msgid="8699352701856136738">"10 Mo"</item>
+    <item msgid="2018822431469084862">"30 Mo"</item>
+    <item msgid="5383642976774534074">"100 Mo"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 7e5804f..2b5f196 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Navigateur"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nouvel onglet"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Favoris"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Les + visités"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historique"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> correspondances"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> correspondances"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Chargement…"</string>
     <string name="page_info" msgid="4048529256302257195">"Infos sur la page"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Afficher les infos sur la page"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adresse :"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Arrêt..."</string>
     <string name="stop" msgid="5687251076030630074">"Interrompre"</string>
     <string name="reload" msgid="8585220783228408062">"Actualiser"</string>
+    <string name="back" msgid="8414603107175713668">"Précédent"</string>
     <string name="forward" msgid="4288210890526641577">"Suivant"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Annuler"</string>
     <string name="location" msgid="969988560160364559">"Emplacement"</string>
     <string name="name" msgid="5990326151488445481">"Nom"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Favori"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Ajouter un favori"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Modifier le favori"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Raccourci sur la page d\'accueil"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Ouverture"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Supprimer le favori"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Supprimer des favoris"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Supprimer de l\'historique"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Définir comme page d\'accueil"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Enregistré dans les favoris"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Page d\'accueil définie"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Vous devez attribuer un nom à votre favori."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Le favori doit disposer d\'un emplacement."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Impossible de créer un favori vide."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"L\'URL est incorrecte."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Supprimer"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Ajouter la dernière page consultée"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniatures"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Liste"</string>
     <string name="current_page" msgid="7510129573681663135">"de "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Le favori \"<xliff:g id="BOOKMARK">%s</xliff:g>\" sera supprimé."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Nouvelle fenêtre"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Configurer la page d\'accueil"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Redimensionner"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Configurer les pages Web pour qu\'elles s\'ajustent à l\'écran"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Affichage en mode paysage uniquement"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Toujours lire les pages en orientation paysage"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Paramètres de confidentialité"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Effacer le cache"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Supprimer toutes les pages en cache"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Le cache sera effacé."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Supprimer les bases de données et le contenu mis localement en cache"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Les bases de données et le contenu mis localement en cache vont être effacés."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Effacer tous les cookies"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Effacer tous les cookies du navigateur"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Tous les cookies seront effacés."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Effacer les mots de passe"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Effacer tous les mots de passe enregistrés"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Tous les mots de passe enregistrés seront effacés."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Activer la localisation"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Autoriser les sites à demander l\'accès à vos données de localisation"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Supprimer l\'accès aux données de localisation"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Supprimer l\'accès aux données de localisation pour tous les sites Web"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Supprimer l\'accès aux données de localisation pour tous les sites Web"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Paramètres de sécurité"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Mém. mots de passe"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Enregistrer les noms d\'utilisateur et les mots de passe pour les sites Web"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Proche"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Zoom par défaut"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Lors du chargement d\'une page :"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Afficher une vue d\'ensemble de la page"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Paramètres avancés"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Activer Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Applications étendant les fonctionnalités du navigateur"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Paramètres Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Liste des plug-ins"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Aucun plug-in installé."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Applications étendant les fonctionnalités du navigateur"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Paramètres du site Web"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Afficher les paramètres avancés de sites Web individuels"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Rétablir valeurs par défaut"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Effacer toutes les données du navigateur et rétablir les paramètres par défaut"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Toutes les données du navigateur seront effacées et les paramètres par défaut rétablis."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Confirmer"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"La page que vous tentez d\'afficher contient des données qui ont déjà été envoyées (\"POSTDATA\"). Si vous renvoyez les données, toute action effectuée par le formulaire sur la page exécutée (notamment les lancements de recherche ou les achats en ligne) sera répétée."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Aucune connexion réseau"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Une fois la connexion rétablie, le chargement de la page reprendra."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Effacer l\'historique"</string>
     <string name="browser_history" msgid="2979476257919939232">"Dernières pages consultées"</string>
     <string name="empty_history" msgid="8738772352308207274">"L\'historique du navigateur est vide."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Ajouter aux favoris..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Ajouter"</string>
     <string name="no_database" msgid="2256698896757181084">"Aucune base de données !"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Saisir l\'adresse Web"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Rechercher ou entrer l\'URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Aller"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Favoris et historique Web"</string>
     <string name="attention" msgid="3473639060042811244">"Attention"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Téléchargement impossible. La taille de l\'élément n\'a pas pu être déterminée."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Téléchargement interrompu. Impossible de reprendre le téléchargement."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Testeur de navigateur"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Rechercher sur le Web"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Autoriser le stockage"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Ce site souhaite enregistrer des informations sur votre téléphone."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Afficher ma position"</string>
-    <string name="location_message" msgid="1729456751935683242">"Ce site souhaite afficher votre position."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Créer un raccourci"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Le site souhaite créer un raccourci vers cette page sur votre écran d\'accueil."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Le tableau ci-dessous indique les fonctions que vous avez autorisées pour chaque site ayant tenté d\'utiliser Google Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Sélecteur de fichier"</string>
-    <string name="image_message" msgid="5450245866521896891">"Image sélectionnée"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Paramètres Google Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Lisez les règles de confidentialité du site pour savoir comment les informations sur votre localisation seront utilisées."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Autoriser le stockage local"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Ce site peut enregistrer des informations sur votre téléphone."</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Ce site ne peut enregistrer aucune information sur votre téléphone."</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Autoriser la détection de ma position"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Ce site peut détecter votre position actuelle."</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Ce site ne peut pas détecter votre position actuelle."</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Supprimer ce site de Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Aucune autorisation définie"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Supprimer ce site"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Toutes les autorisations seront effacées et toutes les données enregistrées par le site sur votre téléphone seront supprimées."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Ce site enregistrera des informations sur votre téléphone."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Ce site n\'enregistrera jamais aucune information sur votre téléphone."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
-    <string name="location_notification" msgid="3495804750470905804">"Ce site peut afficher votre position actuelle. "\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Ce site n\'affichera pas votre position actuelle."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Raccourci créé"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Ne jamais autoriser"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Annuler"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Ne jamais autoriser"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Annuler"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Appliquer"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Annuler"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Annuler"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"chemin :"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Aucun fichier sélectionné"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Un fichier sélectionné"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"fichiers sélectionnés"</string>
-    <string name="remove" msgid="7820112494467011374">"Supprimer"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Stockage local"</string>
-    <string name="allowed" msgid="1599514934221911624">"Autorisé"</string>
-    <string name="denied" msgid="7470209521858372968">"Refusé"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Type de boîte de dialogue inconnu"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Espace de stockage du navigateur saturé"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Cliquez ici pour libérer de l\'espace."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Effacer les données stockées"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Supprimer toutes les bases de données associées à ce site Web"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Effacer les données stockées"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Toutes les données stockées par le site Web vont être supprimées."</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Tout effacer"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Annuler"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Mo stockés sur votre téléphone"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> souhaite connaître votre position géographique."</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Partager"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Ne pas partager"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Mémoriser"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Supprimer l\'accès aux données de localisation"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Ce site a actuellement accès à vos données de localisation."</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Ce site n\'a actuellement pas accès à vos données de localisation."</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Supprimer l\'accès aux données de localisation"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"L\'accès de ce site Web aux données de localisation va être supprimé."</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Supprimer l\'accès"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Annuler"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Présentation"</string>
 </resources>
diff --git a/res/values-it/arrays.xml b/res/values-it/arrays.xml
new file mode 100644
index 0000000..5245c81
--- /dev/null
+++ b/res/values-it/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Nessuna quota consentita"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index d091091..ad87b7d 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Browser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nuova scheda"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Segnalibri"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"I più visitati"</string>
     <string name="tab_history" msgid="1979267558744613746">"Cronologia"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> corrispondenze"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> corrispondenze"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Caricamento..."</string>
     <string name="page_info" msgid="4048529256302257195">"Info pagina"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Visualizza info pagina"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Indirizzo:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Interruzione..."</string>
     <string name="stop" msgid="5687251076030630074">"Interrompi"</string>
     <string name="reload" msgid="8585220783228408062">"Aggiorna"</string>
+    <string name="back" msgid="8414603107175713668">"Indietro"</string>
     <string name="forward" msgid="4288210890526641577">"Avanti"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Annulla"</string>
     <string name="location" msgid="969988560160364559">"URL"</string>
     <string name="name" msgid="5990326151488445481">"Nome"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Segnalibro"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Aggiungi segnalibro"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Modifica segnalibro"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Aggiungi scorciatoia Home"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Apri"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Elimina segnalibro"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Rimuovi dai segnalibri"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Rimuovi da cronologia"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Imposta come home page"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Salvato nei segnalibri."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Home page impostata"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Inserisci un nome per il segnalibro."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Inserisci un URL per il segnalibro."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Impossibile creare un segnalibro vuoto."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL non valido."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Elimina"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Aggiungi ultima pagina visualizzata ai segnalibri"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Visualizzazione miniatura"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Visualizzazione elenco"</string>
     <string name="current_page" msgid="7510129573681663135">"da "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Il segnalibro \"<xliff:g id="BOOKMARK">%s</xliff:g>\" verrà eliminato."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Apri in nuova finestra"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Imposta home page"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Adatta autom. pagine"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Adatta le pagine web allo schermo"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Visualizzazione solo orizzontale"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Leggi sempre le pagine con l\'orientamento dello schermo orizzontale più largo"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Impostazioni privacy"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Cancella cache"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Elimina tutti i contenuti delle pagine nella cache"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"La cache verrà cancellata."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Cancella i contenuti e i database memorizzati localmente nella cache"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"I contenuti e i database memorizzati localmente nella cache verranno cancellati."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Cancella tutti i dati dei cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Cancella tutti i cookie del browser"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Verranno cancellati tutti i cookie."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Cancella password"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Cancella tutte le password salvate"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Tutte le password salvate saranno cancellate."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Attiva localizzazione"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Consenti ai siti di richiedere l\'accesso alla tua posizione"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Cancella accesso a posizione"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Cancella l\'accesso alla posizione per tutti i siti web"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Cancella l\'accesso alla posizione per tutti i siti web"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Impostazioni di protezione"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Memorizza le password"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Salva nomi utente e password per i siti web"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Chiudi"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Zoom predefinito"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Al caricamento della pagina:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Visualizza la panoramica della pagina"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Impostazioni avanzate"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Attiva Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Applicazioni che estendono le funzionalità del browser"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Impostazioni Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Elenco di plug-in"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Nessun plug-in installato."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Applicazioni che estendono le funzionalità del browser"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Impostazioni siti web"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Visualizza le impostazioni avanzate dei singoli siti web"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Ripristina valori predefiniti"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Cancella tutti i dati del browser e ripristina tutte le impostazioni predefinite"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Verranno cancellati tutti i dati del browser e ripristinate le impostazioni predefinite."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Conferma"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"La pagina che stai tentando di visualizzare contiene dati già inviati (\"POSTDATA\"). Se invii di nuovo i dati, ogni azione effettuata dal modulo nella pagina (come una ricerca o un acquisto online) verrà ripetuta."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Nessuna connessione di rete"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Il caricamento della pagina continuerà una volta ripristinata la connessione."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Cancella cronologia"</string>
     <string name="browser_history" msgid="2979476257919939232">"Pagine visitate di recente"</string>
     <string name="empty_history" msgid="8738772352308207274">"La cronologia del browser è vuota."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Aggiungi segnalibro…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Aggiungi"</string>
     <string name="no_database" msgid="2256698896757181084">"Nessun database"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Digita l\'indirizzo web"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Cerca o digita un URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Vai"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Segnalibri e cronologia web"</string>
     <string name="attention" msgid="3473639060042811244">"Attenzione"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Impossibile effettuare il download. Impossibile determinare le dimensioni dell\'elemento."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Download interrotto. Impossibile ripristinarlo."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Cerca nel Web"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Consenti archiviazione"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Il sito web vorrebbe memorizzare informazioni sul cellulare."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Accedi alla tua posizione"</string>
-    <string name="location_message" msgid="1729456751935683242">"Questo sito web vorrebbe avere accesso alla tua posizione."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Crea un collegamento"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Questo sito web vorrebbe creare un collegamento a questa pagina nella tua home page."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Nella tabella che segue vengono riportate le autorizzazioni concesse a ogni sito che ha provato a usare Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Selettore file"</string>
-    <string name="image_message" msgid="5450245866521896891">"Immagine selezionata"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Impostazioni Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Per conoscere la modalità di utilizzo della tua posizione, leggi le norme sulla privacy del sito."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Consenti archiviazione locale"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Questo sito può salvare informazioni sul cellulare"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Questo sito non può salvare informazioni sul cellulare"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Consenti rilevamento posizione"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Questo sito può leggere la tua posizione attuale"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Questo sito non può leggere la tua posizione attuale"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Rimuovi il sito da Google Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Nessuna autorizzazione impostata"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Rimuovi il sito"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Tutte le autorizzazioni verranno annullate e tutti i dati memorizzati sul cellulare dal sito verranno eliminati."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Questo sito memorizzerà informazioni sul cellulare."\n" Modifica questa impostazione in:"\n" Impostazioni -&gt; Impostazioni Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Questo sito non memorizzerà mai informazioni sul cellulare."\n" Modifica questa impostazione in:"\n" Impostazioni -&gt; Impostazioni Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Questo sito può accedere alla tua posizione attuale."\n" Modifica questa impostazione in:"\n" Impostazioni -&gt; Impostazioni Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Questo sito non accederà alla tua posizione attuale."\n" Modifica questa impostazione in:"\n" Impostazioni -&gt; Impostazioni Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Collegamento creato"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Non consentire mai"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Annulla"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Non consentire mai"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Annulla"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Applica"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Annulla"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Annulla"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"percorso:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Nessun file selezionato"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Un file selezionato"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"file selezionati"</string>
-    <string name="remove" msgid="7820112494467011374">"Rimuovi"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Archiviazione locale"</string>
-    <string name="allowed" msgid="1599514934221911624">"Consentito"</string>
-    <string name="denied" msgid="7470209521858372968">"Negato"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tipo di finestra non riconosciuto"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Memoria del browser piena"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Fai clic per liberare spazio."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Cancella dati archiviati"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Rimuovi tutti i database associati al sito web"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Cancella dati archiviati"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Tutti i dati archiviati da questo sito web verranno eliminati"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Cancella tutto"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Annulla"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB memorizzati sul telefono"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> vuole conoscere la tua posizione"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Condividi"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Non condividere"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Memorizza"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Cancella accesso a posizione"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Al momento questo sito può accedere alla tua posizione"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Al momento questo sito non può accedere alla tua posizione"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Cancella accesso a posizione"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"L\'accesso alla posizione per questo sito web verrà cancellato"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Cancella accesso"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Annulla"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Panoramica"</string>
 </resources>
diff --git a/res/values-ja/arrays.xml b/res/values-ja/arrays.xml
new file mode 100644
index 0000000..c244e64
--- /dev/null
+++ b/res/values-ja/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"割り当てられません"</item>
+    <item msgid="7374272188672967690">"5MB"</item>
+    <item msgid="8699352701856136738">"10MB"</item>
+    <item msgid="2018822431469084862">"30MB"</item>
+    <item msgid="5383642976774534074">"100MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 7b634d8..e519232 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"ブラウザ"</string>
+    <string name="new_tab" msgid="7971857320679510529">"新しいタブ"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"ブックマーク"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"よく使用"</string>
     <string name="tab_history" msgid="1979267558744613746">"履歴"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g>件一致"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g>件一致"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"読み込み中..."</string>
     <string name="page_info" msgid="4048529256302257195">"ページ情報"</string>
     <string name="page_info_view" msgid="5303490449842635158">"ページ情報を表示"</string>
     <string name="page_info_address" msgid="2222306609532903254">"アドレス:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"停止中..."</string>
     <string name="stop" msgid="5687251076030630074">"停止"</string>
     <string name="reload" msgid="8585220783228408062">"再読み込み"</string>
+    <string name="back" msgid="8414603107175713668">"戻る"</string>
     <string name="forward" msgid="4288210890526641577">"進む"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"キャンセル"</string>
     <string name="location" msgid="969988560160364559">"場所"</string>
     <string name="name" msgid="5990326151488445481">"名前"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"ブックマーク"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"ブックマークを追加"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"編集"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"ショートカットを作成"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"開く"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"削除"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"ブックマークから削除"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"履歴から消去"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"ホームページとして設定"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"ブックマークを保存しました。"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"ホームページを設定しました"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"名前を指定してください。"</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"場所を指定してください。"</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"空のブックマークは作成できません。"</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"無効なURLです。"</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"削除"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"最後に表示したページをブックマークする"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"サムネイル表示"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"リスト表示"</string>
     <string name="current_page" msgid="7510129573681663135">"URL "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"ブックマーク「<xliff:g id="BOOKMARK">%s</xliff:g>」を削除します。"</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"新しいウィンドウで開く"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"ホームページ設定"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"ページの自動調整"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"画面に合わせてウェブページの表示やサイズを自動調整する"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"横向き表示のみ"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"ページを常に横向きに表示する"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"プライバシー設定"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"キャッシュを消去"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"キャッシュしたコンテンツをすべて削除する"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"キャッシュを消去します。"</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"ローカルにキャッシュしたコンテンツとデータベースを消去"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"ローカルにキャッシュしたコンテンツとデータベースを消去します。"</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Cookieをすべて消去"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"保存されているCookieをすべて消去する"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Cookieをすべて消去します。"</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"パスワードを消去"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"保存されているパスワードをすべて消去する"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"保存されているパスワードをすべて消去します。"</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"位置情報を有効にする"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"サイトに現在地情報へのアクセスを許可する"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"位置情報アクセスをクリア"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"すべてのウェブサイトの位置情報アクセスをクリア"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"すべてのウェブサイトの位置情報アクセスをクリア"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"セキュリティ設定"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"パスワードを保存"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"サイトのユーザー名とパスワードを保存する"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"高い"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"デフォルトの倍率"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"ページの読み込み時:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"ページの概要を表示"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"詳細設定"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Gearsを有効にする"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"ブラウザの機能拡張を許可する"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gearsの設定"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"プラグインリスト"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"プラグインはインストールされていません。"</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"ブラウザの機能を拡張するアプリケーション"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"ウェブサイト設定"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"個々のウェブサイトの詳細設定を表示"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"初期設定にリセット"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"ブラウザデータをすべて消去して出荷時の初期設定に戻す"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"ブラウザデータをすべて消去して初期設定に戻します。"</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"確認"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"表示しようとしているページには、送信済みのデータ (「POSTDATA」) があります。データを再送すると、以前このページのフォームで実行した操作 (検索やオンライン購入など) が繰り返されます。"</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"ネットワークに接続していません"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"接続が回復次第ページを表示します。"</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"履歴消去"</string>
     <string name="browser_history" msgid="2979476257919939232">"最近閲覧したページ"</string>
     <string name="empty_history" msgid="8738772352308207274">"ブラウザ履歴はありません。"</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"現在のページをブックマーク"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"追加"</string>
     <string name="no_database" msgid="2256698896757181084">"データベースがありません。"</string>
-    <string name="search_hint" msgid="3385577802557697397">"ウェブアドレスを入力"</string>
+    <string name="search_hint" msgid="4647356319916631820">"URLを検索または入力"</string>
     <string name="search_button_text" msgid="5235226933877634410">"移動"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"ブックマークとウェブ履歴"</string>
     <string name="attention" msgid="3473639060042811244">"注意"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"項目のサイズを特定できないため、ダウンロードできません。"</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"ダウンロードが中断されました。再開できません。"</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"ウェブを検索します"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"保存を許可"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"このサイトは携帯電話に情報を保存しようとしています。"</string>
-    <string name="location_prompt" msgid="226262202057302423">"現在地情報にアクセス"</string>
-    <string name="location_message" msgid="1729456751935683242">"このサイトは現在地情報にアクセスしようとしています。"</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"ショートカットを作成"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"このサイトはホーム画面にこのページへのショートカットを作成しようとしています。"</string>
-    <string name="settings_message" msgid="6171686603006325199">"Gearsを使用しようとしたサイトに許可した権限は、以下の表のとおりです。"</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"ファイル選択"</string>
-    <string name="image_message" msgid="5450245866521896891">"選択した画像"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gearsの設定"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"サイトのプライバシーポリシーを読んで、現在地の情報がどのように使用されるのか確認してください。"</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"ローカル保存を許可"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"このサイトは携帯電話に情報を保存できます"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"このサイトは携帯電話に情報を保存できません"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"現在地の検出を許可"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"このサイトは現在地情報を読み取ることができます"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"このサイトは現在地情報を読み取ることができません"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"このサイトをGearsから削除"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"設定されている権限はありません"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"このサイトを削除"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"権限をすべて消去し、このサイトが携帯電話に保存した全データを削除します。"</string>
-    <string name="storage_notification" msgid="6534213782873968255">"このサイトは携帯電話に情報を保存します。"\n"設定変更:"\n"[設定]-&gt;[Gears設定]"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"このサイトは携帯電話に情報を保存しません。"\n"設定変更:"\n"[設定]-&gt;[Gears設定]"</string>
-    <string name="location_notification" msgid="3495804750470905804">"このサイトは現在地情報にアクセスできます。"\n"設定変更:"\n"[設定]-&gt;[Gears設定]"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"このサイトは現在地情報にアクセスしません。"\n"設定変更:"\n"[設定]-&gt;[Gears設定]"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"ショートカットを作成しました"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"許可しない"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"キャンセル"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"許可しない"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"キャンセル"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"適用"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"キャンセル"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"キャンセル"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"パス:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"ファイルが選択されていません"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"1ファイルが選択されています"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"ファイルが選択されています"</string>
-    <string name="remove" msgid="7820112494467011374">"削除"</string>
-    <string name="local_storage" msgid="6703332885937279085">"ローカル保存容量"</string>
-    <string name="allowed" msgid="1599514934221911624">"許可"</string>
-    <string name="denied" msgid="7470209521858372968">"拒否されました"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"不明な種類のダイアログです"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"ブラウザのメモリがいっぱいです"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"クリックして空き領域を増やします。"</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"保存したデータを消去"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"このウェブサイトに関連付けたデータベースをすべて削除"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"保存したデータを消去"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"このウェブサイトに保存されたデータをすべて削除します"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"すべて消去"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"キャンセル"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"携帯電話に保存している容量(MB)"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g>が現在地情報をリクエストしています"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"共有"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"共有しない"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"保存"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"位置情報アクセスをクリア"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"このウェブサイトの位置情報アクセスをクリアします"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"アクセスをクリア"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"キャンセル"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"全体表示"</string>
 </resources>
diff --git a/res/values-ko/arrays.xml b/res/values-ko/arrays.xml
new file mode 100644
index 0000000..7d27cd1
--- /dev/null
+++ b/res/values-ko/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"할당된 저장용량이 없습니다."</item>
+    <item msgid="7374272188672967690">"5MB"</item>
+    <item msgid="8699352701856136738">"10MB"</item>
+    <item msgid="2018822431469084862">"30MB"</item>
+    <item msgid="5383642976774534074">"100MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 153366e..3c07d01 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"브라우저"</string>
+    <string name="new_tab" msgid="7971857320679510529">"새 탭"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"북마크"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"최다 방문 웹사이트"</string>
     <string name="tab_history" msgid="1979267558744613746">"기록"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"검색결과 <xliff:g id="NUMBER">%d</xliff:g>개"</item>
     <item quantity="other" msgid="6616125067364315405">"검색결과 <xliff:g id="NUMBER">%d</xliff:g>개"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"로드 중..."</string>
     <string name="page_info" msgid="4048529256302257195">"페이지 정보"</string>
     <string name="page_info_view" msgid="5303490449842635158">"페이지 정보 보기"</string>
     <string name="page_info_address" msgid="2222306609532903254">"주소:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"중지하는 중..."</string>
     <string name="stop" msgid="5687251076030630074">"중지"</string>
     <string name="reload" msgid="8585220783228408062">"새로고침"</string>
+    <string name="back" msgid="8414603107175713668">"뒤로"</string>
     <string name="forward" msgid="4288210890526641577">"앞으로"</string>
     <string name="save" msgid="5922311934992468496">"확인"</string>
     <string name="do_not_save" msgid="6777633870113477714">"취소"</string>
     <string name="location" msgid="969988560160364559">"위치"</string>
     <string name="name" msgid="5990326151488445481">"이름"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"북마크"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"북마크 추가"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"북마크 수정"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"홈에 바로가기 추가"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"열기"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"북마크 삭제"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"북마크에서 삭제"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"기록에서 삭제"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"홈페이지로 설정"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"북마크에 저장되었습니다."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"홈페이지가 설정되었습니다."</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"북마크의 이름을 입력해야 합니다."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"북마크의 위치를 입력해야 합니다."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"빈 북마크를 만들 수 없습니다."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL이 유효하지 않습니다."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"삭제"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"마지막으로 본 페이지를 북마크 설정"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"미리보기 이미지 보기"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"목록 보기"</string>
     <string name="current_page" msgid="7510129573681663135">"북마크할 페이지 "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"\'<xliff:g id="BOOKMARK">%s</xliff:g>\' 북마크가 삭제됩니다."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"새 창에서 열기"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"홈페이지 설정"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"페이지 자동 맞춤"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"화면에 맞게 웹페이지 형식 지정"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"가로 화면으로만 표시"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"항상 가로 화면으로 페이지 보기"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"개인정보 설정"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"캐시 지우기"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"캐시된 모든 페이지 콘텐츠 삭제"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"캐시가 지워집니다."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"로컬로 캐시된 콘텐츠 및 데이터베이스 삭제"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"로컬로 캐시된 콘텐츠 및 데이터베이스가 삭제됩니다."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"모든 쿠키 데이터 지우기"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"모든 브라우저 쿠키 지우기"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"모든 쿠키가 지워집니다."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"비밀번호 지우기"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"저장된 모든 비밀번호 지우기"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"저장된 비밀번호가 모두 지워집니다."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"위치 정보 사용"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"사이트의 위치 정보 액세스 요청 허용"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"위치 정보 액세스 삭제"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"모든 웹사이트의 위치 정보 액세스 삭제"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"모든 웹사이트의 위치 정보 액세스 삭제"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"보안 설정"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"비밀번호 기억"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"웹사이트의 사용자 이름 및 비밀번호 저장"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"닫기"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"기본 확대/축소"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"페이지 로드 시:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"페이지 개요 표시"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"고급 설정"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Gears 사용"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"브라우저 기능을 확장하는 응용프로그램"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears 설정"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"플러그인 목록"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"설치된 플러그인이 없습니다."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"브라우저 기능을 확장하는 응용프로그램"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"웹사이트 설정"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"개별 웹사이트의 고급 설정 보기"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"기본값으로 재설정"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"모든 브라우저 데이터를 지우고 모든 설정을 기본값으로 재설정"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"모든 브라우저 데이터가 지워지고 설정이 기본값으로 돌아갑니다."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"확인"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"보려는 페이지에 이미 제출된 데이터(\'POSTDATA\')가 있습니다. 해당 데이터를 다시 보내면 페이지의 양식에서 수행한 작업(예: 검색 또는 온라인 구매)이 반복됩니다."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"네트워크 연결 없음"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"연결이 복원된 후에 페이지 로드가 계속됩니다."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"기록 지우기"</string>
     <string name="browser_history" msgid="2979476257919939232">"최근에 방문한 페이지"</string>
     <string name="empty_history" msgid="8738772352308207274">"브라우저 기록이 비어 있습니다."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"북마크에 추가..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"추가"</string>
     <string name="no_database" msgid="2256698896757181084">"데이터베이스가 없습니다."</string>
-    <string name="search_hint" msgid="3385577802557697397">"웹 주소 입력"</string>
+    <string name="search_hint" msgid="4647356319916631820">"URL을 검색하거나 입력"</string>
     <string name="search_button_text" msgid="5235226933877634410">"이동"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"북마크 및 웹 기록"</string>
     <string name="attention" msgid="3473639060042811244">"주의"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"항목의 크기를 확인할 수 없으므로 다운로드할 수 없습니다."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"다운로드가 중단되었으며 다시 시작할 수 없습니다."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"브라우저 테스트 실행기"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"웹 검색"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"저장소 허용"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"웹사이트에서 휴대전화에 정보를 저장하려고 합니다."</string>
-    <string name="location_prompt" msgid="226262202057302423">"사용자 위치에 액세스"</string>
-    <string name="location_message" msgid="1729456751935683242">"웹사이트가 사용자의 위치에 액세스하려고 합니다."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"바로가기 만들기"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"웹사이트가 홈 화면에 이 페이지의 바로가기를 만들려고 합니다."</string>
-    <string name="settings_message" msgid="6171686603006325199">"아래 표는 Gears를 사용하려는 각 사이트에 부여된 권한을 보여줍니다."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"파일 선택기"</string>
-    <string name="image_message" msgid="5450245866521896891">"선택한 이미지"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears 설정"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"위치가 어떻게 사용되는지 보려면 사이트의 개인정보 보호정책을 읽어보세요."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"로컬 저장소 허용"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"사이트에서 휴대전화에 정보를 저장할 수 있습니다."</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"사이트에서 휴대전화에 정보를 저장할 수 없습니다."</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"위치 확인 허용"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"사이트에서 사용자의 현재 위치를 읽을 수 있습니다."</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"사이트에서 사용자의 현재 위치를 읽을 수 없습니다."</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Gears에서 사이트 삭제"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"설정된 권한이 없습니다."</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"사이트 삭제"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"모든 권한이 지워지고 사이트에서 휴대전화에 저장한 모든 데이터가 삭제됩니다."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"사이트에서 휴대전화에 정보를 저장합니다."\n" 설정을 변경하려면"\n" 설정 -&gt; Gears 설정으로 이동하세요."</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"사이트에서 휴대전화에 정보를 저장하지 않습니다."\n" 설정을 변경하려면"\n"설정 -&gt; Gears 설정으로 이동하세요."</string>
-    <string name="location_notification" msgid="3495804750470905804">"사이트에서 사용자의 현재 위치에 액세스할 수 있습니다."\n" 설정을 변경하려면"\n" 설정 -&gt; Gears 설정으로 이동하세요."</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"사이트에서 사용자의 현재 위치에 액세스하지 않습니다."\n" 설정을 변경하려면"\n" 설정 -&gt; Gears 설정으로 이동하세요."</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"바로가기 생성됨"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"허용 안함"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"확인"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"취소"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"허용 안함"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"확인"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"취소"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"적용"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"취소"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"확인"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"취소"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"경로:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"선택한 파일 없음"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"하나의 파일이 선택됨"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"파일을 선택함"</string>
-    <string name="remove" msgid="7820112494467011374">"삭제"</string>
-    <string name="local_storage" msgid="6703332885937279085">"로컬 저장소"</string>
-    <string name="allowed" msgid="1599514934221911624">"허용됨"</string>
-    <string name="denied" msgid="7470209521858372968">"거부됨"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"인식할 수 없는 대화 유형"</string>
-    <string name="default_button" msgid="3901922329454578908">"확인"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"브라우저 저장용량 가득 참"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"여유 공간을 확보하려면 클릭하세요."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"저장된 데이터 삭제"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"웹사이트에 연결된 모든 데이터베이스 삭제"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"저장된 데이터 삭제"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"웹사이트에서 저장한 모든 데이터가 삭제됩니다."</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"모두 지우기"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"취소"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"휴대전화에 저장된 용량(MB)"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g>에서 사용자의 위치를 확인하려고 합니다."</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"공유"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"공유 안함"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"저장"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"위치 정보 액세스 삭제"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"웹사이트의 위치 정보 액세스가 삭제됩니다."</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"액세스 삭제"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"취소"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"전체보기"</string>
 </resources>
diff --git a/res/values-nb/arrays.xml b/res/values-nb/arrays.xml
new file mode 100644
index 0000000..cbaf8c2
--- /dev/null
+++ b/res/values-nb/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Ingen kvote tillatt"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 8205e1f..3407c24 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Nettleser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Ny fane"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Bokmerker"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Mest besøkt"</string>
     <string name="tab_history" msgid="1979267558744613746">"Logg"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> treff"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> treff"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Laster inn ..."</string>
     <string name="page_info" msgid="4048529256302257195">"Sideinfo"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Vis sideinformasjon"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adresse:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Avbryter…"</string>
     <string name="stop" msgid="5687251076030630074">"Avbryt"</string>
     <string name="reload" msgid="8585220783228408062">"Oppdater"</string>
+    <string name="back" msgid="8414603107175713668">"Tilbake"</string>
     <string name="forward" msgid="4288210890526641577">"Fremover"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Avbryt"</string>
     <string name="location" msgid="969988560160364559">"Adresse"</string>
     <string name="name" msgid="5990326151488445481">"Navn"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Bokmerke"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Legg til bokmerke"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Rediger bokmerke"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Lag snarvei på skrivebordet"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Åpne"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Slett bokmerke"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Fjern fra bokmerker"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Fjern fra loggen"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Bruk som startside"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Bokmerke lagret."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Startside angitt"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Bokmerket må ha et navn."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Bokmerket må ha en adresse."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Kan ikke opprette tomt bokmerke."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Ugyldig nettadresse"</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Slett"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Bokmerk sist viste side"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniatyrbildevisning"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Listevisning"</string>
     <string name="current_page" msgid="7510129573681663135">"fra "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Bokmerket \"<xliff:g id="BOOKMARK">%s</xliff:g>\" vil bli slettet."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Åpne i nytt vindu"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Angi startside"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Tilpass sider automatisk"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Tilpass nettsteder til skjermen"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Bare liggende visning"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Les alltid sider i bred, liggende skjermretning"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Personvernsinnstillinger"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Fjern hurtiglager"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Slett alt hurtiglagret nettinnhold"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Hurtiglageret vil tømmes."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Fjern lokalt bufret innhold og databaser"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Lokalt bufret innhold og databaser vil bli fjernet."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Fjern alle infokapsler"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Fjern alle informasjonskapsler"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Alle informasjonskapsler vil bli slettet."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Fjern passord"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Fjern alle lagrede passord"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Alle lagrede passord vil bli slettet."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Aktiver posisjon"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"La nettsteder be om tilgang til posisjonen din"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Deaktiver posisjonstilgang"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Deaktiver posisjonstilgang for alle nettsteder"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Deaktiver posisjonstilgang for alle nettsteder"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Sikkerhetsinnstillinger"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Husk passord"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Lagre brukernavn og passord for nettsteder"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Nærme"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Standardzoom"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Når en side lastes inn:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Vis oversikt over siden"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Avanserte innstillinger"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Aktiver Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Programmer som utvider nettleserfunksjonaliteten"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears-innstillinger"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Liste over utvidelser"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Ingen installerte utvidelser."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Programmer som utvider nettleserfunksjonaliteten"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Nettstedsinnstillinger"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Vis avanserte innstillinger for individuelle nettsteder"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Tilbakestill til standard"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Fjern alle data fra nettleseren og tilbakestill alle innstillinger til standard"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Alle data vil bli fjernet og innstillinger vil bli tilbakestilt til standardverdier."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Bekreft"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Siden du prøver å se inneholder data som allerede er blitt sendt inn (\"POSTDATA\"). Hvis du sender dataene på nytt, kan handlingene som skjemaet på siden utførte bli gjentatt."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Ingen nettverkstilkobling"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Lasting av siden fortsetter etter gjenoppretting av forbindelsen."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Tøm logg"</string>
     <string name="browser_history" msgid="2979476257919939232">"Nylig besøkte sider"</string>
     <string name="empty_history" msgid="8738772352308207274">"Nettleserloggen er tom."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Legg til bokmerke"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Legg til"</string>
     <string name="no_database" msgid="2256698896757181084">"Ingen database!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Skriv inn nettadresse"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Søk etter eller skriv inn URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Gå"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Bokmerker og historikk"</string>
     <string name="attention" msgid="3473639060042811244">"Obs"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Kan ikke laste ned. Kan ikke fastsette størrelsen på filen."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Nedlasting avbrutt. Den kan ikke gjenopptas."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.no/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Søk på nettet"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Tillat lagring"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Nettsiden under ønsker å lagre informasjon på datamaskinen ved hjelp av Gears."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Få tilgang til plassering"</string>
-    <string name="location_message" msgid="1729456751935683242">"Dette nettstedet vil ha tilgang til plasseringen din."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Lag snarvei"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Dette nettstedet vil lage en snarvei til denne siden på startsiden din."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Tabellen under viser rettighetene du har gitt til hver side som har prøvd å bruke Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Gears filplukker"</string>
-    <string name="image_message" msgid="5450245866521896891">"Valgt bilde"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears-innstillinger"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Les nettstedets personvernspolicy for å se hvordan informasjonen vil bli brukt."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Tillat lokal lagring"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Denne siden kan lagre informasjon i telefonen"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Denne siden kan ikke lagre informasjon i telefonen"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Tillat deteksjon av plassering"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Siden får vite hvor du befinner deg"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Siden får ikke vite hvor du befinner deg"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Fjern denne siden fra Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Ingen rettigheter satt"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Fjern denne siden"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Alle rettigheter vil bli nullstilt, og alle data lagret av siden i telefonen vil bli slettet."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Siden vil lagre informasjon i telefonen."\n" Endre dette i:"\n" Innstillinger -&gt; Gears-innstillinger"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Siden vil aldri lagre informasjon i telefonen."\n" Endre dette i:"\n" Innstillinger -&gt; Gears-innstillinger"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Siden får ikke vite hvor du befinner deg."\n" Endre dette i:"\n" Innstillinger -&gt; Gears-innstillinger"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Siden vil ikke få vite hvor du befinner deg."\n" Endre dette i:"\n" Innstillinger -&gt; Gears-innstillinger"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Snarvei opprettet"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Tillat aldri"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Avbryt"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Aldri tillat denne snarveien"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Avbryt"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Bruk"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Avbryt"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Avbryt"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"bane:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Ingen fil valgt"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Én fil valgt"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"valgte filer"</string>
-    <string name="remove" msgid="7820112494467011374">"Fjern"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Lokal lagring"</string>
-    <string name="allowed" msgid="1599514934221911624">"Tillatt"</string>
-    <string name="denied" msgid="7470209521858372968">"Nektet"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Ukjent dialogtype"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Nettleserlageret er fullt"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Klikk for å frigjøre plass."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Fjern lagrede data"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Fjern alle databaser tilknyttet dette nettstedet"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Fjern lagrede data"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Alle data som er lagret av dette nettstedet, vil bli slettet"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Fjern alle"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Avbryt"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB lagret på telefonen"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> vil vite posisjonen din"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Del"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Ikke del"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Husk"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Deaktiver posisjonstilgang"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Dette nettstedet har for tiden tilgang til posisjonen din"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Dette nettstedet har for tiden ikke tilgang til posisjonen din"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Deaktiver posisjonstilgang"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Posisjonstilgang for dette nettstedet vil bli deaktivert"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Deaktiver tilgang"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Avbryt"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Oversikt"</string>
 </resources>
diff --git a/res/values-nl/arrays.xml b/res/values-nl/arrays.xml
new file mode 100644
index 0000000..5872a9a
--- /dev/null
+++ b/res/values-nl/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Geen maximum toegestaan"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 5269143..f258634 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Browser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nieuw tabblad"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Bladwijzers"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Meest bezocht"</string>
     <string name="tab_history" msgid="1979267558744613746">"Geschiedenis"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> overeenkomsten"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> overeenkomsten"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Laden..."</string>
     <string name="page_info" msgid="4048529256302257195">"Pagina-informatie"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Pagina-informatie weergeven"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adres:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Stoppen..."</string>
     <string name="stop" msgid="5687251076030630074">"Stoppen"</string>
     <string name="reload" msgid="8585220783228408062">"Vernieuwen"</string>
+    <string name="back" msgid="8414603107175713668">"Terug"</string>
     <string name="forward" msgid="4288210890526641577">"Volgende"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Annuleren"</string>
     <string name="location" msgid="969988560160364559">"Locatie"</string>
     <string name="name" msgid="5990326151488445481">"Naam"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Bladwijzer"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Bladwijzer toevoegen"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Bladwijzer bewerken"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Snelkoppeling naar startpagina toevoegen"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Openen"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Bladwijzer verwijderen"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Verwijderen uit bladwijzers"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Uit geschiedenis verwijderen"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Instellen als startpagina"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Opgeslagen in bladwijzers."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"De startpagina is ingesteld"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Bladwijzer moet een naam hebben."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Bladwijzers moeten een locatie hebben."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Kan geen lege bladwijzer maken."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL is ongeldig."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Verwijderen"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Bladwijzer voor laatst weergegeven pagina"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniatuurweergave"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Lijstweergave"</string>
     <string name="current_page" msgid="7510129573681663135">"van "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Bladwijzer \'<xliff:g id="BOOKMARK">%s</xliff:g>\' wordt verwijderd."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Openen in een nieuw venster"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Startpagina instellen"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Pagina\'s automatisch laten passen"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Webpagina\'s zo indelen dat deze op het scherm passen"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Alleen in liggende stand"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Pagina\'s altijd lezen in de brede, liggende schermstand"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Privacyinstellingen"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Cache wissen"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Alle pagina-inhoud in cache verwijderen"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"De cache wordt gewist."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Lokaal opgeslagen inhoud en databases wissen"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Lokaal opgeslagen inhoud en databases worden gewist."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Alle cookiegegevens wissen"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Alle browsercookies wissen"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Alle cookies worden gewist."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Wachtwoorden wissen"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Alle opgeslagen wachtwoorden wissen"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Alle opgeslagen wachtwoorden worden gewist."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Locatie inschakelen"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Sites toestaan om toegang te vragen tot uw locatie"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Locatietoegang ongedaan maken"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Locatietoegang voor alle websites ongedaan maken"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Locatietoegang voor alle websites ongedaan maken"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Beveiligingsinstellingen"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Wachtwoorden onthouden"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Gebruikersnamen en wachtwoorden voor websites opslaan"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Dichtbij"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Standaardzoom"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Wanneer een pagina wordt geladen:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Overzicht van de pagina weergeven"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Geavanceerde instellingen"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Gears inschakelen"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Toepassingen die de functionaliteit van de browser vergroten"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Instellingen van Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lijst met invoegtoepassingen"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Geen invoegtoepassingen geïnstalleerd."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Toepassingen die de functionaliteit van de browser vergroten"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Website-instellingen"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Geavanceerde instellingen weergeven voor afzonderlijke websites"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Standaardinstellingen herstellen"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Alle browsergegevens wissen en alle standaardinstellingen herstellen"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Alle browsergegevens worden gewist en de standaardinstellingen worden hersteld."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Bevestigen"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"De pagina die u probeert te openen, bevat gegevens die al verzonden zijn (\'POSTDATA\'). Als u de gegevens opnieuw verzendt, wordt elke actie herhaald die het formulier op de pagina heeft uitgevoerd (zoals een zoekopdracht of online aanschaf)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Geen netwerkverbinding"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"De pagina wordt verder geladen zodra de verbinding is hersteld."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Geschiedenis wissen"</string>
     <string name="browser_history" msgid="2979476257919939232">"Onlangs bezochte pagina\'s"</string>
     <string name="empty_history" msgid="8738772352308207274">"Browsergeschiedenis is leeg."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Bladwijzer toevoegen…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Toevoegen"</string>
     <string name="no_database" msgid="2256698896757181084">"Geen database."</string>
-    <string name="search_hint" msgid="3385577802557697397">"Typ het webadres"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Zoek of typ de URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Ga"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Bladwijzers en webgeschiedenis"</string>
     <string name="attention" msgid="3473639060042811244">"Opgelet"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Kan niet downloaden. De grootte van het item kan niet worden vastgesteld."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Download is onderbroken. Deze kan niet worden voortgezet."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Zoeken op internet"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Opslag toestaan"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Deze website wil informatie opslaan op uw telefoon."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Toegang tot uw locatie"</string>
-    <string name="location_message" msgid="1729456751935683242">"Deze website wil toegang hebben tot uw locatie."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Een snelkoppeling maken"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Deze website wil een snelkoppeling naar deze pagina maken op uw startscherm."</string>
-    <string name="settings_message" msgid="6171686603006325199">"De onderstaande tabel geeft de toestemming weer die u heeft verleend aan elke site die Gears heeft geprobeerd te gebruiken."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Bestandenkiezer"</string>
-    <string name="image_message" msgid="5450245866521896891">"Gekozen afbeelding"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Instellingen van Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"U kunt het privacybeleid van de site raadplegen voor meer informatie over hoe uw locatie wordt gebruikt."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Lokale opslag toestaan"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Deze site kan informatie opslaan op uw telefoon"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Deze site kan geen informatie op uw telefoon opslaan"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Locatiedetectie toestaan"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Deze site kan uw huidige locatie lezen"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Deze site kan uw huidige locatie niet lezen"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Deze site verwijderen uit Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Geen machtigingen ingesteld"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Deze site verwijderen"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Alle machtigingen worden gewist en eventuele gegevens die op uw telefoon zijn opgeslagen door de site, worden verwijderd."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Deze site slaat informatie op deze telefoon op."\n" Wijzig deze instelling in:"\n" Instellingen -&gt; Instellingen van Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Deze site slaat nooit informatie op deze telefoon op."\n" Wijzig deze instelling in:"\n" Instellingen -&gt; Instellingen van Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Deze site heeft toegang tot uw huidige locatie."\n" Wijzig deze instelling in:"\n" Instellingen -&gt; Instellingen van Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Deze site heeft geen toegang tot uw huidige locatie."\n" Wijzig deze instelling in:"\n" Instellingen -&gt; Instellingen van Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Snelkoppeling gemaakt"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nooit toestaan"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Annuleren"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nooit toestaan"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Annuleren"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Toepassen"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Annuleren"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Annuleren"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"pad:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Er zijn geen bestanden geselecteerd"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Eén bestand geselecteerd"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"bestanden geselecteerd"</string>
-    <string name="remove" msgid="7820112494467011374">"Verwijderen"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Lokale opslag"</string>
-    <string name="allowed" msgid="1599514934221911624">"Toegestaan"</string>
-    <string name="denied" msgid="7470209521858372968">"Geweigerd"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Dialoogtype wordt niet herkend"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Browseropslag is vol"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Klik hier om ruimte vrij te maken."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Opgeslagen gegevens wissen"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Alle databases verwijderen die aan deze website zijn gekoppeld"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Opgeslagen gegevens wissen"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Alle gegevens die door deze website worden opgeslagen, worden verwijderd"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Alles wissen"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Annuleren"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB opgeslagen op uw telefoon"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> wil weten wat uw locatie is"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Delen"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Niet delen"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Onthouden"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Locatietoegang ongedaan maken"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Deze site heeft momenteel toegang tot uw locatie"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Deze site heeft momenteel geen toegang tot uw locatie"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Locatietoegang ongedaan maken"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"De locatietoegang voor deze website wordt ongedaan gemaakt"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Toegang ongedaan maken"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Annuleren"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Overzicht"</string>
 </resources>
diff --git a/res/values-pl/arrays.xml b/res/values-pl/arrays.xml
new file mode 100644
index 0000000..2bf9627
--- /dev/null
+++ b/res/values-pl/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Brak dozwolonego przydziału"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 794338c..f628078 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Internet"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nowa karta"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Zakładki"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Popularne"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historia"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"Wyników: <xliff:g id="NUMBER">%d</xliff:g>"</item>
     <item quantity="other" msgid="6616125067364315405">"Wyników: <xliff:g id="NUMBER">%d</xliff:g>"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Trwa wczytywanie..."</string>
     <string name="page_info" msgid="4048529256302257195">"Informacje o stronie"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Informacje o stronie"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adres:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Trwa zatrzymywanie…"</string>
     <string name="stop" msgid="5687251076030630074">"Zatrzymaj"</string>
     <string name="reload" msgid="8585220783228408062">"Odśwież"</string>
+    <string name="back" msgid="8414603107175713668">"Wstecz"</string>
     <string name="forward" msgid="4288210890526641577">"Dalej"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Anuluj"</string>
     <string name="location" msgid="969988560160364559">"Adres"</string>
     <string name="name" msgid="5990326151488445481">"Nazwa"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Utwórz zakładkę"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Dodaj zakładkę"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Edytuj zakładkę"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Dodaj skrót do strony głównej"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Otwórz"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Usuń zakładkę"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Usuń z zakładek"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Usuń z historii"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Ustaw jako stronę główną"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Zapisano na liście zakładek."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Strona główna została ustawiona"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Zakładka musi mieć nazwę."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Zakładka musi zawierać adres."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Nie można utworzyć pustej zakładki."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Adres URL jest nieprawidłowy."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Usuń"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Dodaj do zakładek ostatnio wyświetlaną stronę"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Widok miniatur"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Widok listy"</string>
     <string name="current_page" msgid="7510129573681663135">"z "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Zakładka „<xliff:g id="BOOKMARK">%s</xliff:g>” zostanie usunięta."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Otwórz w nowym oknie"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Ustaw stronę główną"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Autodopasowanie stron"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Formatuj strony WWW, aby mieściły się na ekranie"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Tylko widok poziomy"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Zawsze czytaj strony w szerszej, poziomej orientacji ekranu"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Ustawienia prywatności"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Wyczyść pamięć podręczną"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Usuń całą zawartość stron z pamięci podręcznej"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Pamięć podręczna zostanie wyczyszczona."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Wyczyść zawartość lokalnej pamięci podręcznej i baz danych"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Zawartość lokalnej pamięci podręcznej i baz danych zostanie wyczyszczona."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Wyczyść wszystkie pliki cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Wyczyść pliki cookie przeglądarki"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Wszystkie pliki cookie zostaną usunięte."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Wyczyść hasła"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Wyczyść wszystkie zapamiętane hasła"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Wszystkie zapamiętane hasła zostaną wyczyszczone."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Włącz obsługę lokalizacji"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Zezwalaj witrynom na żądanie dostępu do informacji o lokalizacji"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Udziel dostępu do informacji o lokalizacji"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Usuń dostęp wszystkich witryn do informacji o lokalizacji"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Usuń dostęp wszystkich witryn do informacji o lokalizacji"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Ustawienia zabezpieczeń"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Pamiętaj hasła"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Zapamiętuj nazwy użytkownika i hasła do stron WWW"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Duże"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Powiększenie domyślne"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Po wczytaniu strony:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Pokaż przegląd strony"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Ustawienia zaawansowane"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Włącz dodatek Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplikacje rozszerzające zakres funkcji przeglądarki"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Ustawienia dodatku Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista dodatków plug-in"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Brak zainstalowanych dodatków plug-in."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplikacje rozszerzające zakres funkcji przeglądarki"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Ustawienia witryny"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Wyświetl ustawienia zaawansowane dla poszczególnych witryn"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Przywróć wartości domyślne"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Wyczyść wszystkie dane przeglądarki i przywróć wszystkie ustawienia domyślne"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Wszystkie dane przeglądarki zostaną wyczyszczone, a ustawienia powrócą do wartości domyślnych."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Potwierdzenie"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Strona, którą próbujesz wyświetlić, zawiera dane, które już przesłano („POSTDATA”). Jeśli wyślesz te dane ponownie, wszelkie operacje wykonane przez formularz na tej stronie (np. wyszukiwanie lub zakup online) zostaną powtórzone."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Brak połączenia z siecią"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Ładowanie strony będzie kontynuowane po przywróceniu połączenia."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Wyczyść historię"</string>
     <string name="browser_history" msgid="2979476257919939232">"Ostatnio odwiedzane strony"</string>
     <string name="empty_history" msgid="8738772352308207274">"Historia przeglądarki jest pusta."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Dodaj do zakładek..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Dodaj"</string>
     <string name="no_database" msgid="2256698896757181084">"Brak bazy danych!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Wpisz adres WWW"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Wyszukaj lub wpisz adres URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Otwórz"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Zakładki i historia przeglądanych zasobów sieciowych"</string>
     <string name="attention" msgid="3473639060042811244">"Uwaga"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Pobieranie niemożliwe. Nie można ustalić rozmiaru elementu."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Pobieranie zostało przerwane. Nie można go wznowić."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Uruchamianie testów przeglądarki"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Szukaj w internecie"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Zezwól na zapis"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Ta witryna internetowa chce zapisać informacje w telefonie."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Dostęp do informacji o Twojej lokalizacji"</string>
-    <string name="location_message" msgid="1729456751935683242">"Ta witryna internetowa chce uzyskać dostęp do informacji o Twojej lokalizacji."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Utwórz skrót"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Ta witryna internetowa chce utworzyć skrót do tej strony na Twoim ekranie głównym."</string>
-    <string name="settings_message" msgid="6171686603006325199">"W poniższej tabeli przedstawiono uprawnienia udzielone każdej z witryn próbujących użyć dodatku Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Wybór plików"</string>
-    <string name="image_message" msgid="5450245866521896891">"Wybrany obraz"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Ustawienia dodatku Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Przeczytaj zasady zachowania poufności informacji witryny, aby dowiedzieć się, jak będą użyte informacje o twojej lokalizacji."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Zezwól na zapis lokalnie"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Ta witryna może zapisać informacje w telefonie"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Ta witryna nie może zapisać informacji w telefonie"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Zezwól na wykrycie lokalizacji"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Ta witryna może odczytać informacje o Twojej bieżącej lokalizacji"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Ta witryna nie może odczytać informacji o Twojej bieżącej lokalizacji"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Usuń tę witrynę z dodatku Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Brak ustawionych pozwoleń"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Usuń tę witrynę"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Wszystkie pozwolenia zostaną wyczyszczone, a wszelkie dane zapisane w telefonie przez tę witrynę zostaną usunięte."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Ta witryna zapisze informacje w tym telefonie."\n" Zmień to ustawienie w menu:"\n" Ustawienia -&gt; Ustawienia dodatku Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Ta witryna nigdy nie zapisze informacji w tym telefonie."\n" Zmień to ustawienie w menu:"\n" Ustawienia -&gt; Ustawienia dodatku Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Ta witryna może uzyskać dostęp do informacji o Twojej bieżącej lokalizacji."\n" Zmień to ustawienie w menu:"\n" Ustawienia -&gt; Ustawienia dodatku Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Ta witryna nie uzyska dostępu do informacji o Twojej bieżącej lokalizacji."\n" Zmień to ustawienie w menu:"\n" Ustawienia -&gt; Ustawienia dodatku Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Skrót został utworzony"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nigdy nie zezwalaj"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Anuluj"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nigdy nie zezwalaj"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Anuluj"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Zastosuj"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Anuluj"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Anuluj"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"ścieżka:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Nie wybrano żadnych plików"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Wybrano jeden plik"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"plików wybrano"</string>
-    <string name="remove" msgid="7820112494467011374">"Usuń"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Pamięć lokalna"</string>
-    <string name="allowed" msgid="1599514934221911624">"Zezwolono"</string>
-    <string name="denied" msgid="7470209521858372968">"Odmówiono"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Nierozpoznany typ okna dialogowego"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Pamięć przeglądarki jest pełna"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Kliknij, aby zwolnić miejsce."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Wyczyść zapisane dane"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Usuń wszystkie bazy danych powiązane z tą witryną"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Wyczyść zapisane dane"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Wszystkie dane zapisane przez tę witrynę zostaną usunięte"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Wyczyść wszystko"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Anuluj"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Liczba MB danych zapisanych w telefonie"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"Witryna <xliff:g id="WEBPAGE">%s</xliff:g> chce uzyskać informacje o Twojej lokalizacji"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Udostępnij"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Nie udostępniaj"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Zapamiętaj"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Udziel dostępu do informacji o lokalizacji"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Ta witryna ma obecnie dostęp do informacji o Twojej lokalizacji"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Ta witryna nie ma obecnie dostępu do informacji o Twojej lokalizacji"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Udziel dostępu do informacji o lokalizacji"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Dostęp tej witryny do informacji o lokalizacji zostanie usunięty"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Usuń dostęp"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Anuluj"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Widok ogólny"</string>
 </resources>
diff --git a/res/values-pt-rPT/arrays.xml b/res/values-pt-rPT/arrays.xml
new file mode 100644
index 0000000..7f3d759
--- /dev/null
+++ b/res/values-pt-rPT/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Nenhuma quota permitida"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 9ff2519..30bee32 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Browser"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Novo separador"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Marcadores"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Os mais visitados"</string>
     <string name="tab_history" msgid="1979267558744613746">"Histórico"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> correspondências"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> correspondências"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"A carregar..."</string>
     <string name="page_info" msgid="4048529256302257195">"Informações da página"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Ver informações da página"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Endereço:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"A interromper..."</string>
     <string name="stop" msgid="5687251076030630074">"Parar"</string>
     <string name="reload" msgid="8585220783228408062">"Actualizar"</string>
+    <string name="back" msgid="8414603107175713668">"Anterior"</string>
     <string name="forward" msgid="4288210890526641577">"Avançar"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Cancelar"</string>
     <string name="location" msgid="969988560160364559">"Local"</string>
     <string name="name" msgid="5990326151488445481">"Nome"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Adicionar aos marcadores"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Adicionar marcador"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Editar marcador"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Adicionar atalho à página inicial"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Abrir"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Eliminar marcador"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Remover dos marcadores"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Remover do histórico"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Definir como página inicial"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Guardado nos marcadores"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Página inicial definida"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Os marcadores têm de ter um nome."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"O marcador tem de ter uma localização."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Não é possível criar um marcador vazio."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"O URL não é válido."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Eliminar"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Adicionar aos marcadores a última página visualizada"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Vista de miniatura"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Vista de lista"</string>
     <string name="current_page" msgid="7510129573681663135">"de "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"O marcador \"<xliff:g id="BOOKMARK">%s</xliff:g>\" será eliminado."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Abrir numa janela nova"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Definir página inicial"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Ajustar páginas automaticamente"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Formatar páginas Web para se ajustarem ao ecrã"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Apresentação apenas na horizontal"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Ler sempre as páginas na orientação horizontal do ecrã (mais larga)"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Definições de privacidade"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Limpar cache"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Eliminar todo o conteúdo de páginas em cache"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"A cache será limpa."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Limpar bases de dados e conteúdos colocados em cache localmente"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"As bases de dados e os conteúdos colocados em cache localmente serão limpos."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Limpar todos os dados de cookies"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Limpar todos os cookies do browser"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Todos os cookies serão limpos."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Limpar palavras-passe"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Limpar todas as palavras-passe guardadas"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Todas as palavras-passe guardadas serão limpas."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Activar localização"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Permitir que os sites solicitem acesso à sua localização"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Limpar acesso à localização"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Limpar acesso à localização para todos os Web sites"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Limpar o acesso à localização para todos os Web sites"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Definições de segurança"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Lembrar palavras-passe"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Guardar nomes de utilizador e palavras-passe de Web sites"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Fechar"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Zoom predefinido"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Quando uma página é carregada:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Mostrar descrição da página"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Definições avançadas"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Activar o Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplicações que aumentam a funcionalidade do browser"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Definições do Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista de plug-ins"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Nenhum plug-in instalado."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplicações que aumentam a funcionalidade do browser"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Definições de Web site"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Ver definições avançadas para Web sites individuais"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Repor as predefinições"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Limpar todos os dados do browser e repor todas as predefinições"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Todos os dados do browser serão limpos e as definições serão repostas para os valores predefinidos."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Confirmar"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"A página que está a tentar visualizar contém dados enviados anteriormente (\"REGISTDADOS\"). Se reenviar os dados, qualquer acção já tomada pelo formulário da página (como uma pesquisa ou compra on-line) será repetida."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Sem ligação de rede"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"O carregamento desta página será retomado depois do restabelecimento da ligação."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Limpar histórico"</string>
     <string name="browser_history" msgid="2979476257919939232">"Páginas visitadas recentemente"</string>
     <string name="empty_history" msgid="8738772352308207274">"O histórico do browser está vazio."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Adicionar marcador..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Adicionar"</string>
     <string name="no_database" msgid="2256698896757181084">"Não existe base de dados!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Escreva o endereço Web"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Pesquisar ou escrever URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Ir"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Marcadores e histórico da Web"</string>
     <string name="attention" msgid="3473639060042811244">"Atenção"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Não é possível transferir porque o tamanho do item é indeterminado."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"A transferência foi interrompida e não pode ser retomada."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Teste de browser"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Pesquisar na Web"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Permitir armazenamento"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Este Web site pretende armazenar informações no seu telefone."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Aceder à sua localização"</string>
-    <string name="location_message" msgid="1729456751935683242">"Este Web site pretende ter acesso à sua localização."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Criar um atalho"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Este Web site pretende criar um atalho para esta página no seu ecrã inicial."</string>
-    <string name="settings_message" msgid="6171686603006325199">"A tabela seguinte mostra as permissões concedidas a cada site que tenha tentado utilizar o Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Seleccionador de ficheiros"</string>
-    <string name="image_message" msgid="5450245866521896891">"Imagem escolhida"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Definições do Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Leia a política de privacidade do site para saber que uso será dado à sua localização."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Permitir armazenamento local"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Este site pode guardar informações no seu telefone"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Este site não consegue guardar informações no seu telefone"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Permitir detecção de localização"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Este site não consegue ler a sua localização actual"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Este site não consegue ler a sua localização actual"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Remover este site do Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Sem permissões definidas"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Remover este site"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Todas as permissões serão limpas e quaisquer dados armazenados no telefone pelo site serão eliminados."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Este site irá armazenar informações neste telefone. "\n" Altere esta definição em:"\n" Definições -&gt; Definições do Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Este site nunca irá armazenar informações neste telefone. "\n" Altere esta definição em:"\n" Definições -&gt; Definições do Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Este site tem acesso à sua localização actual. "\n" Altere esta definição em: "\n" Definições -&gt; Definições do Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Este site não irá aceder à sua localização actual."\n" Altere esta definição em: "\n" Definições -&gt; Definições do Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Atalho criado"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nunca permitir"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Cancelar"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nunca permitir"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Cancelar"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Aplicar"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Cancelar"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Cancelar"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"caminho:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Nenhum ficheiro seleccionado"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Um ficheiro seleccionado"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"ficheiros seleccionados"</string>
-    <string name="remove" msgid="7820112494467011374">"Remover"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Armazenamento local"</string>
-    <string name="allowed" msgid="1599514934221911624">"Permitido"</string>
-    <string name="denied" msgid="7470209521858372968">"Negado"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tipo de diálogo desconhecido"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Espaço de armazenamento do browser cheio"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Clique para libertar espaço."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Limpar dados armazenados"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Remover todas as bases de dados associadas a este Web site"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Limpar dados armazenados"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Todos os dados armazenados por este Web site serão limpos"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Limpar tudo"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Cancelar"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB armazenados no telefone"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> pretende conhecer a sua localização"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Partilhar"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Não partilhar"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Lembrar"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Limpar acesso à localização"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Actualmente este site pode aceder à sua localização"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Actualmente este site não pode aceder à sua localização"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Limpar acesso à localização"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"O acesso à localização para este Web site será limpo"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Limpar acesso"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Cancelar"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Visão geral"</string>
 </resources>
diff --git a/res/values-pt/arrays.xml b/res/values-pt/arrays.xml
new file mode 100644
index 0000000..7f3d759
--- /dev/null
+++ b/res/values-pt/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Nenhuma quota permitida"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index cf4a801..a3e1acd 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Navegador"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Nova guia"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Favoritos"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Mais visitados"</string>
     <string name="tab_history" msgid="1979267558744613746">"Histórico"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> correspondências"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> correspondências"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Carregando..."</string>
     <string name="page_info" msgid="4048529256302257195">"Informações da página"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Visualizar informações da página"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Endereço:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Parando…"</string>
     <string name="stop" msgid="5687251076030630074">"Parar"</string>
     <string name="reload" msgid="8585220783228408062">"Atualizar"</string>
+    <string name="back" msgid="8414603107175713668">"Voltar"</string>
     <string name="forward" msgid="4288210890526641577">"Encaminhar"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Cancelar"</string>
     <string name="location" msgid="969988560160364559">"Local"</string>
     <string name="name" msgid="5990326151488445481">"Nome"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Favorito"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Adicionar favorito"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Editar favorito"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Adicionar atalho à Página inicial"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Abrir"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Excluir favorito"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Remover dos favoritos"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Remover do histórico"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Definir como página inicial"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Salvo nos favoritos."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Página inicial definida"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"O favorito precisa ter um nome."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"O favorito precisa ter um local."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Não é possível criar um favorito vazio."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"O URL não é válido."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Excluir"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Adicionar última página visualizada aos favoritos"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Visualização em miniatura"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Visualização em lista"</string>
     <string name="current_page" msgid="7510129573681663135">"de "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"O favorito \"<xliff:g id="BOOKMARK">%s</xliff:g>\" será excluído."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Abrir em uma nova janela"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Definir a página inicial"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Ajustar páginas automaticamente"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Formatar páginas da web para se ajustarem à tela"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Somente exibição no modo paisagem"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Sempre ler as páginas na orientação mais larga, com a tela no modo paisagem"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Configurações de privacidade"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Limpar cache"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Excluir todo conteúdo da página armazenado em cache"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"O cache será limpo."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Limpar conteúdo e bancos de dados armazenados localmente em cache"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"O conteúdo e os bancos de dados armazenados localmente em cache serão limpos."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Limpar todos os dados de cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Limpar todos os cookies do navegador"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Todos os cookies serão limpos."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Limpar senhas"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Limpar todas as senhas salvas"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Todas as senhas salvas serão excluídas."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Ativar localização"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Permitir que os sites solicitem acesso à sua localização"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Limpar acesso à localização"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Limpar acesso à localização para todos os sites"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Limpar acesso à localização para todos os sites"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Configurações de segurança"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Lembrar senhas"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Salvar nomes de usuário e senhas de sites"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Perto"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Zoom padrão"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Quando uma página é carregada:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Mostrar visão geral da página"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Configurações avançadas"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Ativar o Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Aplicativos que estendem a funcionalidade do navegador"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Configurações do Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista de plug-ins"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Nenhum plug-in instalado."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Aplicativos que estendem a funcionalidade do navegador"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Configurações do site"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Visualizar configurações avançadas para sites individuais"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Redefinir para o padrão"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Limpar dados do navegador e redefinir as configurações para o padrão"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Todos os dados do navegador serão limpos e as configurações voltarão para os valores padrão."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Confirmar"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"A página que você está tentando visualizar contém dados já enviados (\"POSTDATA\"). Se você reenviar os dados, qualquer ação executada pelo formulário na página (como uma pesquisa ou uma compra on-line) será repetida."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Nenhuma conexão de rede"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"A página continuará a carregar após a restauração da conexão."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Limpar histórico"</string>
     <string name="browser_history" msgid="2979476257919939232">"Páginas visitadas recentemente"</string>
     <string name="empty_history" msgid="8738772352308207274">"O histórico do navegador está vazio."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Adicionar favorito…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Adicionar"</string>
     <string name="no_database" msgid="2256698896757181084">"Nenhum banco de dados!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Digitar endereço da web"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Pesquisar ou digitar URL"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Ir"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Favoritos e histórico da web"</string>
     <string name="attention" msgid="3473639060042811244">"Atenção"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Não é possível fazer o download. O tamanho do item não pode ser determinado."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Download interrompido. Não é possível retomar."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Executador de teste do navegador"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Pesquisar na web"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Permitir o armazenamento"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Este site deseja armazenar informações no seu telefone."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Acesse o seu local"</string>
-    <string name="location_message" msgid="1729456751935683242">"Este site deseja ter acesso ao seu local."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Criar um atalho"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Este site deseja criar um atalho para esta página na sua tela inicial."</string>
-    <string name="settings_message" msgid="6171686603006325199">"A tabela abaixo mostra as permissões concedidas por você a cada site que tentou usar o Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Selecionador de arquivos"</string>
-    <string name="image_message" msgid="5450245866521896891">"Imagem escolhida"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Configurações do Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Leia a política de privacidade do site para ver como o seu local será usado."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Permitir armazenamento local"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Este site pode salvar informações no seu telefone."</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Este site não pode salvar informações no seu telefone."</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Permitir detecção de local"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Este site pode ler o seu local atual."</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Este site não pode ler o seu local atual"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Remover este site do Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Nenhuma permissão definida"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Remover este site"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Todas as permissões serão limpas e quaisquer dados armazenados no seu telefone pelo site serão excluídos."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Este site armazenará informações neste telefone."\n" Altere esta configuração em:"\n" Configurações -&gt; Configurações do Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Este site nunca armazenará informações neste telefone."\n" Altere esta configuração em:"\n" Configurações -&gt; Configurações do Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Este site pode acessar o seu local atual."\n" Altere esta configuração em:"\n" Configurações -&gt; Configurações do Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Este site não acessará o seu local atual."\n" Altere esta configuração em:"\n" Configurações -&gt; Configurações do Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Atalho criado"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Nunca permitir"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Cancelar"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Nunca permitir"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Cancelar"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Aplicar"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Cancelar"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Cancelar"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"caminho:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Nenhum arquivo selecionado"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Um arquivo selecionado"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"arquivos selecionados"</string>
-    <string name="remove" msgid="7820112494467011374">"Remover"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Armazenamento local"</string>
-    <string name="allowed" msgid="1599514934221911624">"Permitido"</string>
-    <string name="denied" msgid="7470209521858372968">"Negado"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tipo de caixa de diálogo não reconhecido"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Armazenamento do navegador cheio"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Clique para liberar espaço."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Limpar dados armazenados"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Remover todos os bancos de dados associados a esse site"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Limpar dados armazenados"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Todos os dados armazenados por este site serão excluídos"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Limpar tudo"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Cancelar"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB armazenados no seu telefone"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> quer saber a sua localização"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Compartilhar"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Não compartilhar"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Lembrar"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Limpar acesso à localização"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Este site pode acessar a sua localização no momento"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Este site não pode acessar a sua localização no momento"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Limpar acesso à localização"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"O acesso à localização será limpo para este site"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Limpar acesso"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Cancelar"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Visão geral"</string>
 </resources>
diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml
new file mode 100644
index 0000000..b3a5146
--- /dev/null
+++ b/res/values-ru/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Квота не назначена"</item>
+    <item msgid="7374272188672967690">"5 МБ"</item>
+    <item msgid="8699352701856136738">"10 МБ"</item>
+    <item msgid="2018822431469084862">"30 МБ"</item>
+    <item msgid="5383642976774534074">"100 МБ"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 12dbd67..4e8bd2e 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Браузер"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Новая вкладка"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Закладки"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Часто посещаемые"</string>
     <string name="tab_history" msgid="1979267558744613746">"История"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"Соответствий: <xliff:g id="NUMBER">%d</xliff:g>"</item>
     <item quantity="other" msgid="6616125067364315405">"Соответствий: <xliff:g id="NUMBER">%d</xliff:g>"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Загрузка…"</string>
     <string name="page_info" msgid="4048529256302257195">"Информация о странице"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Просмотр информации о странице"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Адрес:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Остановка..."</string>
     <string name="stop" msgid="5687251076030630074">"Стоп"</string>
     <string name="reload" msgid="8585220783228408062">"Обновить"</string>
+    <string name="back" msgid="8414603107175713668">"Назад"</string>
     <string name="forward" msgid="4288210890526641577">"Переслать"</string>
     <string name="save" msgid="5922311934992468496">"ОК"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Отмена"</string>
     <string name="location" msgid="969988560160364559">"Место"</string>
     <string name="name" msgid="5990326151488445481">"Имя"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Добавить в закладки"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Добавить закладку"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Изменить закладку"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Добавить ярлык на главную страницу"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Открыть"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Удалить закладку"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Удалить из закладок"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Удалить из истории"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Сделать главной страницей"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Сохранено в закладках."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Главная страница установлена"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Необходимо указать имя закладки."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Необходимо указать место закладки."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Невозможно создать пустую закладку."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL недействителен."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Удалить"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Добавить в закладки последнюю просмотренную страницу"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Уменьшенное изображение"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"В виде списка"</string>
     <string name="current_page" msgid="7510129573681663135">"из "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Закладка \"<xliff:g id="BOOKMARK">%s</xliff:g>\" будет удалена."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Открыть в новом окне"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Выбрать главную страницу"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Подгонять страницы"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Подгонять веб-страницы под размер экрана"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Только альбомная ориентация"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Всегда показывать страницы в альбомной ориентации"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Настройки конфиденциальности"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Очистить кэш"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Удалить все кэшированное содержание страницы"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Кэш будет очищен."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Очистить содержание и базы данных, сохраненные локально"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Содержание и базы данных, сохраненные локально, будут очищены"</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Очистить все данные cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Удалить все cookie браузера"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Все cookie будут удалены."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Очистить пароли"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Удалить все сохраненные пароли"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Все сохраненные пароли будут удалены."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Включить местоположение"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Разрешить сайтам запрашивать данные доступа к местоположению"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Удалить данные доступа к местоположению"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Удалить данные доступа к местоположению для всех сайтов"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Удалить данные доступа к местоположению для всех сайтов"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Настройки безопасности"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Сохранять пароли"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Сохранять имена пользователей и пароли для веб-сайтов"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Закрыть"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Масштаб по умолчанию"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"При загрузке страницы:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Показать общую информацию о странице"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Расширенные настройки"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Включить Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Приложения, расширяющие возможности браузера"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Настройки Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Список плагинов"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Нет установленных плагинов."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Приложения, расширяющие возможности браузера"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Настройки веб-сайта"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Просмотреть дополнительные настройки для отдельных сайтов"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Восстановить настройки по умолчанию"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Очистить все данные браузера и восстановить все настройки по умолчанию"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Все данные браузера будут удалены, настройки по умолчанию будут восстановлены."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Подтверждение"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Страница, которую вы пытаетесь просмотреть, содержит уже отправленные данные (\"POSTDATA\"). Если отправить их еще раз, произойдет повтор всех действий, которые форма выполнила на странице (например, поиск или покупка через Интернет)."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Сетевое подключение отсутствует"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Загрузка страницы продолжится после восстановления соединения."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Очистить историю"</string>
     <string name="browser_history" msgid="2979476257919939232">"Недавно посещенные страницы"</string>
     <string name="empty_history" msgid="8738772352308207274">"История браузера пуста."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Добавить закладку…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Добавить"</string>
     <string name="no_database" msgid="2256698896757181084">"База данных отсутствует!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Укажите адрес в Интернете"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Введите условия поиска или URL-адрес"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Поиск"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Закладки и просмотренные страницы"</string>
     <string name="attention" msgid="3473639060042811244">"Внимание"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Загрузка невозможна. Размер файла не определен."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Загрузка прервана и не может быть возобновлена."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Тестирование браузера"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Поиск в Интернете"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Разрешить сохранение"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Этот веб-сайт пытается сохранить данные на вашем телефоне."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Доступ к вашему местоположению"</string>
-    <string name="location_message" msgid="1729456751935683242">"Этот веб-сайт пытается получить доступ к данным о вашем местоположении."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Создать ярлык"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Этот веб-сайт пытается создать ярлык данной страницы на главном экране телефона."</string>
-    <string name="settings_message" msgid="6171686603006325199">"В таблице ниже показаны разрешения, установленные вами для всех сайтов, пытавшихся использовать Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Выбор файлов"</string>
-    <string name="image_message" msgid="5450245866521896891">"Выбранное изображение"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Настройки Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Ознакомьтесь с политикой конфиденциальности сайта, чтобы узнать, как будет использоваться информация о вашем местоположении."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Разрешить сохранение в памяти"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Этот сайт может сохранять данные на вашем телефоне"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Этот сайт не может сохранять данные на вашем телефоне"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Разрешить определение местоположения"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"У этого сайта есть доступ к данным о вашем местоположении"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"У этого сайта нет доступа к данным о вашем местоположении"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Удалить этот сайт из Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Разрешения не заданы"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Удалить этот сайт"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Все разрешения будут сняты, а все данные, сохраненные этим сайтом на вашем телефоне, будут удалены."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Этот сайт будет сохранять данные на вашем телефоне."\n" Чтобы изменить эту настройку, выберите"\n" Настройки -&gt; Настройки Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Этот сайт не будет сохранять данные на вашем телефоне."\n" Чтобы изменить эту настройку, выберите"\n" Настройки -&gt; Настройки Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"У этого сайта есть доступ к данным о вашем местоположении."\n" Чтобы изменить эту настройку, выберите"\n" Настройки -&gt; Настройки Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Этот веб-сайт не будет пытаться получить доступ к данным о вашем местоположении."\n" Чтобы изменить эту настройку, выберите"\n" Настройки -&gt; Настройки Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Ярлык создан"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Не разрешать"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"ОК"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Отмена"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Не разрешать"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"ОК"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Отмена"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Применить"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Отмена"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"ОК"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Отмена"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"путь:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Файлы не выбраны"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Выбран один файл"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"файл(ов) выбрано"</string>
-    <string name="remove" msgid="7820112494467011374">"Удалить"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Сохранение в памяти"</string>
-    <string name="allowed" msgid="1599514934221911624">"Разрешенные"</string>
-    <string name="denied" msgid="7470209521858372968">"Запрещено"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Неизвестный тип диалога"</string>
-    <string name="default_button" msgid="3901922329454578908">"ОК"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Память браузера переполнена"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Нажмите, чтобы освободить место."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Удалить сохраненные данные"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Удалить все базы данных, связанные с этим сайтом"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Удалить сохраненные данные"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Все данные, сохраненные этим веб-сайтом, будут удалены"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Удалить все"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Отмена"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Объем занятой памяти телефона (МБ)"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> запрашивает данные о вашем местоположении"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Отправить"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Не отправлять"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Запомнить"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Удалить данные доступа к местоположению"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Данные доступа к местоположению для этого сайта будут удалены"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Удалить данные о доступе"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Отмена"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Обзор"</string>
 </resources>
diff --git a/res/values-sv/arrays.xml b/res/values-sv/arrays.xml
new file mode 100644
index 0000000..0f5814d
--- /dev/null
+++ b/res/values-sv/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"Ingen kvot tillåts"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 9a0162a..1f1d369 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Webbläs."</string>
+    <string name="new_tab" msgid="7971857320679510529">"Ny flik"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Bokmärken"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"Mest besökta"</string>
     <string name="tab_history" msgid="1979267558744613746">"Historik"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> träffar"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> träffar"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Hämtar…"</string>
     <string name="page_info" msgid="4048529256302257195">"Sidinformation"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Visa sidinformation"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adress:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Avbryter…"</string>
     <string name="stop" msgid="5687251076030630074">"Stoppa"</string>
     <string name="reload" msgid="8585220783228408062">"Uppdatera"</string>
+    <string name="back" msgid="8414603107175713668">"Tillbaka"</string>
     <string name="forward" msgid="4288210890526641577">"Vidarebefordra"</string>
     <string name="save" msgid="5922311934992468496">"OK"</string>
     <string name="do_not_save" msgid="6777633870113477714">"Avbryt"</string>
     <string name="location" msgid="969988560160364559">"Plats"</string>
     <string name="name" msgid="5990326151488445481">"Namn"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Bokmärke"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Lägg till bokmärke"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Redigera bokmärke"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Lägg till genväg till startsidan"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Öppna"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Ta bort bokmärke"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Ta bort från bokmärken"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Ta bort från historiken"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Använd som startsida"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Bokmärke sparat."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Startsida har angetts"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Du måste ange ett namn på bokmärket."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Du måste ange en plats för bokmärket."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Det går inte att skapa tomma bokmärken."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"Webbadressen är ogiltig."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Ta bort"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Skapa bokmärke för den senast visade sidan"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Miniatyrvy"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Listvy"</string>
     <string name="current_page" msgid="7510129573681663135">"från "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Bokmärket <xliff:g id="BOOKMARK">%s</xliff:g> tas bort."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Öppna i nytt fönster"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Ange startsida"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Autoanpassa sidor"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Anpassa webbsidor efter skärmen"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Endast i liggande vy"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Läs alltid sidor i bred, liggande vy"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Sekretessinställningar"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Rensa cacheminne"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Ta bort allt cachelagrat sidinnehåll"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Cacheminnet kommer att rensas."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Ta bort innehåll och databaser som cachelagrats lokalt"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Innehåll och databaser som cachelagrats lokalt tas bort."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Ta bort alla cookie-data"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Ta bort alla webbläsarens cookies"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Alla cookies tas bort."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Ta bort lösenord"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Ta bort alla sparade lösenord"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Alla sparade lösenord tas bort."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Aktivera plats"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Tillåt att webbplatser begär åtkomst till din plats"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Ta bort platsåtkomst"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Ta bort platsåtkomst för alla webbplatser"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Ta bort platsåtkomst för alla webbplatser"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Säkerhetsinställningar"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Kom ihåg lösenord"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Spara användarnamn och lösenord på webbplatser"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Stäng"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Standardinställning för zoom"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"När en sida hämtas:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Visa översikt över sidan"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Avancerade inställningar"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Aktivera Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Program som ger utökade webbläsarfunktioner"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Inställningar för Gears"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Lista över insticksprogram"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Inga insticksprogram har installerats."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Program som ger utökade webbläsarfunktioner"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Webbplatsinställningar"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Visa avancerade inställningar för enskilda webbplatser"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Återställ standardinställn."</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Ta bort alla data i webbläsaren och återställ standardinställningarna"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Alla data i webbläsaren tas bort och standardinställningarna återställs."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Bekräfta"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Sidan du försöker öppna innehåller data som redan har skickats (POSTDATA). Om du skickar uppgifterna igen kommer alla åtgärder i formuläret på sidan (till exempel sökningar eller onlineköp) att utföras en gång till."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Ingen nätverksanslutning"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Sidan fortsätter att läsas in när anslutningen har återställts."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Rensa historik"</string>
     <string name="browser_history" msgid="2979476257919939232">"Nyligen besökta sidor"</string>
     <string name="empty_history" msgid="8738772352308207274">"Det finns ingen webbläsarhistorik."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Lägg till bokmärke…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Lägg till"</string>
     <string name="no_database" msgid="2256698896757181084">"Ingen databas!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Ange webbadress"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Ange eller sök efter webbplats"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Kör"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Bokmärken och webbhistorik"</string>
     <string name="attention" msgid="3473639060042811244">"Obs!"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"Det går inte att hämta eftersom objektets storlek inte kan avläsas."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"Hämtningen avbröts. Den kan inte återupptas."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Testprogram för webbläsaren"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Sök på webben"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Tillåt lagring"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Den här webbplatsen vill spara information i din telefon."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Få åtkomst till din plats"</string>
-    <string name="location_message" msgid="1729456751935683242">"Webbplatsen vill ha åtkomst till din plats."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Skapa en genväg"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Webbplatsen vill skapa en genväg till den här sidan på din startsida."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Tabellen nedan visar vilka behörigheter du har beviljat webbplatserna som har försökt använda Gears."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Filväljaren"</string>
-    <string name="image_message" msgid="5450245866521896891">"Vald bild"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Inställningar för Gears"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Läs webbplatsens sekretesspolicy om du vill veta hur din plats kommer att användas."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Tillåt lokal lagring"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Webbplatsen kan spara information i din telefon"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Webbplatsen kan inte spara information i din telefon"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Tillåt identifiering av plats"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Webbplatsen kan läsa din aktuella plats"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Webbplatsen kan inte läsa din aktuella plats"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Ta bort webbplatsen från Gears"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Ingen behörighet har angetts"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Ta bort webbplatsen"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Alla behörigheter och alla data som webbplatsen sparat i telefonen tas bort."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Webbplatsen sparar information på den här telefonen."\n" Ändra inställningen i:"\n" Inställningar -&gt; Inställningar för Gears"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Webbplatsen sparar aldrig information på den här telefonen."\n" Ändra inställningen i:"\n" Inställningar -&gt; Inställningar för Gears"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Webbplatsen har åtkomst till din aktuella plats."\n" Ändra inställningen i:"\n" Inställningar -&gt; Inställningar för Gears"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Webbplatsen har inte åtkomst till din aktuella plats."\n" Ändra inställningen i:"\n" Inställningar -&gt; Inställningar för Gears"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Genväg har skapats"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Tillåt aldrig"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"OK"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"Avbryt"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Tillåt aldrig"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"OK"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"Avbryt"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Tillämpa"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"Avbryt"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"OK"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"Avbryt"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"sökväg:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Inga filer har valts"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"En fil har valts"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"valda filer"</string>
-    <string name="remove" msgid="7820112494467011374">"Ta bort"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Lokal lagring"</string>
-    <string name="allowed" msgid="1599514934221911624">"Tillåts"</string>
-    <string name="denied" msgid="7470209521858372968">"Nekad"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Okänd dialogtyp"</string>
-    <string name="default_button" msgid="3901922329454578908">"OK"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Webbläsarens lagringsutrymme är fullt"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Klicka om du vill frigöra utrymme."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Ta bort sparade data"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Ta bort alla databaser som är kopplade till den här webbplatsen"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Ta bort sparade data"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Alla data som sparats på webbplatsen tas bort"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Ta bort alla"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"Avbryt"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"MB har sparats på telefonen"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> vill känna till din plats"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Dela"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Dela inte"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Kom ihåg"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Ta bort platsåtkomst"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Den här webbplatsen har för närvarande åtkomst till din plats"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Den här webbplatsen har för närvarande inte åtkomst till din plats"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Ta bort platsåtkomst"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Platsåtkomst tas bort för den här webbplatsen"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Ta bort åtkomst"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"Avbryt"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Översikt"</string>
 </resources>
diff --git a/res/values-tr/arrays.xml b/res/values-tr/arrays.xml
new file mode 100644
index 0000000..bac7d19
--- /dev/null
+++ b/res/values-tr/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"İzin verilen kota yok"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 89367af..62d4f43 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"Tarayıcı"</string>
+    <string name="new_tab" msgid="7971857320679510529">"Yeni sekme"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"Favoriler"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"En çok ziyaret edilenler"</string>
     <string name="tab_history" msgid="1979267558744613746">"Geçmiş"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> eşleşme"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> eşleşme"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"Yükleniyor…"</string>
     <string name="page_info" msgid="4048529256302257195">"Sayfa bilgileri"</string>
     <string name="page_info_view" msgid="5303490449842635158">"Sayfa bilgilerini görüntüle"</string>
     <string name="page_info_address" msgid="2222306609532903254">"Adres:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"Durduruluyor..."</string>
     <string name="stop" msgid="5687251076030630074">"Durdur"</string>
     <string name="reload" msgid="8585220783228408062">"Yenile"</string>
+    <string name="back" msgid="8414603107175713668">"Geri"</string>
     <string name="forward" msgid="4288210890526641577">"İleri"</string>
     <string name="save" msgid="5922311934992468496">"Tamam"</string>
     <string name="do_not_save" msgid="6777633870113477714">"İptal"</string>
     <string name="location" msgid="969988560160364559">"Konum"</string>
     <string name="name" msgid="5990326151488445481">"Ad"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"Favori"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"Favori ekle"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"Favorileri düzenle"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"Ana ekrana kısayol ekle"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"Aç"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"Favoriyi sil"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"Favorilerden kaldır"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"Geçmişten kaldır"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"Ana sayfa olarak ayarla"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"Favorilere kaydedildi."</string>
+    <string name="homepage_set" msgid="9127149128262321090">"Ana sayfa ayarlandı"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"Favorinin bir adı olmalıdır."</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"Favorinin bir konumu olmalıdır."</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"Boş favori oluşturulamaz."</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"URL geçerli değil."</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"Sil"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"Son görüntülenen sayfayı favori olarak işaretle"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"Küçük resim görünümü"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"Liste görünümü"</string>
     <string name="current_page" msgid="7510129573681663135">"kaynak: "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"Favori \"<xliff:g id="BOOKMARK">%s</xliff:g>\" silinecek."</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"Yeni pencerede aç"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"Ana sayfayı ayarla"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"Sayfaları otomatik sığdır"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"Web sayfalarını ekrana sığacak şekilde biçimlendir"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"Yalnızca yatay görüntüleme"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"Sayfaları her zaman daha geniş, yatay ekran yönünde oku"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"Gizlilik ayarları"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"Önbelleği temizle"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"Önbelleğe alınmış tüm sayfa içeriğini sil"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"Önbellek temizlenecek."</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"Yerel olarak önbelleğe alınmış içeriği ve veritabanlarını temizle"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"Yerel olarak önbelleğe alınmış içerik ve veritabanları silinecek."</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"Tüm çerez verilerini temizle"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"Tüm tarayıcı çerezlerini temizle"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"Tüm çerezler temizlenecek."</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"Şifreleri temizle"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"Kayıtlı tüm şifreleri temizle"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"Kayıtlı tüm şifreler temizlenecek."</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"Konumu etkinleştir"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"Sitelerin konumunuza erişmek istemesine izin verin"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"Konum erişimini temizle"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"Tüm web siteleri için konum erişimini temizle"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"Tüm web siteleri için konum erişimini temizle"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"Güvenlik ayarları"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"Şifreleri hatırla"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"Web siteleri için kullanıcı adlarını ve şifreleri kaydet"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"Kapat"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"Varsayılan zum"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"Bir sayfa yüklediğinde:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"Sayfanın önizlemesini göster"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"Gelişmiş ayarlar"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"Gears\'ı etkinleştir"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"Tarayıcınızın işlevini artıran uygulamalar"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears ayarları"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"Eklenti listesi"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"Yüklenmiş eklenti yok."</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"Tarayıcınızın işlevini artıran uygulamalar"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"Web sitesi ayarları"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"Her web sitesi için gelişmiş ayarları görüntüle"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"Varsayılana sıfırla"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"Tüm tarayıcı verilerini temizle ve tüm ayarları varsayılana sıfırla"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"Tüm tarayıcı verileri temizlenecek ve ayarlar varsayılan değerlere geri döndürülecek."</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"Doğrula"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"Görüntülemeye çalıştığınız sayfa zaten gönderilmiş veriler (\"POSTDATA\") içeriyor. Verileri tekrar gönderirseniz sayfa üzerinde yapılmış tüm işlemler (arama veya çevrimiçi satın alma gibi) tekrarlanacaktır."</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"Ağ bağlantısı yok"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"Bağlantı tekrar kurulduktan sonra sayfa yüklenmeye devam edecek."</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"Geçmişi temizle"</string>
     <string name="browser_history" msgid="2979476257919939232">"Son ziyaret edilen sayfalar"</string>
     <string name="empty_history" msgid="8738772352308207274">"Tarayıcı geçmişi boş."</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"Favori ekle..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"Ekle"</string>
     <string name="no_database" msgid="2256698896757181084">"Veritabanı yok!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"Web adresini yazın"</string>
+    <string name="search_hint" msgid="4647356319916631820">"Arayın veya URL\'yi yazın"</string>
     <string name="search_button_text" msgid="5235226933877634410">"Git"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"Favoriler ve web geçmişi"</string>
     <string name="attention" msgid="3473639060042811244">"Dikkat"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"İndirilemiyor. Öğenin boyutu belirlenemiyor."</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"İndirme işlemi kesintiye uğradı. Sürdürülemez."</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Tarayıcı Test Aracı"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"Web\'de ara"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"Depolamaya izin ver"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"Bu web sitesi telefonunuzda bilgi depolamak istiyor."</string>
-    <string name="location_prompt" msgid="226262202057302423">"Konumunuza erişin"</string>
-    <string name="location_message" msgid="1729456751935683242">"Bu web sitesi konumunuza erişmek istiyor."</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"Kısayol oluştur"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"Bu web sitesi ana ekranınızda bu sayfaya kısayol oluşturmak istiyor."</string>
-    <string name="settings_message" msgid="6171686603006325199">"Aşağıdaki tabloda Gears\'ı kullanmaya çalışan her siteye vermiş olduğunuz izinler gösterilmektedir."</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"Dosya Toplayıcı"</string>
-    <string name="image_message" msgid="5450245866521896891">"Seçilen Görsel"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears ayarları"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"Konumunuzun nasıl kullanılacağını görmek için sitenin gizlilik politikasını okuyun."</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"Yerel Depolamaya İzin Ver"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"Bu site telefonunuza bilgi kaydedebilir"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"Bu site telefonunuza bilgi kaydedemez"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"Konum Tespitine İzin Ver"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"Bu site geçerli konumunuzu okuyabilir"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"Bu site geçerli konumunuzu okuyamaz"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"Bu siteyi Gears\'tan kaldır"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"Hiçbir izin ayarlanmadı"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"Bu siteyi kaldır"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"Tüm izinler kaldırılacak ve site tarafından telefonunuzda depolanmış tüm veriler silinecek."</string>
-    <string name="storage_notification" msgid="6534213782873968255">"Bu site bu telefona bilgi depolayacak."\n" Bu ayarları şuradan değiştirin:"\n" Ayarlar -&gt; Gears Ayarları"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"Bu site bu telefona asla bilgi depolamayacak."\n" Bu ayarları şuradan değiştirin:"\n" Ayarlar -&gt; Gears Ayarları"</string>
-    <string name="location_notification" msgid="3495804750470905804">"Bu site geçerli konumunuza erişebilir."\n" Bu ayarı şuradan değiştirin: "\n" Ayarlar -&gt; Gears Ayarları"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"Bu site geçerli konumunuza erişmeyecek. "\n" Bu ayarı şuradan değiştirin:"\n" Ayarlar -&gt; Gears Ayarları"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"Kısayol oluşturuldu"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"Asla İzin Verme"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"Tamam"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"İptal"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"Asla İzin Verme"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"Tamam"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"İptal"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"Uygula"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"İptal"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"Tamam"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"İptal"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"yol:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"Seçili dosya yok"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"Bir dosya seçildi"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"dosyalar seçildi"</string>
-    <string name="remove" msgid="7820112494467011374">"Kaldır"</string>
-    <string name="local_storage" msgid="6703332885937279085">"Yerel depolama"</string>
-    <string name="allowed" msgid="1599514934221911624">"İzin Verildi"</string>
-    <string name="denied" msgid="7470209521858372968">"Reddedildi"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"Tanınmayan iletişim türü"</string>
-    <string name="default_button" msgid="3901922329454578908">"Tamam"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"Tarayıcı deposu dolu"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"Alan açmak için tıklayın."</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"Depolanmış verileri temizle"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"Bu web sitesi ile ilişkilendirilmiş tüm veritabanlarını kaldır"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"Depolanmış verileri temizle"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"Bu web sitesi tarafından depolanmış tüm veriler silinecek"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"Tümünü Temizle"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"İptal"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"Telefonunuzda depolanan MB"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g> konumunuzu bilmek istiyor"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"Paylaş"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"Paylaşma"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"Anımsa"</string>
+    <string name="geolocation_settings_page_title" msgid="1745477985097536528">"Konum erişimini temizle"</string>
+    <string name="geolocation_settings_page_summary_allowed" msgid="9180251524290811398">"Bu site şu anda konumunuza erişebilir"</string>
+    <string name="geolocation_settings_page_summary_not_allowed" msgid="4589649082203102544">"Bu site şu anda konumunuza erişemiyor"</string>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"Konum erişimini temizle"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"Bu web sitesi için konum erişimi temizlenecek"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"Erişimi temizle"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"İptal"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"Genel Bakış"</string>
 </resources>
diff --git a/res/values-zh-rCN/arrays.xml b/res/values-zh-rCN/arrays.xml
new file mode 100644
index 0000000..cf00e8f
--- /dev/null
+++ b/res/values-zh-rCN/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"不允许设置配额"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 1a9ba9a..70614ad 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"浏览器"</string>
+    <string name="new_tab" msgid="7971857320679510529">"新标签"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"书签"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"访问最多"</string>
     <string name="tab_history" msgid="1979267558744613746">"历史记录"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> 个匹配项"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> 个匹配项"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"正在载入..."</string>
     <string name="page_info" msgid="4048529256302257195">"网页信息"</string>
     <string name="page_info_view" msgid="5303490449842635158">"查看网页信息"</string>
     <string name="page_info_address" msgid="2222306609532903254">"地址:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"正在停止..."</string>
     <string name="stop" msgid="5687251076030630074">"停止"</string>
     <string name="reload" msgid="8585220783228408062">"刷新"</string>
+    <string name="back" msgid="8414603107175713668">"返回"</string>
     <string name="forward" msgid="4288210890526641577">"前进"</string>
     <string name="save" msgid="5922311934992468496">"确定"</string>
     <string name="do_not_save" msgid="6777633870113477714">"取消"</string>
     <string name="location" msgid="969988560160364559">"位置"</string>
     <string name="name" msgid="5990326151488445481">"名称"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"书签"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"添加书签"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"编辑书签"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"向主屏幕添加快捷方式"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"打开"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"删除书签"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"从书签中删除"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"从历史记录中删除"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"设置为主页"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"已保存至书签。"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"主页已设置"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"书签必须具有名称。"</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"书签必须具有位置。"</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"无法创建空书签。"</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"网址无效。"</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"删除"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"将上次查看过的网页加为书签"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"缩略图视图"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"列表视图"</string>
     <string name="current_page" msgid="7510129573681663135">"来源 "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"将会删除书签“<xliff:g id="BOOKMARK">%s</xliff:g>”。"</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"在新窗口中打开"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"设置主页"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"自动调整为网页大小"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"调整网页格式以适合屏幕大小"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"仅以横向模式显示"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"始终以横向浏览模式阅读网页"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"隐私权设置"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"清除缓存"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"删除所有缓存的网页内容"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"将会清除缓存。"</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"清除存储在本地缓存中的内容和数据库"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"此时将清除存储在本地缓存中的内容和数据库。"</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"清除所有 Cookie 数据"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"清除所有浏览器 Cookie"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"将会清除所有 Cookie。"</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"清除密码"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"清除所有保存的密码"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"将会清除所有保存的密码。"</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"启用位置信息功能"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"允许网站访问您的位置信息"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"取消位置信息访问权限"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"取消所有网站的位置信息访问权限"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"取消所有网站的位置信息访问权限"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"安全设置"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"记住密码"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"保存访问网站所用的用户名和密码"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"关闭"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"默认缩放设置"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"载入网页时:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"显示网页概览"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"高级设置"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"启用 Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"扩展浏览器功能的应用程序"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears 设置"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"插件列表"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"没有已安装的插件。"</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"扩展浏览器功能的应用程序"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"网站设置"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"查看各网站的高级设置"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"重置为默认值"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"清除所有浏览器数据并将所有设置重置为默认值"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"将会清除所有浏览器数据并将设置恢复为默认值。"</string>
@@ -187,7 +202,7 @@
     <item msgid="6545734186479713946">"日文 (EUC-JP)"</item>
   </string-array>
     <string name="pref_default_text_encoding_dialogtitle" msgid="5508255018084978547">"文字编码"</string>
-    <string name="pref_default_text_encoding_default" msgid="5272126711231936722">"Latin-1"</string>
+    <string name="pref_default_text_encoding_default" msgid="5272126711231936722">"拉丁语-1"</string>
     <string name="browserFrameRedirect" msgid="7049675479777828343">"重定向"</string>
     <string name="browserFrame307Post" msgid="739650008647852203">"该网页正在进行重定向。是否要将您输入的表单数据重新发送到新位置?"</string>
     <string name="browserFrameNetworkErrorLabel" msgid="126892350904924893">"数据连接性问题"</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"确认"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"您尝试查看的网页中包含已经提交的数据(“POSTDATA”)。如果您重新发送这些数据,系统会重复该网页上的表单所执行过的一切操作(如搜索或在线购买)。"</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"没有网络连接"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"连接恢复后网页会继续载入。"</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"清除历史记录"</string>
     <string name="browser_history" msgid="2979476257919939232">"最近访问过的网页"</string>
     <string name="empty_history" msgid="8738772352308207274">"浏览器历史记录为空。"</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"添加书签..."</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"添加"</string>
     <string name="no_database" msgid="2256698896757181084">"没有数据库!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"输入网址"</string>
+    <string name="search_hint" msgid="4647356319916631820">"搜索或键入网址"</string>
     <string name="search_button_text" msgid="5235226933877634410">"转至"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"书签和网络历史记录"</string>
     <string name="attention" msgid="3473639060042811244">"注意"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"无法下载,无法确定该项的大小。"</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"下载中断,无法重新开始。"</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"浏览器测试运行程序"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"搜索网页"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"允许存储"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"此网站要将信息存储在您的手机上。"</string>
-    <string name="location_prompt" msgid="226262202057302423">"访问您所在的位置"</string>
-    <string name="location_message" msgid="1729456751935683242">"此网站要访问您所在的位置。"</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"创建快捷方式"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"此网站要在您的主屏幕上创建此网页的快捷方式。"</string>
-    <string name="settings_message" msgid="6171686603006325199">"下表显示了您已授予试图使用 Gears 的各个网站的权限。"</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"文件选择器"</string>
-    <string name="image_message" msgid="5450245866521896891">"选择的图片"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears 设置"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"阅读网站的隐私权政策,了解将会如何使用您的位置。"</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"允许本地存储"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"此网站可以将信息保存到您的手机上"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"此网站无法将信息保存到您的手机上"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"允许位置检测"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"此网站可以读取您当前所在的位置"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"此网站无法读取您当前所在的位置"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"从 Gears 删除此网站"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"未设置权限"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"删除此网站"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"所有权限将会清除,而且此网站存储在您手机上的所有数据也会删除。"</string>
-    <string name="storage_notification" msgid="6534213782873968255">"此网站要将信息存储在此手机上。"\n"在以下位置更改此设置:"\n"“设置”-&gt;“Gears 设置”"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"此网站决不会将信息存储在此手机上。"\n"在以下位置更改此设置:"\n"“设置”-&gt;“Gears 设置”"</string>
-    <string name="location_notification" msgid="3495804750470905804">"此网站可以访问您当前所在的位置。"\n"在以下位置更改此设置:"\n"“设置”-&gt;“Gears 设置”"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"此网站不会访问您当前所在的位置。"\n"在以下位置更改此设置:"\n"“设置”-&gt;“Gears 设置”"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"快捷方式已创建"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"不允许"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"确定"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"取消"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"不允许"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"确定"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"取消"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"应用"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"取消"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"确定"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"取消"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"路径:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"未选定任何文件"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"一个文件已选定"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"个文件已选定"</string>
-    <string name="remove" msgid="7820112494467011374">"删除"</string>
-    <string name="local_storage" msgid="6703332885937279085">"本地存储"</string>
-    <string name="allowed" msgid="1599514934221911624">"允许"</string>
-    <string name="denied" msgid="7470209521858372968">"已拒绝"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"无法识别的对话类型"</string>
-    <string name="default_button" msgid="3901922329454578908">"确定"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"浏览器存储空间已满"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"点击可释放空间。"</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"清除存储的数据"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"删除所有与此网站相关联的数据库"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"清除存储的数据"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"此时将删除由此网站存储的所有数据"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"全部清除"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"取消"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"您手机的存储空间 (MB)"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"<xliff:g id="WEBPAGE">%s</xliff:g>需要了解您的位置信息"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"分享"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"不分享"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"记住"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"取消位置信息访问权限"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"此时将取消此网站的位置信息访问权限"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"取消访问权限"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"取消"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"概览"</string>
 </resources>
diff --git a/res/values-zh-rTW/arrays.xml b/res/values-zh-rTW/arrays.xml
new file mode 100644
index 0000000..60e6ec9
--- /dev/null
+++ b/res/values-zh-rTW/arrays.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="webstorage_quota_entries">
+    <item msgid="5433313236875537673">"未獲得任何配額"</item>
+    <item msgid="7374272188672967690">"5 MB"</item>
+    <item msgid="8699352701856136738">"10 MB"</item>
+    <item msgid="2018822431469084862">"30 MB"</item>
+    <item msgid="5383642976774534074">"100 MB"</item>
+  </string-array>
+  <string-array name="webstorage_quota_entries_values">
+    <item msgid="7620410313725236055">"0"</item>
+    <item msgid="4302688814760304206">"5"</item>
+    <item msgid="7291990205847586165">"10"</item>
+    <item msgid="916913372287112423">"30"</item>
+    <item msgid="3437188301324229987">"100"</item>
+  </string-array>
+</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 8ab4c4e..c8aa573 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -16,6 +16,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="application_name" msgid="1935869255545976415">"瀏覽器"</string>
+    <string name="new_tab" msgid="7971857320679510529">"新標籤"</string>
+    <!-- no translation found for active_tabs (8423342514993323050) -->
+    <skip />
     <string name="tab_bookmarks" msgid="2305793036003473653">"書籤"</string>
     <string name="tab_most_visited" msgid="1077402532455000703">"常用網頁"</string>
     <string name="tab_history" msgid="1979267558744613746">"記錄"</string>
@@ -34,6 +37,7 @@
     <item quantity="few" msgid="5544267486978946555">"<xliff:g id="NUMBER">%d</xliff:g> 個相配項"</item>
     <item quantity="other" msgid="6616125067364315405">"<xliff:g id="NUMBER">%d</xliff:g> 個相配項"</item>
   </plurals>
+    <string name="title_bar_loading" msgid="7438217780834640678">"載入中..."</string>
     <string name="page_info" msgid="4048529256302257195">"頁面資訊"</string>
     <string name="page_info_view" msgid="5303490449842635158">"檢視頁面資訊"</string>
     <string name="page_info_address" msgid="2222306609532903254">"位址:"</string>
@@ -59,25 +63,31 @@
     <string name="stopping" msgid="4839698519340302982">"停止中…"</string>
     <string name="stop" msgid="5687251076030630074">"停止"</string>
     <string name="reload" msgid="8585220783228408062">"重新整理"</string>
+    <string name="back" msgid="8414603107175713668">"上一頁"</string>
     <string name="forward" msgid="4288210890526641577">"下一頁"</string>
     <string name="save" msgid="5922311934992468496">"確定"</string>
     <string name="do_not_save" msgid="6777633870113477714">"取消"</string>
     <string name="location" msgid="969988560160364559">"位置"</string>
     <string name="name" msgid="5990326151488445481">"名字"</string>
     <string name="http" msgid="2163722670597250102">"http://"</string>
-    <string name="save_to_bookmarks" msgid="4680844117598293907">"書籤"</string>
+    <string name="save_to_bookmarks" msgid="588165100024086565">"新增書籤"</string>
     <string name="edit_bookmark" msgid="5024089053490231905">"編輯書籤"</string>
     <string name="create_shortcut_bookmark" msgid="9202323987633899835">"新增捷徑至首頁"</string>
     <string name="open_bookmark" msgid="8473581305759935790">"開啟"</string>
     <string name="remove_bookmark" msgid="8407495852801410891">"刪除書籤"</string>
+    <string name="remove_from_bookmarks" msgid="4374080666576982775">"從書籤中移除"</string>
     <string name="remove_history_item" msgid="5021424935726728618">"從記錄中移除"</string>
+    <string name="set_as_homepage" msgid="4752937379414905560">"設為首頁"</string>
     <string name="bookmark_saved" msgid="2766434679871317557">"已儲存至書籤。"</string>
+    <string name="homepage_set" msgid="9127149128262321090">"已設定首頁"</string>
     <string name="bookmark_needs_title" msgid="6245900436119218187">"請輸入書籤名稱。"</string>
     <string name="bookmark_needs_url" msgid="7809876865972755158">"請選取書籤位置。"</string>
     <string name="empty_bookmark" msgid="7008697085928540511">"無法建立空白書籤。"</string>
     <string name="bookmark_url_not_valid" msgid="6719785633980202419">"網址無效。"</string>
     <string name="delete_bookmark" msgid="2422989994934201992">"刪除"</string>
     <string name="bookmark_page" msgid="6845189305130307274">"將最後瀏覽的網頁加入書籤"</string>
+    <string name="switch_to_thumbnails" msgid="5493351529609043151">"縮圖檢視"</string>
+    <string name="switch_to_list" msgid="8900531247982121055">"清單檢視"</string>
     <string name="current_page" msgid="7510129573681663135">"來源 "</string>
     <string name="delete_bookmark_warning" msgid="758043186202032205">"刪除「<xliff:g id="BOOKMARK">%s</xliff:g>」書籤?"</string>
     <string name="open_in_new_window" msgid="6596775546468054510">"在新視窗開啟"</string>
@@ -125,10 +135,12 @@
     <string name="pref_content_homepage" msgid="6082437160778559806">"設定首頁"</string>
     <string name="pref_content_autofit" msgid="8260474534053660809">"自動調整頁面"</string>
     <string name="pref_content_autofit_summary" msgid="2358178043889761026">"將網頁調整至適合螢幕的大小"</string>
+    <string name="pref_content_landscape_only" msgid="5863539054484585534">"僅以橫向模式顯示"</string>
+    <string name="pref_content_landscape_only_summary" msgid="1128170515157691793">"永遠使用橫向寬螢幕瀏覽模式閱讀網頁"</string>
     <string name="pref_privacy_title" msgid="1052470980370846151">"隱私設定"</string>
     <string name="pref_privacy_clear_cache" msgid="3380316479925886998">"清除快取"</string>
-    <string name="pref_privacy_clear_cache_summary" msgid="2969532045347184968">"刪除所有快取頁面內容"</string>
-    <string name="pref_privacy_clear_cache_dlg" msgid="4791302446488696772">"快取會被清除"</string>
+    <string name="pref_privacy_clear_cache_summary" msgid="2216463577207991454">"清除本機快取內容與資料庫"</string>
+    <string name="pref_privacy_clear_cache_dlg" msgid="1027868030632828913">"即將清除本機快取內容與資料庫。"</string>
     <string name="pref_privacy_clear_cookies" msgid="3095583579133780331">"清除所有 cookie"</string>
     <string name="pref_privacy_clear_cookies_summary" msgid="8602064521480657942">"清除所有 cookie"</string>
     <string name="pref_privacy_clear_cookies_dlg" msgid="5399971428430900904">"所有 cookie 會被清除。"</string>
@@ -141,6 +153,11 @@
     <string name="pref_privacy_clear_passwords" msgid="4750234112289277480">"清除密碼"</string>
     <string name="pref_privacy_clear_passwords_summary" msgid="1267552159370789981">"清除所有儲存的密碼"</string>
     <string name="pref_privacy_clear_passwords_dlg" msgid="8425666119003961466">"所有儲存密碼會被清除"</string>
+    <string name="pref_privacy_enable_geolocation" msgid="1395040170290765686">"啟用定位功能"</string>
+    <string name="pref_privacy_enable_geolocation_summary" msgid="8437020934664306205">"允許網站向您要求位置資訊存取權"</string>
+    <string name="pref_privacy_clear_geolocation_access" msgid="6649680770030042980">"清除位置資訊存取權"</string>
+    <string name="pref_privacy_clear_geolocation_access_summary" msgid="7750143359497314679">"清除所有網站的位置資訊存取權"</string>
+    <string name="pref_privacy_clear_geolocation_access_dlg" msgid="7327063124488827244">"清除所有網站的位置資訊存取權"</string>
     <string name="pref_security_title" msgid="5763978646932160021">"安全性設定"</string>
     <string name="pref_security_remember_passwords" msgid="6492957683454529549">"記住密碼"</string>
     <string name="pref_security_remember_passwords_summary" msgid="6789880514358003065">"儲存網站使用者名稱與密碼"</string>
@@ -166,13 +183,11 @@
     <item msgid="3840999588443167001">"近"</item>
   </string-array>
     <string name="pref_default_zoom_dialogtitle" msgid="6095974367125109021">"預設縮放"</string>
+    <string name="pref_content_load_page" msgid="8834308472508060268">"網頁載入時:"</string>
+    <string name="pref_content_load_page_summary" msgid="3161792969308430976">"顯示網頁總覽"</string>
     <string name="pref_extras_title" msgid="3091250467679722382">"進階設定"</string>
-    <string name="pref_extras_gears_enable" msgid="7573987212735599444">"啟用 Gears"</string>
-    <string name="pref_extras_gears_enable_summary" msgid="4008973536142399194">"可擴充瀏覽器功能的應用程式"</string>
-    <string name="pref_extras_gears_settings" msgid="1020697825071619889">"Gears 設定"</string>
-    <string name="pref_plugin_installed" msgid="6387683936112106178">"外掛程式清單"</string>
-    <string name="pref_plugin_installed_empty_list" msgid="6656686482480679665">"未安裝外掛程式。"</string>
-    <string name="pref_extras_gears_settings_summary" msgid="6230027090022456383">"可擴充瀏覽器功能的應用程式"</string>
+    <string name="pref_extras_website_settings" msgid="67866640052455549">"網站設定"</string>
+    <string name="pref_extras_website_settings_summary" msgid="3917568895776162240">"查看個別網站的進階設定"</string>
     <string name="pref_extras_reset_default" msgid="8904000515846202110">"還原至初始設定"</string>
     <string name="pref_extras_reset_default_summary" msgid="7984680562706914966">"清除瀏覽器所有資料,並還原至初始設定"</string>
     <string name="pref_extras_reset_default_dlg" msgid="5332227004054477008">"瀏覽器所有資料會被清除, 並還原至初始設定。"</string>
@@ -195,13 +210,15 @@
     <string name="browserFrameFormResubmitLabel" msgid="2685923472682180360">"確認"</string>
     <string name="browserFrameFormResubmitMessage" msgid="2752182215695632138">"您想瀏覽的頁面包含已傳送的 (「POSTDATA」),如重新送出資料,此頁表單上執行的操作將會重複 (包括搜尋或線上購物等)。"</string>
     <string name="loadSuspendedTitle" msgid="675991625288706944">"沒有網路連線"</string>
-    <string name="loadSuspended" msgid="1800165494398204523">"連線恢復後,此頁面會繼續載入。"</string>
+    <!-- no translation found for loadSuspended (724674402736067146) -->
+    <skip />
     <string name="clear_history" msgid="5998307092715979619">"清除記錄"</string>
     <string name="browser_history" msgid="2979476257919939232">"最近瀏覽的頁面"</string>
     <string name="empty_history" msgid="8738772352308207274">"瀏覽記錄是空的。"</string>
     <string name="add_new_bookmark" msgid="8086367791400349049">"加入書籤…"</string>
+    <string name="add_bookmark_short" msgid="3783984330998103735">"新增"</string>
     <string name="no_database" msgid="2256698896757181084">"沒有資料!"</string>
-    <string name="search_hint" msgid="3385577802557697397">"輸入網頁位址"</string>
+    <string name="search_hint" msgid="4647356319916631820">"搜尋或輸入網址"</string>
     <string name="search_button_text" msgid="5235226933877634410">"前往"</string>
     <string name="search_settings_description" msgid="1422401062529014107">"書籤與網頁記錄"</string>
     <string name="attention" msgid="3473639060042811244">"注意"</string>
@@ -245,53 +262,36 @@
     <string name="download_length_required" msgid="9038605488460437406">"無法下載。物件大小無法估計。"</string>
     <string name="download_precondition_failed" msgid="8327584102874295580">"下載中斷。無法續傳。"</string>
     <string name="activity_instrumentation_test_runner" msgid="8215091309334005029">"Browser Test Runner"</string>
-    <string name="homepage_base" msgid="7888126987935305566">"http://www.google.com/m?client=ms-{CID}"</string>
     <string name="search_the_web" msgid="6046130189241962337">"搜尋網頁"</string>
-    <string name="query_data_prompt" msgid="5474381240981604223">"允許儲存"</string>
-    <string name="query_data_message" msgid="8789381063185445197">"此網站要在您的手機上儲存資訊。"</string>
-    <string name="location_prompt" msgid="226262202057302423">"存取您的位置資訊"</string>
-    <string name="location_message" msgid="1729456751935683242">"此網站要存取您的位置資訊。"</string>
-    <string name="shortcut_prompt" msgid="437193299088893596">"建立捷徑"</string>
-    <string name="shortcut_message" msgid="4793042709293755892">"此網站要在您的主畫面上建立網頁捷徑。"</string>
-    <string name="settings_message" msgid="6171686603006325199">"下表列出您為每個想要使用 Gears 之網站所授予的權限。"</string>
-    <string name="filepicker_message" msgid="4929726371602896039">"檔案挑選程式"</string>
-    <string name="image_message" msgid="5450245866521896891">"選擇的影像"</string>
-    <string name="settings_title" msgid="3579144910187265022">"Gears 設定"</string>
-    <string name="privacy_policy" msgid="864201179110197308">"讀取網站的隱私權政策,以瞭解網站將如何使用您的位置資訊。"</string>
-    <string name="settings_storage_title" msgid="7089119630457156408">"允許本機儲存"</string>
-    <string name="settings_storage_subtitle_on" msgid="2733295483569432111">"此網站可以在您的手機上儲存資訊"</string>
-    <string name="settings_storage_subtitle_off" msgid="1338039396087898813">"此網站無法在您的手機上儲存資訊"</string>
-    <string name="settings_location_title" msgid="4953062923509886651">"允許偵測位置"</string>
-    <string name="settings_location_subtitle_on" msgid="1496219621849158879">"此網站可以讀取您目前的位置資訊"</string>
-    <string name="settings_location_subtitle_off" msgid="5216466051810596189">"此網站無法讀取您目前的位置資訊"</string>
-    <string name="settings_remove_site" msgid="1822247070226589958">"從 Gears 移除此網站"</string>
-    <string name="settings_empty" msgid="2008952224378583146">"未設定任何權限"</string>
-    <string name="settings_confirmation_remove_title" msgid="5360857296753219635">"移除此網站"</string>
-    <string name="settings_confirmation_remove" msgid="585560170733446898">"系統將清除所有權限,並且將刪除此網站儲存在手機上的所有資料。"</string>
-    <string name="storage_notification" msgid="6534213782873968255">"此網站將會在您的手機上儲存資訊。"\n"您可以透過以下操作變更此設定:"\n"[設定] -&gt; [Gears 設定]"</string>
-    <string name="storage_notification_alwaysdeny" msgid="5473208033665783513">"此網站永遠不會在您的手機上儲存資訊。"\n"您可以透過以下操作變更此設定:"\n"[設定] -&gt; [Gears 設定]"</string>
-    <string name="location_notification" msgid="3495804750470905804">"此網站可以存取您目前的位置資訊。"\n"您可以透過以下操作變更此設定:"\n"[設定] -&gt; [Gears 設定]"</string>
-    <string name="location_notification_alwaysdeny" msgid="6184925953783312629">"此網站不會存取您目前的位置資訊。"\n"您可以透過以下操作變更此設定:"\n"[設定] -&gt; [Gears 設定]"</string>
-    <string name="shortcut_notification" msgid="1659700220868444568">"捷徑已建立"</string>
-    <string name="permission_button_alwaysdeny" msgid="3837055994905214848">"永不允許"</string>
-    <string name="permission_button_allow" msgid="7301874925704148242">"確定"</string>
-    <string name="permission_button_deny" msgid="104712269725153018">"取消"</string>
-    <string name="shortcut_button_alwaysdeny" msgid="4172277731325126605">"永不允許"</string>
-    <string name="shortcut_button_allow" msgid="3106634184087569293">"確定"</string>
-    <string name="shortcut_button_deny" msgid="6054910540900054553">"取消"</string>
-    <string name="settings_button_allow" msgid="447817497759509841">"套用"</string>
-    <string name="settings_button_deny" msgid="602496920123085858">"取消"</string>
-    <string name="filepicker_button_allow" msgid="2849120125810490391">"確定"</string>
-    <string name="filepicker_button_deny" msgid="1302975999145835953">"取消"</string>
-    <string name="filepicker_path" msgid="4680729728498981925">"路徑:"</string>
-    <string name="filepicker_no_files_selected" msgid="7859426670184432998">"未選取任何檔案"</string>
-    <string name="filepicker_one_file_selected" msgid="1451259953191434851">"已選取一個檔案"</string>
-    <string name="filepicker_some_files_selected" msgid="3859384664191734493">"選取的檔案"</string>
-    <string name="remove" msgid="7820112494467011374">"移除"</string>
-    <string name="local_storage" msgid="6703332885937279085">"本機儲存空間"</string>
-    <string name="allowed" msgid="1599514934221911624">"允許"</string>
-    <string name="denied" msgid="7470209521858372968">"遭拒"</string>
-    <string name="unrecognized_dialog_message" msgid="687399590684283989">"無法辨識的對話類型"</string>
-    <string name="default_button" msgid="3901922329454578908">"確定"</string>
+    <string name="webstorage_outofspace_notification_title" msgid="1160474608059771788">"瀏覽器儲存空間已滿"</string>
+    <string name="webstorage_outofspace_notification_text" msgid="7341075135051829692">"按一下可釋出空間。"</string>
+    <string name="webstorage_clear_data_title" msgid="689484577124333977">"清除儲存的資料"</string>
+    <string name="webstorage_clear_data_summary" msgid="3523128713743907805">"移除所有與此網站關聯的資料庫"</string>
+    <string name="webstorage_clear_data_dialog_title" msgid="345457466368974706">"清除儲存的資料"</string>
+    <string name="webstorage_clear_data_dialog_message" msgid="6678281256970470125">"即將刪除此網站儲存的所有資料"</string>
+    <string name="webstorage_clear_data_dialog_ok_button" msgid="5074037549893407416">"全部清除"</string>
+    <string name="webstorage_clear_data_dialog_cancel_button" msgid="2028867751958942762">"取消"</string>
+    <string name="webstorage_origin_summary_mb_stored" msgid="1985885826292236210">"您手機的儲存空間使用量 (MB)"</string>
+    <string name="geolocation_permissions_prompt_message" msgid="2412844044592274106">"「<xliff:g id="WEBPAGE">%s</xliff:g>」想取得您的位置資訊"</string>
+    <string name="geolocation_permissions_prompt_share" msgid="6908104491085328731">"分享"</string>
+    <string name="geolocation_permissions_prompt_dont_share" msgid="5962677371200773835">"不要分享"</string>
+    <string name="geolocation_permissions_prompt_remember" msgid="5798300962802553043">"記住"</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>
+    <string name="geolocation_settings_page_dialog_title" msgid="1549842043381347668">"清除位置資訊存取權"</string>
+    <string name="geolocation_settings_page_dialog_message" msgid="7586671987576403993">"即將清除此網站的位置資訊存取權"</string>
+    <string name="geolocation_settings_page_dialog_ok_button" msgid="4789434178048077287">"清除存取權"</string>
+    <string name="geolocation_settings_page_dialog_cancel_button" msgid="7941036504673409747">"取消"</string>
+    <!-- no translation found for website_settings_clear_all (2073906304824388952) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_title (1975103796504323734) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_message (6545526672017530811) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_ok_button (3677457125416372255) -->
+    <skip />
+    <!-- no translation found for website_settings_clear_all_dialog_cancel_button (1896757051856611674) -->
+    <skip />
     <string name="zoom_overview_button_text" msgid="4146579940085488881">"總覽"</string>
 </resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index f34b640..72f1355 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -33,10 +33,7 @@
     <color name="black">#ff000000</color>
     <color name="gray">#ffbbbbbb</color>
     <color name="dark_gray">#ff777777</color>
-    
-    <!-- Gears Dialogs -->
-    <color name="permission_border">#f1cc1d</color>
-    <color name="permission_background">#faefb8</color>
-    <color name="dialog_link">#ff0000ff</color>
+
+    <color name="geolocation_permissions_prompt_background">#ffdddddd</color>
 </resources>
 
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 69c17cb..3bb6ffd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -18,6 +18,10 @@
     <!-- The name of the application. -->
     <string name="application_name">Browser</string>
 
+    <!-- Name of menu item of a new tab.  Also used in the title bar when displaying a new tab -->
+    <string name="new_tab">New window</string>
+    <!-- Name of menu item which brings up a list of the currently active tabs -->
+    <string name="active_tabs">Windows</string>
     <!-- Name of tab containing bookmarks -->
     <string name="tab_bookmarks">Bookmarks</string>
     <!-- Name of tab containing the user's most visited websites, organized by number of visits -->
@@ -58,7 +62,10 @@
         <!-- Case of several matches -->
         <item quantity="other"><xliff:g id="number" example="137">%d</xliff:g> matches</item>
     </plurals>
-    
+
+    <!-- Displayed on the title bar while the page is loading -->
+    <string name="title_bar_loading">Loading\u2026</string>
+
     <!-- Menu item -->
     <string name="page_info">Page info</string>
     <!-- Label for a button on an SSL error dialog that allows the user to see
@@ -119,6 +126,8 @@
     <string name="stop">Stop</string>
     <!-- Menu item to reload or refresh the current page. -->
     <string name="reload">Refresh</string>
+    <!-- Menu item to go back to the previous page -->
+    <string name="back">Back</string>
     <!-- Menu item to go to the next page (only useful if the user has previously hit back.) -->
     <string name="forward">Forward</string>
     <!-- Button label to confirm saving a bookmark. -->
@@ -132,7 +141,7 @@
     <!-- Initial value in Location field in Bookmark dialog box -->
     <string name="http">http://</string>
     <!-- Menu item that opens a dialog to save a bookmark, initialized with the current page -->
-    <string name="save_to_bookmarks">Bookmark</string>
+    <string name="save_to_bookmarks">Add bookmark</string>
     <!-- Menu item on the bookmarks page, to edit an existing bookmark -->
     <string name="edit_bookmark">Edit bookmark</string>
     <!-- Context menu item to create a shortcut to the bookmark on the desktop -->
@@ -141,10 +150,18 @@
     <string name="open_bookmark">Open</string>
     <!-- Menu item to remove the currently highlighted bookmark-->
     <string name="remove_bookmark">Delete bookmark</string>
+    <!-- Context menu item to remove a history item from bookmarks -->
+    <string name="remove_from_bookmarks">Remove from bookmarks</string>
     <!-- Menu item to remove the currently highlighted history entry from the list of previously visited sites -->
     <string name="remove_history_item">Remove from history</string>
+    <!-- Context menu item for setting the bookmark/history item as the homepage -->
+    <string name="set_as_homepage">Set as homepage</string>
     <!-- Toast informing the user that their action to save a bookmark has succeeded -->
     <string name="bookmark_saved">Saved to bookmarks.</string>
+    <!-- Toast informing the user that their action to save a bookmark did not succeed -->
+    <string name="bookmark_not_saved">Unable to save bookmark.</string>
+    <!-- Toast confirming that the homepage has been set -->
+    <string name="homepage_set">Homepage set.</string>
     <!-- Error that appears in the title of Bookmark dialog when user selects OK with empty Name field -->
     <string name="bookmark_needs_title">"Bookmark must have a name."</string>
         <!-- Error that appears in the title of Bookmark dialog when user selects OK with empty Location field -->
@@ -160,6 +177,12 @@
             currently on, but is not visible because the bookmarks page is 
             showing. -->
     <string name="bookmark_page">Bookmark last-viewed page</string>
+    <!-- Menu item in the page that displays all bookmarks.  Switches to
+            a grid view which shows thumbnails -->
+    <string name="switch_to_thumbnails">Thumbnail view</string>
+    <!-- Menu item in the page that displays all bookmarks.  Switches to a
+            list view which shows titles -->
+    <string name="switch_to_list">List view</string>
     <!-- Summary text under the New Bookmark item on the Bookmarks screen.
             Tells the user that if they select this item, it will bring up a
             dialog to bookmark the page that the browser is currently viewing,
@@ -211,6 +234,9 @@
     <string name="history">History</string>
     <!-- Menu item for viewing downloads from the browser -->
     <string name="menu_view_download">Downloads</string>
+    <!-- Context menu item for copying the url of the current page from the
+            title bar -->
+    <string name="copy_page_url">Copy page url</string>
     <!-- Menu item -->
     <string name="share_page">Share page</string>
     <!-- Context Menu item open the currently selected link in the current
@@ -249,6 +275,11 @@
             application -->
     <string name="contextmenu_map">Map</string>
  
+     <!-- Title of the dialog used for selecting the application that should be
+            used for sharing a link (e.g. Gmail or another app). See also
+            contextmenu_sharelink above -->
+    <string name="choosertitle_sharevia">Share via</string>
+
     <!-- Used as the title of dialogs in the Browser Settings confirming that
             the user wants to clear (cache, history, or cookie data) -->
     <string name="clear">Clear</string>
@@ -269,59 +300,75 @@
     <!-- Settings label -->
     <string name="pref_content_load_images">Load images</string>
     <!-- Settings label -->
-    <string name="pref_content_load_images_summary">Display images on Web pages</string>
+    <string name="pref_content_load_images_summary">Display images on web pages</string>
     <!-- Settings label -->
     <string name="pref_content_block_popups">Block pop-up windows</string>
     <!-- Settings label -->
     <string name="pref_content_javascript">Enable JavaScript</string>
     <!-- Settings label -->
     <string name="pref_content_open_in_background">Open in background</string>
+    <!-- Settings label -->
+    <string name="pref_content_plugins">Enable plug-ins</string>
     <!-- Settings summary -->
-    <string name="pref_content_open_in_background_summary">New windows open behind the current one</string>
+    <string name="pref_content_open_in_background_summary">Open new windows behind the current one</string>
     <!-- Settings label -->
     <string name="pref_content_homepage">Set home page</string>
     <!-- Settings label -->
     <string name="pref_content_autofit">Auto-fit pages</string>
     <!-- Settings summary -->
-    <string name="pref_content_autofit_summary">Format Web pages to fit the screen</string>
+    <string name="pref_content_autofit_summary">Format web pages to fit the screen</string>
+    <!-- Settings label for enabling a mode where the browser is always set to landscape mode -->
+    <string name="pref_content_landscape_only">Landscape-only display</string>
+    <!-- Settings summary -->
+    <string name="pref_content_landscape_only_summary">Display pages only in the wider, landscape screen orientation</string>
     <!-- Settings screen, section title -->
     <string name="pref_privacy_title">Privacy settings</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_cache">Clear cache</string>
     <!-- Settings summary -->
-    <string name="pref_privacy_clear_cache_summary">Delete all cached page content</string>
+    <string name="pref_privacy_clear_cache_summary">Clear locally cached content and databases</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_cache_dlg">The cache will be cleared.</string>
+    <string name="pref_privacy_clear_cache_dlg">Locally cached content and databases will be deleted.</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_cookies">Clear all cookie data</string>
     <!-- Settings summary -->
-    <string name="pref_privacy_clear_cookies_summary">Clear all the browser cookies</string>
+    <string name="pref_privacy_clear_cookies_summary">Clear all browser cookies</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_cookies_dlg">All cookies will be cleared.</string>
+    <string name="pref_privacy_clear_cookies_dlg">All cookies will be deleted.</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_history">Clear history</string>
     <!-- Settings summary -->
     <string name="pref_privacy_clear_history_summary">Clear the browser navigation history</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_history_dlg">The browser navigation history will be cleared.</string>
+    <string name="pref_privacy_clear_history_dlg">The browser navigation history will be deleted.</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_form_data">Clear form data</string>
     <!-- Settings summary -->
     <string name="pref_privacy_clear_form_data_summary">Clear all the saved form data</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_form_data_dlg">All saved form data will be cleared.</string>
+    <string name="pref_privacy_clear_form_data_dlg">All saved form data will be deleted.</string>
     <!-- Settings label -->
     <string name="pref_privacy_clear_passwords">Clear passwords</string>
     <!-- Settings summary -->
-    <string name="pref_privacy_clear_passwords_summary">Clear all the saved passwords</string>
+    <string name="pref_privacy_clear_passwords_summary">Clear all saved passwords</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_privacy_clear_passwords_dlg">All saved passwords will be cleared.</string>
+    <string name="pref_privacy_clear_passwords_dlg">All saved passwords will be deleted.</string>
+    <!-- Settings label -->
+    <string name="pref_privacy_enable_geolocation">Enable location</string>
+    <!-- Settings summary -->
+    <string name="pref_privacy_enable_geolocation_summary">Allow sites to request access to your location</string>
+    <!-- Settings label -->
+    <string name="pref_privacy_clear_geolocation_access">Clear location access</string>
+    <!-- Settings summary -->
+    <string name="pref_privacy_clear_geolocation_access_summary">Clear location access for all websites</string>
+    <!-- Confirmation dialog message -->
+    <string name="pref_privacy_clear_geolocation_access_dlg">Clear location access for all websites</string>
     <!-- Settings screen, section title -->
     <string name="pref_security_title">Security settings</string>
     <!-- Settings label -->
     <string name="pref_security_remember_passwords">Remember passwords</string>
     <!-- Settings summary -->
-    <string name="pref_security_remember_passwords_summary">Save usernames and passwords for Web sites</string>
+    <string name="pref_security_remember_passwords_summary">Save usernames and passwords for websites</string>
     <!-- Settings label -->
     <string name="pref_security_save_form_data">Remember form data</string>
     <!-- Settings summary -->
@@ -370,25 +417,22 @@
         <item><xliff:g>MEDIUM</xliff:g></item>
         <item><xliff:g>CLOSE</xliff:g></item>
     </string-array>
+    <!-- Settings label -->
+    <string name="pref_content_load_page">Open pages in overview</string>
+    <!-- Settings summary -->
+    <string name="pref_content_load_page_summary">Show overview of newly opened pages</string>
     <!-- Settings screen, section title -->
     <string name="pref_extras_title">Advanced settings</string>
     <!-- Settings label -->
-    <string name="pref_extras_gears_enable">Enable Gears</string>
+    <string name="pref_extras_website_settings">Website settings</string>
     <!-- Settings summary -->
-    <string name="pref_extras_gears_enable_summary">Applications that extend browser functionality</string>
-    <!-- Settings label -->
-    <string name="pref_extras_gears_settings">Gears settings</string>
-    <!-- Settings summary -->
-    <string name="pref_plugin_installed">Plugins list</string>
-    <!-- Settings summary -->
-    <string name="pref_plugin_installed_empty_list">No installed plugins.</string>
-    <string name="pref_extras_gears_settings_summary">Applications that extend browser functionality</string>
+    <string name="pref_extras_website_settings_summary">View advanced settings for individual websites</string>
     <!-- Settings label -->
     <string name="pref_extras_reset_default">Reset to default</string>
     <!-- Settings summary -->
     <string name="pref_extras_reset_default_summary">Clear all browser data and reset all settings to default</string>
     <!-- Confirmation dialog message -->
-    <string name="pref_extras_reset_default_dlg">All browser data will be cleared and settings will revert to default values.</string>
+    <string name="pref_extras_reset_default_dlg">All browser data will be deleted and settings will revert to default values.</string>
     <!-- Confirmation dialog title -->
     <string name="pref_extras_reset_default_dlg_title">Reset to default</string>
     <!-- Title for a group of settings -->
@@ -404,6 +448,8 @@
     <!-- Do not tranlsate.  Development option -->
     <string name="pref_development_nav_dump" translatable="false">Enable nav cache dump</string>
     <!-- Do not tranlsate.  Development option -->
+    <string name="js_engine_flags" translatable="false">Set JS flags</string>
+    <!-- Do not tranlsate.  Development option -->
     <string name="pref_development_uastring" translatable="false">UAString</string>
     <!-- Do not tranlsate.  Development option -->
     <string-array name="pref_development_ua_choices" translatable="false">
@@ -417,6 +463,7 @@
         <item>1</item>
         <item>2</item>
     </string-array>
+    <string name="pref_development_error_console" translatable="false">Show JavaScript Console</string>
     <!-- Settings screen, setting option name -->
     <string name="pref_default_text_encoding">Text encoding</string>
     <!-- Options in the Default encoding dialog box -->
@@ -442,7 +489,7 @@
     <!-- Dialog box title -->
     <string name="browserFrameRedirect">Redirect</string>
     <!-- Dialog box message -->
-    <string name="browserFrame307Post">This Web page is being redirected. Resend your typed form data to the new location?</string>
+    <string name="browserFrame307Post">This web page is being redirected. Resend your typed form data to the new location?</string>
     <!-- Title for a dialog displayed when the browser has a data connectivity
             problem -->
     <string name="browserFrameNetworkErrorLabel">Data connectivity problem</string>
@@ -456,25 +503,26 @@
     <!-- Dialog box title -->
     <string name="loadSuspendedTitle">No network connection</string>
     <!-- Dialog box message -->
-    <string name="loadSuspended">The page will continue loading after connection has been restored.</string>
+    <string name="loadSuspended">Browser cannot load this page because there
+      is no internet connection.</string>
     <!-- Menu item -->
     <string name="clear_history">Clear history</string>
     <!-- History screen title; appears in title bar -->
-    <string name="browser_history">Recently-visited pages</string>
+    <string name="browser_history">Recently visited pages</string>
     <!-- Appears on History screen if no history is found -->
     <string name="empty_history">Browser history is empty.</string>
     <!-- Displayed at the top of the bookmarks page.  When clicked, it bookmarks the page the browser is currently showing -->
     <string name="add_new_bookmark">Add bookmark\u2026</string>
-    <!-- Add bookmark dialog sets its title to this if we have no database.
-            This is an error case -->
-    <string name="no_database">No database!</string>
+    <!-- Verb placed in front of a screenshot of a web page that, when clicked,
+            will add that page to bookmarks -->
+    <string name="add_bookmark_short">Add</string>
     
     <!-- This string is for the browser "Go To" UI. -->
     <!-- Do not translate.  This string is not displayed in UI (no badge is selected for go to). -->
     <string name="search_label" translatable="false">Browser</string>
     <!-- This string is for the browser "Go To" UI. -->
     <!-- This is the hint text shown in the Go To widget, before text is entered. -->
-    <string name="search_hint">Type Web address</string>
+    <string name="search_hint">Search or type URL</string>
     <!-- This string is for the browser "Go To" UI. -->
     <!-- This is the button label in the "Go To" UI. -->
     <string name="search_button_text">Go</string>
@@ -580,7 +628,7 @@
     <!-- Message in the list of items which have received download requests
             telling their status.  This message states that the download will
             not happen because the content is not supported by the phone -->
-    <string name="download_not_acceptable">Cannot download. The content is not supported on the phone.</string>
+    <string name="download_not_acceptable">Cannot download. The content is not supported on this phone.</string>
     <!-- Message in the list of items which have received download requests
             telling their status.  This message states that the download did not
             finish because there is not enough storage for the file -->
@@ -603,7 +651,8 @@
     <!-- The default homepage. If it starts with "http://www.google" and the
             user signs up the device with a Google sites account, the site's
             domain will be appended. -->
-    <string name="homepage_base">http://www.google.com/m?client=ms-{CID}</string>
+    <string name="homepage_base" translatable="false">
+        http://www.google.com/m?client=ms-{CID}&amp;source=android-home</string>
 
     <!-- Bookmarks -->
     <string-array name="bookmarks" translatable="false">
@@ -624,11 +673,11 @@
         <item>eBay</item>
         <item>http://www.ebay.com/</item>
         <item>CNN</item>
-        <item>http://www.cnn.com/</item>
-        <item>New York Times</item>
+        <item>http://www.cnn.com/index.html</item>
+        <item>NY Times</item>
         <item>http://www.nytimes.com/</item>
         <item>ESPN</item>
-        <item>http://espn.go.com/</item>
+        <item>http://espn.com/</item>
         <item>Amazon</item>
         <item>http://www.amazon.com/</item>
         <item>Weather Channel</item>
@@ -668,66 +717,53 @@
         Browser\'s history or bookmarks stored on your phone. Malicious applications 
         can use this to erase or modify your Browser\'s data.</string>
 
-    <!-- Gears Dialogs -->
-    <string name="query_data_prompt">Allow storage</string>
-    <string name="query_data_message">This web site would like to store information on your phone.</string>
-    <string name="location_prompt">Access your location</string>
-    <string name="location_message">This web site would like to have access to your location.</string>
-    <string name="shortcut_prompt">Create a shortcut</string>
-    <string name="shortcut_message">This web site would like to create a shortcut to this page on your home screen.</string>
-    <string name="settings_message">The table below shows the permissions you have granted to each site that has attempted to use Gears.</string>
-    <string name="filepicker_message">File Picker</string>
-    <string name="image_message">Choosen Image</string>
+    <!-- HTML5 dialogs -->
+    <!-- Used as a status bar notification when the browser is running out of space trying to allocate or increase the database quota for an HTML5 databae or application cache. -->
+    <string name="webstorage_outofspace_notification_title">Browser storage full</string>
+    <string name="webstorage_outofspace_notification_text">Click to free up space.</string>
+    <!-- Used in the Browser Settings -->
+    <string name="webstorage_clear_data_title">Clear stored data</string>
+    <string name="webstorage_clear_data_summary">Remove all databases associated with this website</string>
+    <!-- Confirmation dialog when the user ask to clear all data for an origin -->
+    <string name="webstorage_clear_data_dialog_title">Clear stored data</string>
+    <string name="webstorage_clear_data_dialog_message">All data stored by this website will be deleted</string>
+    <string name="webstorage_clear_data_dialog_ok_button">Clear all</string>
+    <string name="webstorage_clear_data_dialog_cancel_button">Cancel</string>
+    <!-- Strings used in the summary of origins -->
+    <string name="webstorage_origin_summary_mb_stored">MB stored on your phone</string>
+        <!-- String shown in a progress view while a video is loading, before it starts playing -->
+    <string name="loading_video">Loading video</string>
 
-    <string name="settings_title">Gears settings</string>
-    <string name="privacy_policy">Read the site\'s privacy policy to see how your location will be used.</string>
-    <string name="settings_storage_title">Allow Local Storage</string>
-    <string name="settings_storage_subtitle_on">This site can save information to your phone</string>
-    <string name="settings_storage_subtitle_off">This site cannot save information to your phone</string>
+    <!-- Geolocation -->
+    <!-- Permissions prompt -->
+    <string name="geolocation_permissions_prompt_message"><xliff:g id="website origin" example="maps.google.com">%s</xliff:g> wants to know your location</string>
+    <string name="geolocation_permissions_prompt_share">Share location</string>
+    <string name="geolocation_permissions_prompt_dont_share">Decline</string>
+    <string name="geolocation_permissions_prompt_remember">Remember preference</string>
+    <!-- Settings page, Advanced Settings -> Website settings -> <origin> -->
+    <string name="geolocation_settings_page_title">Clear location access</string>
+    <string name="geolocation_settings_page_summary_allowed">This site can currently access your location</string>
+    <string name="geolocation_settings_page_summary_not_allowed">This site cannot currently access your location</string>
+    <!-- Settings page dialog -->
+    <string name="geolocation_settings_page_dialog_title">Clear location access</string>
+    <string name="geolocation_settings_page_dialog_message">Location access for this website will be cleared</string>
+    <string name="geolocation_settings_page_dialog_ok_button">Clear access</string>
+    <string name="geolocation_settings_page_dialog_cancel_button">Cancel</string>
+    <!-- Label for the menu item in the website settings activity used to clear data stored by all websites -->
+    <string name="website_settings_clear_all">Clear all</string>
+    <string name="website_settings_clear_all_dialog_title">Clear all website settings?</string>
+    <string name="website_settings_clear_all_dialog_message">All website data and location permissions will be deleted.</string>
+    <string name="website_settings_clear_all_dialog_ok_button">Delete all data</string>
+    <string name="website_settings_clear_all_dialog_cancel_button">Cancel</string>
 
-    <string name="settings_location_title">Allow Location Detection</string>
-    <string name="settings_location_subtitle_on">This site can read your current location</string>
-    <string name="settings_location_subtitle_off">This site cannot read your current location</string>
-
-    <string name="settings_remove_site">Remove this site from Gears</string>
-    <string name="settings_empty">No permissions set</string>
-
-    <string name="settings_confirmation_remove_title">Remove this site</string>
-    <string name="settings_confirmation_remove">All permissions will be cleared, and any data stored on your phone by the site will be deleted.</string>
-
-    <string name="storage_notification">This site will store information on this phone.\n Change this setting in:\n Settings -> Gears Settings</string>
-    <string name="storage_notification_alwaysdeny">This site will never store information on this phone.\n Change this setting in:\n Settings -> Gears Settings</string>
-    <string name="location_notification">This site can access your current location.\n Change this setting in:\n Settings -> Gears Settings</string>
-    <string name="location_notification_alwaysdeny">This site will not access your current location.\n Change this setting in:\n Settings -> Gears Settings</string>
-    <string name="shortcut_notification">Shortcut created</string>
-
-    <string name="permission_button_alwaysdeny">Never Allow</string>
-    <string name="permission_button_allow">OK</string>
-    <string name="permission_button_deny">Cancel</string>
-
-    <string name="shortcut_button_alwaysdeny">Never Allow</string>
-    <string name="shortcut_button_allow">OK</string>
-    <string name="shortcut_button_deny">Cancel</string>
-
-    <string name="settings_button_allow">Apply</string>
-    <string name="settings_button_deny">Cancel</string>
-
-    <string name="filepicker_button_allow">OK</string>
-    <string name="filepicker_button_deny">Cancel</string>
-    <string name="filepicker_path">path:</string>
-    <string name="filepicker_no_files_selected">No files selected</string>
-    <string name="filepicker_one_file_selected">One file selected</string>
-    <string name="filepicker_some_files_selected">files selected</string>
-
-    <string name="remove">Remove</string>
-    <string name="local_storage">Local storage</string>
-    <string name="allowed">Allowed</string>
-    <string name="denied">Denied</string>
-
-    <string name="unrecognized_dialog_message">Unrecognized dialog type</string>
-    <string name="default_button">OK</string>
 
     <!-- Zoom-related strings --><skip />
     <!-- Caption for a button that is shown when the zoom widget is showing.  The button's action will switch to the zoom overview mode. -->
     <string name="zoom_overview_button_text">Overview</string>
+
+    <string name="error_console_header_text_minimized" translatable="false">Show JavaScript console</string>
+    <string name="error_console_header_text_maximized" translatable="false">JavaScript console</string>
+    <string name="error_console_eval_text_hint" translatable="false">Evaluate JavaScript</string>
+    <string name="error_console_eval_button_text" translatable="false">Evaluate</string>
+
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f20220f..fa29a2a 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -21,7 +21,14 @@
     <style name="BrowserTheme" parent="@android:Theme.Black">
         <item name="android:windowBackground">@color/white</item>
         <item name="android:colorBackground">#FFFFFFFF</item>
-        <item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextView</item>        
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextView</item>
+    </style>
+
+    <style name="BookmarkTheme" parent="@android:Theme.Black">
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:windowContentOverlay">@null</item>
     </style>
 
     <style name="AutoCompleteTextView">
@@ -35,15 +42,14 @@
         <item name="android:popupBackground">@android:drawable/spinner_dropdown_background</item>
     </style>
 
-    <style name="gears_button">
-      <item name="android:background">@drawable/gears_button</item>
-    </style>
-
     <style name="FindDialog">
         <item name="android:windowEnterAnimation">@anim/find_dialog_enter</item>
         <item name="android:windowExitAnimation">@anim/find_dialog_exit</item>
     </style>
 
-
+    <style name="TitleBar">
+        <item name="android:windowEnterAnimation">@anim/title_bar_enter</item>
+        <item name="android:windowExitAnimation">@anim/title_bar_exit</item>
+    </style>
 </resources>
 
diff --git a/res/xml/browser_preferences.xml b/res/xml/browser_preferences.xml
index 23618c5..1845e20 100644
--- a/res/xml/browser_preferences.xml
+++ b/res/xml/browser_preferences.xml
@@ -36,6 +36,12 @@
                 android:entryValues="@array/pref_default_zoom_values"
                 android:dialogTitle="@string/pref_default_zoom_dialogtitle" />
 
+        <CheckBoxPreference
+                android:key="load_page"
+                android:defaultValue="true"
+                android:title="@string/pref_content_load_page"
+                android:summary="@string/pref_content_load_page_summary" />
+
         <ListPreference
                 android:key="default_text_encoding"
                 android:title="@string/pref_default_text_encoding"
@@ -62,10 +68,21 @@
                 android:summary="@string/pref_content_autofit_summary" />  
 
         <CheckBoxPreference
+                android:key="landscape_only"
+                android:defaultValue="false"
+                android:title="@string/pref_content_landscape_only"
+                android:summary="@string/pref_content_landscape_only_summary" />
+
+        <CheckBoxPreference
                 android:key="enable_javascript"
                 android:defaultValue="true"
                 android:title="@string/pref_content_javascript" />     
-            
+
+        <CheckBoxPreference
+                android:key="enable_plugins"
+                android:defaultValue="true"
+                android:title="@string/pref_content_plugins" />
+
         <CheckBoxPreference
                 android:key="open_in_background"
                 android:defaultValue="false"
@@ -128,6 +145,21 @@
                 android:dialogTitle="@string/clear" 
                 android:dialogIcon="@android:drawable/ic_dialog_alert"/>
 
+        <CheckBoxPreference
+                android:key="enable_geolocation"
+                android:defaultValue="true"
+                android:title="@string/pref_privacy_enable_geolocation"
+                android:summary="@string/pref_privacy_enable_geolocation_summary" />
+
+        <com.android.browser.BrowserYesNoPreference
+                android:key="privacy_clear_geolocation_access"
+                android:dependency="enable_geolocation"
+                android:title="@string/pref_privacy_clear_geolocation_access"
+                android:summary="@string/pref_privacy_clear_geolocation_access_summary"
+                android:dialogMessage="@string/pref_privacy_clear_geolocation_access_dlg"
+                android:dialogTitle="@string/clear"
+                android:dialogIcon="@android:drawable/ic_dialog_alert"/>
+
     </PreferenceCategory>
     
         <PreferenceCategory
@@ -157,21 +189,11 @@
     </PreferenceCategory>
     <PreferenceCategory
             android:title="@string/pref_extras_title">
-                     
-            <!-- This setting is named "Enable Gears" but is actually
-                 tied to enabling all plugins. -->
-            <CheckBoxPreference
-                    android:key="enable_plugins"
-                    android:defaultValue="true"
-                    android:title="@string/pref_extras_gears_enable"
-                    android:summary="@string/pref_extras_gears_enable_summary" />
 
-            <Preference
-                    android:key="gears_settings"
-                    android:persistent="false"
-                    android:dependency="enable_plugins"
-                    android:title="@string/pref_extras_gears_settings"
-                    android:summary="@string/pref_extras_gears_settings_summary" />
+            <PreferenceScreen
+                  android:key="website_settings"
+                  android:title="@string/pref_extras_website_settings"
+                  android:summary="@string/pref_extras_website_settings_summary" />
 
             <com.android.browser.BrowserYesNoPreference
                     android:key="reset_default_preferences"
diff --git a/res/xml/debug_preferences.xml b/res/xml/debug_preferences.xml
index 22b5997..c1ed1e6 100644
--- a/res/xml/debug_preferences.xml
+++ b/res/xml/debug_preferences.xml
@@ -19,6 +19,13 @@
     <PreferenceCategory
         android:title="@string/pref_development_title" 
         android:key="debug_menu" >
+
+        <!-- The javascript console is enabled by default when the user has
+             also enabled debug mode by navigating to about:debug. -->
+        <CheckBoxPreference
+            android:key="javascript_console"
+            android:defaultValue="true"
+            android:title="@string/pref_development_error_console" />
                         
         <CheckBoxPreference
             android:key="small_screen"
@@ -50,6 +57,11 @@
             android:defaultValue="false"
             android:title="@string/pref_development_nav_dump" />
 
+        <EditTextPreference
+            android:key="js_engine_flags"
+            android:title="@string/js_engine_flags"
+            android:singleLine="true" />
+
         <ListPreference
             android:key="user_agent"
             android:title="@string/pref_development_uastring"
diff --git a/src/com/android/browser/ActiveTabsPage.java b/src/com/android/browser/ActiveTabsPage.java
new file mode 100644
index 0000000..90c417a
--- /dev/null
+++ b/src/com/android/browser/ActiveTabsPage.java
@@ -0,0 +1,161 @@
+/*
+ * 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.content.Context;
+import android.graphics.Bitmap;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class ActiveTabsPage extends LinearLayout {
+    private final BrowserActivity   mBrowserActivity;
+    private final LayoutInflater    mFactory;
+    private final TabControl        mControl;
+    private final TabsListAdapter   mAdapter;
+    private final ListView          mListView;
+
+    public ActiveTabsPage(BrowserActivity context, TabControl control) {
+        super(context);
+        mBrowserActivity = context;
+        mControl = control;
+        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.getTabCount() < TabControl.MAX_TABS) {
+                        position--;
+                    }
+                    boolean needToAttach = false;
+                    if (position == -1) {
+                        // Create a new tab
+                        mBrowserActivity.openTabToHomePage();
+                    } 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 = !mBrowserActivity.switchToTab(position);
+                    }
+                    mBrowserActivity.removeActiveTabPage(needToAttach);
+                }
+        });
+    }
+
+    /**
+     * Special class to hold the close drawable.  Its sole purpose is to allow
+     * 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 CloseHolder(Context context, AttributeSet attrs) {
+            super(context, attrs);
+        }
+
+        @Override
+        public void setPressed(boolean pressed) {
+            // If the parent is pressed, do not set to pressed.
+            if (pressed && ((View) getParent()).isPressed()) {
+                return;
+            }
+            super.setPressed(pressed);
+        }
+    }
+
+    private class TabsListAdapter extends BaseAdapter {
+        public int getCount() {
+            int count = mControl.getTabCount();
+            if (count < TabControl.MAX_TABS) {
+                count++;
+            }
+            return count;
+        }
+        public Object getItem(int position) {
+            return null;
+        }
+        public long getItemId(int position) {
+            return position;
+        }
+        public int getViewTypeCount() {
+            return 2;
+        }
+        public int getItemViewType(int position) {
+            if (mControl.getTabCount() < TabControl.MAX_TABS) {
+                position--;
+            }
+            // Do not recycle the "add new tab" item.
+            return position == -1 ? IGNORE_ITEM_VIEW_TYPE : 1;
+        }
+        public View getView(int position, View convertView, ViewGroup parent) {
+            final int tabCount = mControl.getTabCount();
+            if (tabCount < TabControl.MAX_TABS) {
+                position--;
+            }
+
+            if (convertView == null) {
+                convertView = mFactory.inflate(position == -1 ?
+                        R.layout.tab_view_add_tab : R.layout.tab_view, null);
+            }
+
+            if (position != -1) {
+                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);
+                TabControl.Tab tab = mControl.getTab(position);
+                mControl.populatePickerData(tab);
+                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) {
+                            mBrowserActivity.closeTab(
+                                    mControl.getTab(closePosition));
+                            if (tabCount == 1) {
+                                mBrowserActivity.openTabToHomePage();
+                                mBrowserActivity.removeActiveTabPage(false);
+                            } else {
+                                mListView.setAdapter(mAdapter);
+                            }
+                        }
+                });
+            }
+            return convertView;
+        }
+    }
+}
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index cf3fe70..81123ba 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -18,22 +18,24 @@
 
 import android.app.Activity;
 import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.database.Cursor;
+import android.graphics.Bitmap;
 import android.net.ParseException;
 import android.net.WebAddress;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.provider.Browser;
 import android.view.View;
 import android.view.Window;
-import android.webkit.WebIconDatabase;
 import android.widget.EditText;
 import android.widget.TextView;
 import android.widget.Toast;
 
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.Date;
 
 public class AddBookmarkPage extends Activity {
@@ -46,18 +48,19 @@
     private View        mCancelButton;
     private boolean     mEditingExisting;
     private Bundle      mMap;
-    
-    private static final String[]   mProjection = 
-        { "_id", "url", "bookmark", "created", "title", "visits" };
-    private static final String     WHERE_CLAUSE = "url = ?";
-    private final String[]          SELECTION_ARGS = new String[1];
+    private String      mTouchIconUrl;
+    private Bitmap      mThumbnail;
+    private String      mOriginalUrl;
+
+    // Message IDs
+    private static final int SAVE_BOOKMARK = 100;
+
+    private Handler mHandler;
 
     private View.OnClickListener mSaveBookmark = new View.OnClickListener() {
         public void onClick(View v) {
             if (save()) {
                 finish();
-                Toast.makeText(AddBookmarkPage.this, R.string.bookmark_saved,
-                        Toast.LENGTH_LONG).show();
             }
         }
     };
@@ -73,7 +76,7 @@
         requestWindowFeature(Window.FEATURE_LEFT_ICON);
         setContentView(R.layout.browser_add_bookmark);
         setTitle(R.string.save_to_bookmarks);
-        getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ic_dialog_bookmark);
+        getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.ic_list_bookmark);
         
         String title = null;
         String url = null;
@@ -86,7 +89,9 @@
                 setTitle(R.string.edit_bookmark);
             }
             title = mMap.getString("title");
-            url = mMap.getString("url");
+            url = mOriginalUrl = mMap.getString("url");
+            mTouchIconUrl = mMap.getString("touch_icon_url");
+            mThumbnail = (Bitmap) mMap.getParcelable("thumbnail");
         }
 
         mTitle = (EditText) findViewById(R.id.title);
@@ -94,7 +99,6 @@
         mAddress = (EditText) findViewById(R.id.address);
         mAddress.setText(url);
 
-
         View.OnClickListener accept = mSaveBookmark;
         mButton = (TextView) findViewById(R.id.OK);
         mButton.setOnClickListener(accept);
@@ -106,13 +110,59 @@
             mButton.requestFocus();
         }
     }
-    
+
+    private void createHandler() {
+        if (mHandler == null) {
+            mHandler = new Handler() {
+                @Override
+                public void handleMessage(Message msg) {
+                    switch (msg.what) {
+                        case SAVE_BOOKMARK:
+                            // Unbundle bookmark data.
+                            Bundle bundle = msg.getData();
+                            String title = bundle.getString("title");
+                            String url = bundle.getString("url");
+                            boolean invalidateThumbnail = bundle.getBoolean("invalidateThumbnail");
+                            Bitmap thumbnail = invalidateThumbnail
+                                    ? null : (Bitmap) bundle.getParcelable("thumbnail");
+                            String touchIconUrl = bundle.getString("touchIconUrl");
+
+                            // Save to the bookmarks DB.
+                            if (updateBookmarksDB(title, url, thumbnail, touchIconUrl)) {
+                                Toast.makeText(AddBookmarkPage.this, R.string.bookmark_saved,
+                                        Toast.LENGTH_LONG).show();
+                            } else {
+                                Toast.makeText(AddBookmarkPage.this, R.string.bookmark_not_saved,
+                                        Toast.LENGTH_LONG).show();
+                            }
+                            break;
+                    }
+                }
+            };
+        }
+    }
+
+    private boolean updateBookmarksDB(String title, String url, Bitmap thumbnail, String touchIconUrl) {
+        try {
+            final ContentResolver cr = getContentResolver();
+            Bookmarks.addBookmark(null, cr, url, title, thumbnail, true);
+            if (touchIconUrl != null) {
+                final Cursor c =
+                        BrowserBookmarksAdapter.queryBookmarksForUrl(cr, null, url, true);
+                new DownloadTouchIcon(cr, c, url).execute(mTouchIconUrl);
+            }
+        } catch (IllegalStateException e) {
+            return false;
+        }
+        return true;
+    }
+
     /**
-     *  Save the data to the database. 
-     *  Also, change the view to dialog stating 
-     *  that the webpage has been saved.
+     * Parse the data entered in the dialog and post a message to update the bookmarks database.
      */
     boolean save() {
+        createHandler();
+
         String title = mTitle.getText().toString().trim();
         String unfilteredUrl = 
                 BrowserActivity.fixUrl(mAddress.getText().toString());
@@ -129,98 +179,47 @@
             return false;
         }
         String url = unfilteredUrl;
-        if (!(url.startsWith("about:") || url.startsWith("data:") || url
-                .startsWith("file:"))) {
-            WebAddress address;
-            try {
-                address = new WebAddress(unfilteredUrl);
-            } catch (ParseException e) {
-                mAddress.setError(r.getText(R.string.bookmark_url_not_valid));
-                return false;
-            }
-            if (address.mHost.length() == 0) {
-                mAddress.setError(r.getText(R.string.bookmark_url_not_valid));
-                return false;
-            }
-            url = address.toString();
-        }
         try {
-            if (mEditingExisting) {
-                mMap.putString("title", title);
-                mMap.putString("url", url);
-                setResult(RESULT_OK, (new Intent()).setAction(
-                        getIntent().toString()).putExtras(mMap));
-            } else {
-                // Want to append to the beginning of the list
-                long creationTime = new Date().getTime();
-                SELECTION_ARGS[0] = url;
-                ContentResolver cr = getContentResolver();
-                Cursor c = cr.query(Browser.BOOKMARKS_URI,
-                        mProjection,
-                        WHERE_CLAUSE,
-                        SELECTION_ARGS,
-                        null);
-                ContentValues map = new ContentValues();
-                if (c.moveToFirst() && c.getInt(c.getColumnIndexOrThrow(
-                        Browser.BookmarkColumns.BOOKMARK)) == 0) {
-                    // This means we have been to this site but not bookmarked
-                    // it, so convert the history item to a bookmark                    
-                    map.put(Browser.BookmarkColumns.CREATED, creationTime);
-                    map.put(Browser.BookmarkColumns.TITLE, title);
-                    map.put(Browser.BookmarkColumns.BOOKMARK, 1);
-                    cr.update(Browser.BOOKMARKS_URI, map, 
-                            "_id = " + c.getInt(0), null);
-                } else {
-                    int count = c.getCount();
-                    boolean matchedTitle = false;
-                    for (int i = 0; i < count; i++) {
-                        // One or more bookmarks already exist for this site.
-                        // Check the names of each
-                        c.moveToPosition(i);
-                        if (c.getString(c.getColumnIndexOrThrow(
-                                Browser.BookmarkColumns.TITLE)).equals(title)) {
-                            // The old bookmark has the same name.
-                            // Update its creation time.
-                            map.put(Browser.BookmarkColumns.CREATED,
-                                    creationTime);
-                            cr.update(Browser.BOOKMARKS_URI, map, 
-                                    "_id = " + c.getInt(0), null);
-                            matchedTitle = true;
-                        }
-                    }
-                    if (!matchedTitle) {
-                        // Adding a bookmark for a site the user has visited,
-                        // or a new bookmark (with a different name) for a site
-                        // the user has visited
-                        map.put(Browser.BookmarkColumns.TITLE, title);
-                        map.put(Browser.BookmarkColumns.URL, url);
-                        map.put(Browser.BookmarkColumns.CREATED, creationTime);
-                        map.put(Browser.BookmarkColumns.BOOKMARK, 1);
-                        map.put(Browser.BookmarkColumns.DATE, 0);
-                        int visits = 0;
-                        if (count > 0) {
-                            // The user has already bookmarked, and possibly
-                            // visited this site.  However, they are creating
-                            // a new bookmark with the same url but a different
-                            // name.  The new bookmark should have the same
-                            // number of visits as the already created bookmark.
-                            visits = c.getInt(c.getColumnIndexOrThrow(
-                                    Browser.BookmarkColumns.VISITS));
-                        }
-                        // Bookmark starts with 3 extra visits so that it will
-                        // bubble up in the most visited and goto search box
-                        map.put(Browser.BookmarkColumns.VISITS, visits + 3);
-                        cr.insert(Browser.BOOKMARKS_URI, map);
-                    }
+            URI uriObj = new URI(url);
+            String scheme = uriObj.getScheme();
+            if (!("about".equals(scheme) || "data".equals(scheme)
+                    || "javascript".equals(scheme)
+                    || "file".equals(scheme) || "content".equals(scheme))) {
+                WebAddress address;
+                try {
+                    address = new WebAddress(unfilteredUrl);
+                } catch (ParseException e) {
+                    throw new URISyntaxException("", "");
                 }
-                WebIconDatabase.getInstance().retainIconForPageUrl(url);
-                c.deactivate();
-                setResult(RESULT_OK);
+                if (address.mHost.length() == 0) {
+                    throw new URISyntaxException("", "");
+                }
+                url = address.toString();
             }
-        } catch (IllegalStateException e) {
-            setTitle(r.getText(R.string.no_database));
+        } catch (URISyntaxException e) {
+            mAddress.setError(r.getText(R.string.bookmark_url_not_valid));
             return false;
         }
+
+        if (mEditingExisting) {
+            mMap.putString("title", title);
+            mMap.putString("url", url);
+            mMap.putBoolean("invalidateThumbnail", !url.equals(mOriginalUrl));
+            setResult(RESULT_OK, (new Intent()).setAction(
+                    getIntent().toString()).putExtras(mMap));
+        } else {
+            // Post a message to write to the DB.
+            Bundle bundle = new Bundle();
+            bundle.putString("title", title);
+            bundle.putString("url", url);
+            bundle.putParcelable("thumbnail", mThumbnail);
+            bundle.putBoolean("invalidateThumbnail", !url.equals(mOriginalUrl));
+            bundle.putString("touchIconUrl", mTouchIconUrl);
+            Message msg = Message.obtain(mHandler, SAVE_BOOKMARK);
+            msg.setData(bundle);
+            mHandler.sendMessage(msg);
+            setResult(RESULT_OK);
+        }
         return true;
     }
 }
diff --git a/src/com/android/browser/AddNewBookmark.java b/src/com/android/browser/AddNewBookmark.java
index a75d002..5308f6b 100644
--- a/src/com/android/browser/AddNewBookmark.java
+++ b/src/com/android/browser/AddNewBookmark.java
@@ -47,17 +47,7 @@
         mUrlText = (TextView) findViewById(R.id.url);
         mImageView = (ImageView) findViewById(R.id.favicon);
     }
-    
-    /**
-     *  Copy this BookmarkItem to item.
-     *  @param item BookmarkItem to receive the info from this BookmarkItem.
-     */
-    /* package */ void copyTo(AddNewBookmark item) {
-        item.mTextView.setText(mTextView.getText());
-        item.mUrlText.setText(mUrlText.getText());
-        item.mImageView.setImageDrawable(mImageView.getDrawable());
-    }
-    
+
     /**
      *  Set the new url for the bookmark item.
      *  @param url  The new url for the bookmark item.
diff --git a/src/com/android/browser/Bookmarks.java b/src/com/android/browser/Bookmarks.java
new file mode 100644
index 0000000..c8aaee7
--- /dev/null
+++ b/src/com/android/browser/Bookmarks.java
@@ -0,0 +1,217 @@
+/*
+ * 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.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.provider.Browser;
+import android.util.Log;
+import android.webkit.WebIconDatabase;
+import android.widget.Toast;
+
+import java.io.ByteArrayOutputStream;
+import java.util.Date;
+
+/**
+ *  This class is purely to have a common place for adding/deleting bookmarks.
+ */
+/* package */ class Bookmarks {
+    private static final String     WHERE_CLAUSE
+            = "url = ? OR url = ? OR url = ? OR url = ?";
+    private static final String     WHERE_CLAUSE_SECURE = "url = ? OR url = ?";
+
+    private static String[]         SELECTION_ARGS;
+
+    /**
+     *  Add a bookmark to the database.
+     *  @param context Context of the calling Activity.  This is used to make
+     *          Toast confirming that the bookmark has been added.  If the
+     *          caller provides null, the Toast will not be shown.
+     *  @param cr The ContentResolver being used to add the bookmark to the db.
+     *  @param url URL of the website to be bookmarked.
+     *  @param name Provided name for the bookmark.
+     *  @param thumbnail A thumbnail for the bookmark.
+     *  @param retainIcon Whether to retain the page's icon in the icon database.
+     *          This will usually be <code>true</code> except when bookmarks are
+     *          added by a settings restore agent.
+     */
+    /* package */ static void addBookmark(Context context,
+            ContentResolver cr, String url, String name,
+            Bitmap thumbnail, boolean retainIcon) {
+        // Want to append to the beginning of the list
+        long creationTime = new Date().getTime();
+        // First we check to see if the user has already visited this
+        // site.  They may have bookmarked it in a different way from
+        // how it's stored in the database, so allow different combos
+        // to map to the same url.
+        boolean secure = false;
+        String compareString = url;
+        if (compareString.startsWith("http://")) {
+            compareString = compareString.substring(7);
+        } else if (compareString.startsWith("https://")) {
+            compareString = compareString.substring(8);
+            secure = true;
+        }
+        if (compareString.startsWith("www.")) {
+            compareString = compareString.substring(4);
+        }
+        if (secure) {
+            SELECTION_ARGS = new String[2];
+            SELECTION_ARGS[0] = "https://" + compareString;
+            SELECTION_ARGS[1] = "https://www." + compareString;
+        } else {
+            SELECTION_ARGS = new String[4];
+            SELECTION_ARGS[0] = compareString;
+            SELECTION_ARGS[1] = "www." + compareString;
+            SELECTION_ARGS[2] = "http://" + compareString;
+            SELECTION_ARGS[3] = "http://" + SELECTION_ARGS[1];
+        }
+        Cursor cursor = cr.query(Browser.BOOKMARKS_URI,
+                Browser.HISTORY_PROJECTION,
+                secure ? WHERE_CLAUSE_SECURE : WHERE_CLAUSE,
+                SELECTION_ARGS,
+                null);
+        ContentValues map = new ContentValues();
+        if (cursor.moveToFirst() && cursor.getInt(
+                Browser.HISTORY_PROJECTION_BOOKMARK_INDEX) == 0) {
+            // This means we have been to this site but not bookmarked
+            // it, so convert the history item to a bookmark
+            map.put(Browser.BookmarkColumns.CREATED, creationTime);
+            map.put(Browser.BookmarkColumns.TITLE, name);
+            map.put(Browser.BookmarkColumns.BOOKMARK, 1);
+            map.put(Browser.BookmarkColumns.THUMBNAIL, bitmapToBytes(thumbnail));
+            cr.update(Browser.BOOKMARKS_URI, map,
+                    "_id = " + cursor.getInt(0), null);
+        } else {
+            int count = cursor.getCount();
+            boolean matchedTitle = false;
+            for (int i = 0; i < count; i++) {
+                // One or more bookmarks already exist for this site.
+                // Check the names of each
+                cursor.moveToPosition(i);
+                if (cursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX)
+                        .equals(name)) {
+                    // The old bookmark has the same name.
+                    // Update its creation time.
+                    map.put(Browser.BookmarkColumns.CREATED,
+                            creationTime);
+                    cr.update(Browser.BOOKMARKS_URI, map,
+                            "_id = " + cursor.getInt(0), null);
+                    matchedTitle = true;
+                    break;
+                }
+            }
+            if (!matchedTitle) {
+                // Adding a bookmark for a site the user has visited,
+                // or a new bookmark (with a different name) for a site
+                // the user has visited
+                map.put(Browser.BookmarkColumns.TITLE, name);
+                map.put(Browser.BookmarkColumns.URL, url);
+                map.put(Browser.BookmarkColumns.CREATED, creationTime);
+                map.put(Browser.BookmarkColumns.BOOKMARK, 1);
+                map.put(Browser.BookmarkColumns.DATE, 0);
+                map.put(Browser.BookmarkColumns.THUMBNAIL, bitmapToBytes(thumbnail));
+                int visits = 0;
+                if (count > 0) {
+                    // The user has already bookmarked, and possibly
+                    // visited this site.  However, they are creating
+                    // a new bookmark with the same url but a different
+                    // name.  The new bookmark should have the same
+                    // number of visits as the already created bookmark.
+                    visits = cursor.getInt(
+                            Browser.HISTORY_PROJECTION_VISITS_INDEX);
+                }
+                // Bookmark starts with 3 extra visits so that it will
+                // bubble up in the most visited and goto search box
+                map.put(Browser.BookmarkColumns.VISITS, visits + 3);
+                cr.insert(Browser.BOOKMARKS_URI, map);
+            }
+        }
+        if (retainIcon) {
+            WebIconDatabase.getInstance().retainIconForPageUrl(url);
+        }
+        cursor.deactivate();
+        if (context != null) {
+            Toast.makeText(context, R.string.added_to_bookmarks,
+                    Toast.LENGTH_LONG).show();
+        }
+    }
+
+    /**
+     *  Remove a bookmark from the database.  If the url is a visited site, it
+     *  will remain in the database, but only as a history item, and not as a
+     *  bookmarked site.
+     *  @param context Context of the calling Activity.  This is used to make
+     *          Toast confirming that the bookmark has been removed.  If the
+     *          caller provides null, the Toast will not be shown.
+     *  @param cr The ContentResolver being used to remove the bookmark.
+     *  @param url URL of the website to be removed.
+     */
+    /* package */ static void removeFromBookmarks(Context context,
+            ContentResolver cr, String url, String title) {
+        Cursor cursor = cr.query(
+                Browser.BOOKMARKS_URI,
+                Browser.HISTORY_PROJECTION,
+                "url = ? AND title = ?",
+                new String[] { url, title },
+                null);
+        boolean first = cursor.moveToFirst();
+        // Should be in the database no matter what
+        if (!first) {
+            throw new AssertionError("URL is not in the database! " + url + " " + title);
+        }
+        // Remove from bookmarks
+        WebIconDatabase.getInstance().releaseIconForPageUrl(url);
+        Uri uri = ContentUris.withAppendedId(Browser.BOOKMARKS_URI,
+                cursor.getInt(Browser.HISTORY_PROJECTION_ID_INDEX));
+        int numVisits = cursor.getInt(
+                Browser.HISTORY_PROJECTION_VISITS_INDEX);
+        if (0 == numVisits) {
+            cr.delete(uri, null, null);
+        } else {
+            // It is no longer a bookmark, but it is still a visited
+            // site.
+            ContentValues values = new ContentValues();
+            values.put(Browser.BookmarkColumns.BOOKMARK, 0);
+            try {
+                cr.update(uri, values, null, null);
+            } catch (IllegalStateException e) {
+                Log.e("removeFromBookmarks", "no database!");
+            }
+        }
+        if (context != null) {
+            Toast.makeText(context, R.string.removed_from_bookmarks,
+                    Toast.LENGTH_LONG).show();
+        }
+        cursor.deactivate();
+    }
+
+    private static byte[] bitmapToBytes(Bitmap bm) {
+        if (bm == null) {
+            return null;
+        }
+
+        final ByteArrayOutputStream os = new ByteArrayOutputStream();
+        bm.compress(Bitmap.CompressFormat.PNG, 100, os);
+        return os.toByteArray();
+    }
+}
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index b58af66..65b7911 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -20,7 +20,6 @@
 import com.google.android.googlelogin.GoogleLoginServiceConstants;
 
 import android.app.Activity;
-import android.app.ActivityManager;
 import android.app.AlertDialog;
 import android.app.ProgressDialog;
 import android.app.SearchManager;
@@ -28,6 +27,7 @@
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
+import android.content.ContentUris;
 import android.content.ContentValues;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -35,6 +35,7 @@
 import android.content.IntentFilter;
 import android.content.ServiceConnection;
 import android.content.DialogInterface.OnCancelListener;
+import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.res.AssetManager;
@@ -44,19 +45,19 @@
 import android.database.sqlite.SQLiteDatabase;
 import android.database.sqlite.SQLiteException;
 import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
-import android.graphics.Color;
 import android.graphics.DrawFilter;
 import android.graphics.Paint;
 import android.graphics.PaintFlagsDrawFilter;
 import android.graphics.Picture;
-import android.graphics.drawable.BitmapDrawable;
+import android.graphics.PixelFormat;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
-import android.graphics.drawable.LayerDrawable;
-import android.graphics.drawable.PaintDrawable;
 import android.hardware.SensorListener;
 import android.hardware.SensorManager;
 import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
 import android.net.Uri;
 import android.net.WebAddress;
 import android.net.http.EventHandler;
@@ -75,14 +76,15 @@
 import android.os.ServiceManager;
 import android.os.SystemClock;
 import android.provider.Browser;
-import android.provider.Contacts;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Intents.Insert;
 import android.provider.Downloads;
 import android.provider.MediaStore;
-import android.provider.Contacts.Intents.Insert;
 import android.text.IClipboard;
 import android.text.TextUtils;
 import android.text.format.DateFormat;
 import android.text.util.Regex;
+import android.util.AttributeSet;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.Gravity;
@@ -106,12 +108,17 @@
 import android.webkit.CookieManager;
 import android.webkit.CookieSyncManager;
 import android.webkit.DownloadListener;
+import android.webkit.GeolocationPermissions;
 import android.webkit.HttpAuthHandler;
+import android.webkit.PluginManager;
 import android.webkit.SslErrorHandler;
 import android.webkit.URLUtil;
+import android.webkit.ValueCallback;
 import android.webkit.WebChromeClient;
+import android.webkit.WebChromeClient.CustomViewCallback;
 import android.webkit.WebHistoryItem;
 import android.webkit.WebIconDatabase;
+import android.webkit.WebStorage;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
 import android.widget.EditText;
@@ -121,6 +128,7 @@
 import android.widget.Toast;
 
 import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -143,8 +151,7 @@
 import java.util.zip.ZipFile;
 
 public class BrowserActivity extends Activity
-    implements KeyTracker.OnKeyTracker,
-        View.OnCreateContextMenuListener,
+    implements View.OnCreateContextMenuListener,
         DownloadListener {
 
     /* Define some aliases to make these debugging flags easier to refer to.
@@ -268,382 +275,31 @@
                     mGlsConnection, Context.BIND_AUTO_CREATE);
     }
 
-    /**
-     * This class is in charge of installing pre-packaged plugins
-     * from the Browser assets directory to the user's data partition.
-     * Plugins are loaded from the "plugins" directory in the assets;
-     * Anything that is in this directory will be copied over to the
-     * user data partition in app_plugins.
-     */
-    private class CopyPlugins implements Runnable {
-        final static String TAG = "PluginsInstaller";
-        final static String ZIP_FILTER = "assets/plugins/";
-        final static String APK_PATH = "/system/app/Browser.apk";
-        final static String PLUGIN_EXTENSION = ".so";
-        final static String TEMPORARY_EXTENSION = "_temp";
-        final static String BUILD_INFOS_FILE = "build.prop";
-        final static String SYSTEM_BUILD_INFOS_FILE = "/system/"
-                              + BUILD_INFOS_FILE;
-        final int BUFSIZE = 4096;
-        boolean mDoOverwrite = false;
-        String pluginsPath;
-        Context mContext;
-        File pluginsDir;
-        AssetManager manager;
-
-        public CopyPlugins (boolean overwrite, Context context) {
-            mDoOverwrite = overwrite;
-            mContext = context;
-        }
-
-        /**
-         * Returned a filtered list of ZipEntry.
-         * We list all the files contained in the zip and
-         * only returns the ones starting with the ZIP_FILTER
-         * path.
-         *
-         * @param zip the zip file used.
-         */
-        public Vector<ZipEntry> pluginsFilesFromZip(ZipFile zip) {
-            Vector<ZipEntry> list = new Vector<ZipEntry>();
-            Enumeration entries = zip.entries();
-            while (entries.hasMoreElements()) {
-                ZipEntry entry = (ZipEntry) entries.nextElement();
-                if (entry.getName().startsWith(ZIP_FILTER)) {
-                  list.add(entry);
-                }
-            }
-            return list;
-        }
-
-        /**
-         * Utility method to copy the content from an inputstream
-         * to a file output stream.
-         */
-        public void copyStreams(InputStream is, FileOutputStream fos) {
-            BufferedOutputStream os = null;
-            try {
-                byte data[] = new byte[BUFSIZE];
-                int count;
-                os = new BufferedOutputStream(fos, BUFSIZE);
-                while ((count = is.read(data, 0, BUFSIZE)) != -1) {
-                    os.write(data, 0, count);
-                }
-                os.flush();
-            } catch (IOException e) {
-                Log.e(TAG, "Exception while copying: " + e);
-            } finally {
-              try {
-                if (os != null) {
-                    os.close();
-                }
-              } catch (IOException e2) {
-                Log.e(TAG, "Exception while closing the stream: " + e2);
-              }
-            }
-        }
-
-        /**
-         * Returns a string containing the contents of a file
-         *
-         * @param file the target file
-         */
-        private String contentsOfFile(File file) {
-          String ret = null;
-          FileInputStream is = null;
-          try {
-            byte[] buffer = new byte[BUFSIZE];
-            int count;
-            is = new FileInputStream(file);
-            StringBuffer out = new StringBuffer();
-
-            while ((count = is.read(buffer, 0, BUFSIZE)) != -1) {
-              out.append(new String(buffer, 0, count));
-            }
-            ret = out.toString();
-          } catch (IOException e) {
-            Log.e(TAG, "Exception getting contents of file " + e);
-          } finally {
-            if (is != null) {
-              try {
-                is.close();
-              } catch (IOException e2) {
-                Log.e(TAG, "Exception while closing the file: " + e2);
-              }
-            }
-          }
-          return ret;
-        }
-
-        /**
-         * Utility method to initialize the user data plugins path.
-         */
-        public void initPluginsPath() {
-            BrowserSettings s = BrowserSettings.getInstance();
-            pluginsPath = s.getPluginsPath();
-            if (pluginsPath == null) {
-                s.loadFromDb(mContext);
-                pluginsPath = s.getPluginsPath();
-            }
-            if (LOGV_ENABLED) {
-                Log.v(TAG, "Plugin path: " + pluginsPath);
-            }
-        }
-
-        /**
-         * Utility method to delete a file or a directory
-         *
-         * @param file the File to delete
-         */
-        public void deleteFile(File file) {
-            File[] files = file.listFiles();
-            if ((files != null) && files.length > 0) {
-              for (int i=0; i< files.length; i++) {
-                deleteFile(files[i]);
-              }
-            }
-            if (!file.delete()) {
-              Log.e(TAG, file.getPath() + " could not get deleted");
-            }
-        }
-
-        /**
-         * Clean the content of the plugins directory.
-         * We delete the directory, then recreate it.
-         */
-        public void cleanPluginsDirectory() {
-          if (LOGV_ENABLED) {
-            Log.v(TAG, "delete plugins directory: " + pluginsPath);
-          }
-          File pluginsDirectory = new File(pluginsPath);
-          deleteFile(pluginsDirectory);
-          pluginsDirectory.mkdir();
-        }
-
-
-        /**
-         * Copy the SYSTEM_BUILD_INFOS_FILE file containing the
-         * informations about the system build to the
-         * BUILD_INFOS_FILE in the plugins directory.
-         */
-        public void copyBuildInfos() {
-          try {
-            if (LOGV_ENABLED) {
-              Log.v(TAG, "Copy build infos to the plugins directory");
-            }
-            File buildInfoFile = new File(SYSTEM_BUILD_INFOS_FILE);
-            File buildInfoPlugins = new File(pluginsPath, BUILD_INFOS_FILE);
-            copyStreams(new FileInputStream(buildInfoFile),
-                        new FileOutputStream(buildInfoPlugins));
-          } catch (IOException e) {
-            Log.e(TAG, "Exception while copying the build infos: " + e);
-          }
-        }
-
-        /**
-         * Returns true if the current system is newer than the
-         * system that installed the plugins.
-         * We determinate this by checking the build number of the system.
-         *
-         * At the end of the plugins copy operation, we copy the
-         * SYSTEM_BUILD_INFOS_FILE to the BUILD_INFOS_FILE.
-         * We then just have to load both and compare them -- if they
-         * are different the current system is newer.
-         *
-         * Loading and comparing the strings should be faster than
-         * creating a hash, the files being rather small. Extracting the
-         * version number would require some parsing which may be more
-         * brittle.
-         */
-        public boolean newSystemImage() {
-          try {
-            File buildInfoFile = new File(SYSTEM_BUILD_INFOS_FILE);
-            File buildInfoPlugins = new File(pluginsPath, BUILD_INFOS_FILE);
-            if (!buildInfoPlugins.exists()) {
-              if (LOGV_ENABLED) {
-                Log.v(TAG, "build.prop in plugins directory " + pluginsPath
-                  + " does not exist, therefore it's a new system image");
-              }
-              return true;
-            } else {
-              String buildInfo = contentsOfFile(buildInfoFile);
-              String buildInfoPlugin = contentsOfFile(buildInfoPlugins);
-              if (buildInfo == null || buildInfoPlugin == null
-                  || buildInfo.compareTo(buildInfoPlugin) != 0) {
-                if (LOGV_ENABLED) {
-                  Log.v(TAG, "build.prop are different, "
-                    + " therefore it's a new system image");
-                }
-                return true;
-              }
-            }
-          } catch (Exception e) {
-            Log.e(TAG, "Exc in newSystemImage(): " + e);
-          }
-          return false;
-        }
-
-        /**
-         * Check if the version of the plugins contained in the
-         * Browser assets is the same as the version of the plugins
-         * in the plugins directory.
-         * We simply iterate on every file in the assets/plugins
-         * and return false if a file listed in the assets does
-         * not exist in the plugins directory.
-         */
-        private boolean checkIsDifferentVersions() {
-          try {
-            ZipFile zip = new ZipFile(APK_PATH);
-            Vector<ZipEntry> files = pluginsFilesFromZip(zip);
-            int zipFilterLength = ZIP_FILTER.length();
-
-            Enumeration entries = files.elements();
-            while (entries.hasMoreElements()) {
-              ZipEntry entry = (ZipEntry) entries.nextElement();
-              String path = entry.getName().substring(zipFilterLength);
-              File outputFile = new File(pluginsPath, path);
-              if (!outputFile.exists()) {
-                if (LOGV_ENABLED) {
-                  Log.v(TAG, "checkIsDifferentVersions(): extracted file "
-                    + path + " does not exist, we have a different version");
-                }
-                return true;
-              }
-            }
-          } catch (IOException e) {
-            Log.e(TAG, "Exception in checkDifferentVersions(): " + e);
-          }
-          return false;
-        }
-
-        /**
-         * Copy every files from the assets/plugins directory
-         * to the app_plugins directory in the data partition.
-         * Once copied, we copy over the SYSTEM_BUILD_INFOS file
-         * in the plugins directory.
-         *
-         * NOTE: we directly access the content from the Browser
-         * package (it's a zip file) and do not use AssetManager
-         * as there is a limit of 1Mb (see Asset.h)
-         */
-        public void run() {
-            // Lower the priority
-            Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
-            try {
-                if (pluginsPath == null) {
-                    Log.e(TAG, "No plugins path found!");
-                    return;
-                }
-
-                ZipFile zip = new ZipFile(APK_PATH);
-                Vector<ZipEntry> files = pluginsFilesFromZip(zip);
-                Vector<File> plugins = new Vector<File>();
-                int zipFilterLength = ZIP_FILTER.length();
-
-                Enumeration entries = files.elements();
-                while (entries.hasMoreElements()) {
-                    ZipEntry entry = (ZipEntry) entries.nextElement();
-                    String path = entry.getName().substring(zipFilterLength);
-                    File outputFile = new File(pluginsPath, path);
-                    outputFile.getParentFile().mkdirs();
-
-                    if (outputFile.exists() && !mDoOverwrite) {
-                        if (LOGV_ENABLED) {
-                            Log.v(TAG, path + " already extracted.");
-                        }
-                    } else {
-                        if (path.endsWith(PLUGIN_EXTENSION)) {
-                            // We rename plugins to be sure a half-copied
-                            // plugin is not loaded by the browser.
-                            plugins.add(outputFile);
-                            outputFile = new File(pluginsPath,
-                                path + TEMPORARY_EXTENSION);
-                        }
-                        FileOutputStream fos = new FileOutputStream(outputFile);
-                        if (LOGV_ENABLED) {
-                            Log.v(TAG, "copy " + entry + " to "
-                                + pluginsPath + "/" + path);
-                        }
-                        copyStreams(zip.getInputStream(entry), fos);
-                    }
-                }
-
-                // We now rename the .so we copied, once all their resources
-                // are safely copied over to the user data partition.
-                Enumeration elems = plugins.elements();
-                while (elems.hasMoreElements()) {
-                    File renamedFile = (File) elems.nextElement();
-                    File sourceFile = new File(renamedFile.getPath()
-                        + TEMPORARY_EXTENSION);
-                    if (LOGV_ENABLED) {
-                        Log.v(TAG, "rename " + sourceFile.getPath()
-                            + " to " + renamedFile.getPath());
-                    }
-                    sourceFile.renameTo(renamedFile);
-                }
-
-                copyBuildInfos();
-
-                // Refresh the plugin list.
-                if (mTabControl.getCurrentWebView() != null) {
-                    mTabControl.getCurrentWebView().refreshPlugins(false);
-                }
-            } catch (IOException e) {
-                Log.e(TAG, "IO Exception: " + e);
-            }
-        }
-    };
-
-    /**
-     * Copy the content of assets/plugins/ to the app_plugins directory
-     * in the data partition.
-     *
-     * This function is called every time the browser is started.
-     * We first check if the system image is newer than the one that
-     * copied the plugins (if there's plugins in the data partition).
-     * If this is the case, we then check if the versions are different.
-     * If they are different, we clean the plugins directory in the
-     * data partition, then start a thread to copy the plugins while
-     * the browser continue to load.
-     *
-     * @param overwrite if true overwrite the files even if they are
-     * already present (to let the user "reset" the plugins if needed).
-     */
-    private void copyPlugins(boolean overwrite) {
-        CopyPlugins copyPluginsFromAssets = new CopyPlugins(overwrite, this);
-        copyPluginsFromAssets.initPluginsPath();
-        if (copyPluginsFromAssets.newSystemImage())  {
-          if (copyPluginsFromAssets.checkIsDifferentVersions()) {
-            copyPluginsFromAssets.cleanPluginsDirectory();
-            Thread copyplugins = new Thread(copyPluginsFromAssets);
-            copyplugins.setName("CopyPlugins");
-            copyplugins.start();
-          }
-        }
-    }
-
-    private class ClearThumbnails extends AsyncTask<File, Void, Void> {
+    private static class ClearThumbnails extends AsyncTask<File, Void, Void> {
         @Override
         public Void doInBackground(File... files) {
             if (files != null) {
                 for (File f : files) {
-                    f.delete();
+                    if (!f.delete()) {
+                      Log.e(LOGTAG, f.getPath() + " was not deleted");
+                    }
                 }
             }
             return null;
         }
     }
 
+    /**
+     * This layout holds everything you see below the status bar, including the
+     * error console, the custom view container, and the webviews.
+     */
+    private FrameLayout mBrowserFrameLayout;
+
     @Override public void onCreate(Bundle icicle) {
         if (LOGV_ENABLED) {
             Log.v(LOGTAG, this + " onStart");
         }
         super.onCreate(icicle);
-        this.requestWindowFeature(Window.FEATURE_LEFT_ICON);
-        this.requestWindowFeature(Window.FEATURE_RIGHT_ICON);
-        this.requestWindowFeature(Window.FEATURE_PROGRESS);
-        this.requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-
         // test the browser in OpenGL
         // requestWindowFeature(Window.FEATURE_OPENGL);
 
@@ -651,6 +307,13 @@
 
         mResolver = getContentResolver();
 
+        // If this was a web search request, pass it on to the default web
+        // search provider and finish this activity.
+        if (handleWebSearchIntent(getIntent())) {
+            finish();
+            return;
+        }
+
         //
         // start MASF proxy service
         //
@@ -665,11 +328,19 @@
                 android.R.drawable.ic_secure);
         mMixLockIcon = Resources.getSystem().getDrawable(
                 android.R.drawable.ic_partial_secure);
-        mGenericFavicon = getResources().getDrawable(
-                R.drawable.app_web_browser_sm);
 
-        mContentView = (FrameLayout) getWindow().getDecorView().findViewById(
-                com.android.internal.R.id.content);
+        FrameLayout frameLayout = (FrameLayout) getWindow().getDecorView()
+                .findViewById(com.android.internal.R.id.content);
+        mBrowserFrameLayout = (FrameLayout) LayoutInflater.from(this)
+                .inflate(R.layout.custom_screen, null);
+        mContentView = (FrameLayout) mBrowserFrameLayout.findViewById(
+                R.id.main_content);
+        mErrorConsoleContainer = (LinearLayout) mBrowserFrameLayout
+                .findViewById(R.id.error_console);
+        mCustomViewContainer = (FrameLayout) mBrowserFrameLayout
+                .findViewById(R.id.fullscreen_custom_content);
+        frameLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
+        mTitleBar = new TitleBar(this);
 
         // Create the tab control and our initial tab
         mTabControl = new TabControl(this);
@@ -695,24 +366,69 @@
                 public void onReceive(Context context, Intent intent) {
                     if (intent.getAction().equals(
                             ConnectivityManager.CONNECTIVITY_ACTION)) {
-                        boolean down = intent.getBooleanExtra(
-                                ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
-                        onNetworkToggle(!down);
+                        NetworkInfo info =
+                                (NetworkInfo) intent.getParcelableExtra(
+                                        ConnectivityManager.EXTRA_NETWORK_INFO);
+                        onNetworkToggle(
+                                (info != null) ? info.isConnected() : false);
                     }
                 }
             };
 
-        // If this was a web search request, pass it on to the default web search provider.
-        if (handleWebSearchIntent(getIntent())) {
-            moveTaskToBack(true);
-            return;
-        }
+        IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
+        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
+        filter.addDataScheme("package");
+        mPackageInstallationReceiver = new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                final String packageName = intent.getData()
+                        .getSchemeSpecificPart();
+                final boolean replacing = intent.getBooleanExtra(
+                        Intent.EXTRA_REPLACING, false);
+                if (Intent.ACTION_PACKAGE_REMOVED.equals(action) && replacing) {
+                    // if it is replacing, refreshPlugins() when adding
+                    return;
+                }
+                PackageManager pm = BrowserActivity.this.getPackageManager();
+                PackageInfo pkgInfo = null;
+                try {
+                    pkgInfo = pm.getPackageInfo(packageName,
+                            PackageManager.GET_PERMISSIONS);
+                } catch (PackageManager.NameNotFoundException e) {
+                    return;
+                }
+                if (pkgInfo != null) {
+                    String permissions[] = pkgInfo.requestedPermissions;
+                    if (permissions == null) {
+                        return;
+                    }
+                    boolean permissionOk = false;
+                    for (String permit : permissions) {
+                        if (PluginManager.PLUGIN_PERMISSION.equals(permit)) {
+                            permissionOk = true;
+                            break;
+                        }
+                    }
+                    if (permissionOk) {
+                        PluginManager.getInstance(BrowserActivity.this)
+                                .refreshPlugins(
+                                        Intent.ACTION_PACKAGE_ADDED
+                                                .equals(action));
+                    }
+                }
+            }
+        };
+        registerReceiver(mPackageInstallationReceiver, filter);
 
         if (!mTabControl.restoreState(icicle)) {
             // clear up the thumbnail directory if we can't restore the state as
             // none of the files in the directory are referenced any more.
             new ClearThumbnails().execute(
                     mTabControl.getThumbnailDir().listFiles());
+            // there is no quit on Android. But if we can't restore the state,
+            // we can treat it as a new Browser, remove the old session cookies.
+            CookieManager.getInstance().removeSessionCookie();
             final Intent intent = getIntent();
             final Bundle extra = intent.getExtras();
             // Create an initial tab.
@@ -726,8 +442,6 @@
                     intent.getData() != null,
                     intent.getStringExtra(Browser.EXTRA_APPLICATION_ID), urlData.mUrl);
             mTabControl.setCurrentTab(t);
-            // This is one of the only places we call attachTabToContentView
-            // without animating from the tab picker.
             attachTabToContentView(t);
             WebView webView = t.getWebView();
             if (extra != null) {
@@ -744,7 +458,6 @@
                     && !mSettings.isLoginInitialized()) {
                 setupHomePage();
             }
-            copyPlugins(true);
 
             if (urlData.isEmpty()) {
                 if (mSettings.isLoginInitialized()) {
@@ -761,10 +474,15 @@
             }
         } else {
             // TabControl.restoreState() will create a new tab even if
-            // restoring the state fails. Attach it to the view here since we
-            // are not animating from the tab picker.
+            // restoring the state fails.
             attachTabToContentView(mTabControl.getCurrentTab());
         }
+
+        // Read JavaScript flags if it exists.
+        String jsFlags = mSettings.getJsFlags();
+        if (jsFlags.trim().length() != 0) {
+            mTabControl.getCurrentWebView().setJsFlags(jsFlags);
+        }
     }
 
     @Override
@@ -812,7 +530,7 @@
             if (Intent.ACTION_VIEW.equals(action)
                     && !getPackageName().equals(appId)
                     && (flags & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
-                final TabControl.Tab appTab = mTabControl.getTabFromId(appId);
+                TabControl.Tab appTab = mTabControl.getTabFromId(appId);
                 if (appTab != null) {
                     Log.i(LOGTAG, "Reusing tab for " + appId);
                     // Dismiss the subwindow if applicable.
@@ -825,45 +543,47 @@
                     // page, it can be reused.
                     boolean needsLoad =
                             mTabControl.recreateWebView(appTab, urlData.mUrl);
-                    
+
                     if (current != appTab) {
-                        showTab(appTab, needsLoad ? urlData : EMPTY_URL_DATA);
+                        switchToTab(mTabControl.getTabIndex(appTab));
+                        if (needsLoad) {
+                            urlData.loadIn(appTab.getWebView());
+                        }
                     } else {
-                        if (mTabOverview != null && mAnimationCount == 0) {
-                            sendAnimateFromOverview(appTab, false,
-                                    needsLoad ? urlData : EMPTY_URL_DATA, TAB_OVERVIEW_DELAY,
-                                    null);
-                        } else {
-                            // If the tab was the current tab, we have to attach
-                            // it to the view system again.
-                            attachTabToContentView(appTab);
-                            if (needsLoad) {
-                                urlData.loadIn(appTab.getWebView());
-                            }
+                        // If the tab was the current tab, we have to attach
+                        // it to the view system again.
+                        attachTabToContentView(appTab);
+                        if (needsLoad) {
+                            urlData.loadIn(appTab.getWebView());
                         }
                     }
                     return;
+                } else {
+                    // No matching application tab, try to find a regular tab
+                    // with a matching url.
+                    appTab = mTabControl.findUnusedTabWithUrl(urlData.mUrl);
+                    if (appTab != null) {
+                        if (current != appTab) {
+                            switchToTab(mTabControl.getTabIndex(appTab));
+                        }
+                        // Otherwise, we are already viewing the correct tab.
+                    } else {
+                        // if FLAG_ACTIVITY_BROUGHT_TO_FRONT flag is on, the url
+                        // will be opened in a new tab unless we have reached
+                        // MAX_TABS. Then the url will be opened in the current
+                        // tab. If a new tab is created, it will have "true" for
+                        // exit on close.
+                        openTabAndShow(urlData, true, appId);
+                    }
                 }
-                // if FLAG_ACTIVITY_BROUGHT_TO_FRONT flag is on, the url will be
-                // opened in a new tab unless we have reached MAX_TABS. Then the
-                // url will be opened in the current tab. If a new tab is
-                // created, it will have "true" for exit on close.
-                openTabAndShow(urlData, null, true, appId);
             } else {
                 if ("about:debug".equals(urlData.mUrl)) {
                     mSettings.toggleDebugSettings();
                     return;
                 }
-                // If the Window overview is up and we are not in the midst of
-                // an animation, animate away from the Window overview.
-                if (mTabOverview != null && mAnimationCount == 0) {
-                    sendAnimateFromOverview(current, false, urlData,
-                            TAB_OVERVIEW_DELAY, null);
-                } else {
-                    // Get rid of the subwindow if it exists
-                    dismissSubWindow(current);
-                    urlData.loadIn(current.getWebView());
-                }
+                // Get rid of the subwindow if it exists
+                dismissSubWindow(current);
+                urlData.loadIn(current.getWebView());
             }
         }
     }
@@ -894,13 +614,15 @@
         String url = null;
         final String action = intent.getAction();
         if (Intent.ACTION_VIEW.equals(action)) {
-            url = intent.getData().toString();
+            Uri data = intent.getData();
+            if (data != null) url = data.toString();
         } else if (Intent.ACTION_SEARCH.equals(action)
                 || MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)
                 || Intent.ACTION_WEB_SEARCH.equals(action)) {
             url = intent.getStringExtra(SearchManager.QUERY);
         }
-        return handleWebSearchRequest(url, intent.getBundleExtra(SearchManager.APP_DATA));
+        return handleWebSearchRequest(url, intent.getBundleExtra(SearchManager.APP_DATA),
+                intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
     }
 
     /**
@@ -908,7 +630,7 @@
      * was identified as plain search terms and not URL/shortcut.
      * @return true if the request was handled and web search activity was launched, false if not.
      */
-    private boolean handleWebSearchRequest(String inUrl, Bundle appData) {
+    private boolean handleWebSearchRequest(String inUrl, Bundle appData, String extraData) {
         if (inUrl == null) return false;
 
         // In general, we shouldn't modify URL from Intent.
@@ -932,6 +654,9 @@
         if (appData != null) {
             intent.putExtra(SearchManager.APP_DATA, appData);
         }
+        if (extraData != null) {
+            intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData);
+        }
         intent.putExtra(Browser.EXTRA_APPLICATION_ID, getPackageName());
         startActivity(intent);
 
@@ -992,6 +717,24 @@
     }
 
     /* package */ static String fixUrl(String inUrl) {
+        // FIXME: Converting the url to lower case
+        // duplicates functionality in smartUrlFilter().
+        // However, changing all current callers of fixUrl to
+        // call smartUrlFilter in addition may have unwanted
+        // consequences, and is deferred for now.
+        int colon = inUrl.indexOf(':');
+        boolean allLower = true;
+        for (int index = 0; index < colon; index++) {
+            char ch = inUrl.charAt(index);
+            if (!Character.isLetter(ch)) {
+                break;
+            }
+            allLower &= Character.isLowerCase(ch);
+            if (index == colon - 1 && !allLower) {
+                inUrl = inUrl.substring(0, colon).toLowerCase()
+                        + inUrl.substring(colon);
+            }
+        }
         if (inUrl.startsWith("http://") || inUrl.startsWith("https://"))
             return inUrl;
         if (inUrl.startsWith("http:") ||
@@ -1107,8 +850,9 @@
             return;
         }
 
+        mTabControl.resumeCurrentTab();
         mActivityInPause = false;
-        resumeWebView();
+        resumeWebViewTimers();
 
         if (mWakeLock.isHeld()) {
             mHandler.removeMessages(RELEASE_WAKELOCK);
@@ -1140,6 +884,206 @@
     }
 
     /**
+     * Since the actual title bar is embedded in the WebView, and removing it
+     * would change its appearance, create a temporary title bar to go at
+     * the top of the screen while the menu is open.
+     */
+    private TitleBar mFakeTitleBar;
+
+    /**
+     * Holder for the fake title bar.  It will have a foreground shadow, as well
+     * as a white background, so the fake title bar looks like the real one.
+     */
+    private ViewGroup mFakeTitleBarHolder;
+
+    /**
+     * Layout parameters for the fake title bar within mFakeTitleBarHolder
+     */
+    private FrameLayout.LayoutParams mFakeTitleBarParams
+            = new FrameLayout.LayoutParams(
+            ViewGroup.LayoutParams.FILL_PARENT,
+            ViewGroup.LayoutParams.WRAP_CONTENT);
+    /**
+     * Keeps track of whether the options menu is open.  This is important in
+     * determining whether to show or hide the title bar overlay.
+     */
+    private boolean mOptionsMenuOpen;
+
+    /**
+     * Only meaningful when mOptionsMenuOpen is true.  This variable keeps track
+     * of whether the configuration has changed.  The first onMenuOpened call
+     * after a configuration change is simply a reopening of the same menu
+     * (i.e. mIconView did not change).
+     */
+    private boolean mConfigChanged;
+
+    /**
+     * Whether or not the options menu is in its smaller, icon menu form.  When
+     * true, we want the title bar overlay to be up.  When false, we do not.
+     * Only meaningful if mOptionsMenuOpen is true.
+     */
+    private boolean mIconView;
+
+    @Override
+    public boolean onMenuOpened(int featureId, Menu menu) {
+        if (Window.FEATURE_OPTIONS_PANEL == featureId) {
+            if (mOptionsMenuOpen) {
+                if (mConfigChanged) {
+                    // We do not need to make any changes to the state of the
+                    // title bar, since the only thing that happened was a
+                    // change in orientation
+                    mConfigChanged = false;
+                } else {
+                    if (mIconView) {
+                        // Switching the menu to expanded view, so hide the
+                        // title bar.
+                        hideFakeTitleBar();
+                        mIconView = false;
+                    } else {
+                        // Switching the menu back to icon view, so show the
+                        // title bar once again.
+                        showFakeTitleBar();
+                        mIconView = true;
+                    }
+                }
+            } else {
+                // The options menu is closed, so open it, and show the title
+                showFakeTitleBar();
+                mOptionsMenuOpen = true;
+                mConfigChanged = false;
+                mIconView = true;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Special class used exclusively for the shadow drawn underneath the fake
+     * title bar.  The shadow does not need to be drawn if the WebView
+     * underneath is scrolled to the top, because it will draw directly on top
+     * of the embedded shadow.
+     */
+    private static class Shadow extends View {
+        private WebView mWebView;
+
+        public Shadow(Context context, AttributeSet attrs) {
+            super(context, attrs);
+        }
+
+        public void setWebView(WebView view) {
+            mWebView = view;
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            // In general onDraw is the method to override, but we care about
+            // whether or not the background gets drawn, which happens in draw()
+            if (mWebView == null || mWebView.getScrollY() > getHeight()) {
+                super.draw(canvas);
+            }
+            // Need to invalidate so that if the scroll position changes, we
+            // still draw as appropriate.
+            invalidate();
+        }
+    }
+
+    private void showFakeTitleBar() {
+        final View decor = getWindow().peekDecorView();
+        if (mFakeTitleBar == null && mActiveTabsPage == null
+                && !mActivityInPause && decor != null
+                && decor.getWindowToken() != null) {
+            Rect visRect = new Rect();
+            if (!mBrowserFrameLayout.getGlobalVisibleRect(visRect)) {
+                if (LOGD_ENABLED) {
+                    Log.d(LOGTAG, "showFakeTitleBar visRect failed");
+                }
+                return;
+            }
+            final WebView webView = getTopWindow();
+            mFakeTitleBar = new TitleBar(this);
+            mFakeTitleBar.setTitleAndUrl(null, webView.getUrl());
+            mFakeTitleBar.setProgress(webView.getProgress());
+            mFakeTitleBar.setFavicon(webView.getFavicon());
+            updateLockIconToLatest();
+
+            WindowManager manager
+                    = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+
+            // Add the title bar to the window manager so it can receive touches
+            // while the menu is up
+            WindowManager.LayoutParams params
+                    = new WindowManager.LayoutParams(
+                    ViewGroup.LayoutParams.FILL_PARENT,
+                    ViewGroup.LayoutParams.WRAP_CONTENT,
+                    WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL,
+                    WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+                    PixelFormat.TRANSLUCENT);
+            params.gravity = Gravity.TOP;
+            WebView mainView = mTabControl.getCurrentWebView();
+            boolean atTop = mainView != null && mainView.getScrollY() == 0;
+            params.windowAnimations = atTop ? 0 : R.style.TitleBar;
+            // XXX : Without providing an offset, the fake title bar will be
+            // placed underneath the status bar.  Use the global visible rect
+            // of mBrowserFrameLayout to determine the bottom of the status bar
+            params.y = visRect.top;
+            // Add a holder for the title bar.  It also holds a shadow to show
+            // below the title bar.
+            if (mFakeTitleBarHolder == null) {
+                mFakeTitleBarHolder = (ViewGroup) LayoutInflater.from(this)
+                    .inflate(R.layout.title_bar_bg, null);
+            }
+            Shadow shadow = (Shadow) mFakeTitleBarHolder.findViewById(
+                    R.id.shadow);
+            shadow.setWebView(mainView);
+            mFakeTitleBarHolder.addView(mFakeTitleBar, 0, mFakeTitleBarParams);
+            manager.addView(mFakeTitleBarHolder, params);
+        }
+    }
+
+    @Override
+    public void onOptionsMenuClosed(Menu menu) {
+        mOptionsMenuOpen = false;
+        if (!mInLoad) {
+            hideFakeTitleBar();
+        } else if (!mIconView) {
+            // The page is currently loading, and we are in expanded mode, so
+            // we were not showing the menu.  Show it once again.  It will be
+            // removed when the page finishes.
+            showFakeTitleBar();
+        }
+    }
+    private void hideFakeTitleBar() {
+        if (mFakeTitleBar == null) return;
+        WindowManager.LayoutParams params = (WindowManager.LayoutParams)
+                mFakeTitleBarHolder.getLayoutParams();
+        WebView mainView = mTabControl.getCurrentWebView();
+        // Although we decided whether or not to animate based on the current
+        // scroll position, the scroll position may have changed since the
+        // fake title bar was displayed.  Make sure it has the appropriate
+        // animation/lack thereof before removing.
+        params.windowAnimations = mainView != null && mainView.getScrollY() == 0
+                ? 0 : R.style.TitleBar;
+        WindowManager manager
+                    = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+        manager.updateViewLayout(mFakeTitleBarHolder, params);
+        mFakeTitleBarHolder.removeView(mFakeTitleBar);
+        manager.removeView(mFakeTitleBarHolder);
+        mFakeTitleBar = null;
+    }
+
+    /**
+     * Special method for the fake title bar to call when displaying its context
+     * menu, since it is in its own Window, and its parent does not show a
+     * context menu.
+     */
+    /* package */ void showTitleBarContextMenu() {
+        if (null == mTitleBar.getParent()) {
+            return;
+        }
+        openContextMenu(mTitleBar);
+    }
+
+    /**
      *  onSaveInstanceState(Bundle map)
      *  onSaveInstanceState is called right before onStop(). The map contains
      *  the saved state.
@@ -1166,8 +1110,9 @@
             return;
         }
 
+        mTabControl.pauseCurrentTab();
         mActivityInPause = true;
-        if (mTabControl.getCurrentIndex() >= 0 && !pauseWebView()) {
+        if (mTabControl.getCurrentIndex() >= 0 && !pauseWebViewTimers()) {
             mWakeLock.acquire();
             mHandler.sendMessageDelayed(mHandler
                     .obtainMessage(RELEASE_WAKELOCK), WAKELOCK_TIMEOUT);
@@ -1179,6 +1124,14 @@
         }
         mCredsDlg = null;
 
+        // FIXME: This removes the active tabs page and resets the menu to
+        // MAIN_MENU.  A better solution might be to do this work in onNewIntent
+        // but then we would need to save it in onSaveInstanceState and restore
+        // it in onCreate/onRestoreInstanceState
+        if (mActiveTabsPage != null) {
+            removeActiveTabPage(true);
+        }
+
         cancelStopToast();
 
         // unregister network state listener
@@ -1195,6 +1148,9 @@
             Log.v(LOGTAG, "BrowserActivity.onDestroy: this=" + this);
         }
         super.onDestroy();
+
+        if (mTabControl == null) return;
+
         // Remove the current tab and sub window
         TabControl.Tab t = mTabControl.getCurrentTab();
         if (t != null) {
@@ -1218,10 +1174,13 @@
         //        "com.android.masfproxyservice",
         //        "com.android.masfproxyservice.MasfProxyService"));
         //stopService(proxyServiceIntent);
+
+        unregisterReceiver(mPackageInstallationReceiver);
     }
 
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
+        mConfigChanged = true;
         super.onConfigurationChanged(newConfig);
 
         if (mPageInfoDialog != null) {
@@ -1266,7 +1225,7 @@
         mTabControl.freeMemory();
     }
 
-    private boolean resumeWebView() {
+    private boolean resumeWebViewTimers() {
         if ((!mActivityInPause && !mPageStarted) ||
                 (mActivityInPause && mPageStarted)) {
             CookieSyncManager.getInstance().startSync();
@@ -1280,7 +1239,7 @@
         }
     }
 
-    private boolean pauseWebView() {
+    private boolean pauseWebViewTimers() {
         if (mActivityInPause && !mPageStarted) {
             CookieSyncManager.getInstance().stopSync();
             WebView w = mTabControl.getCurrentWebView();
@@ -1293,6 +1252,7 @@
         }
     }
 
+    // FIXME: Do we want to call this when loading google for the first time?
     /*
      * This function is called when we are launching for the first time. We
      * are waiting for the login credentials before loading Google home
@@ -1403,15 +1363,20 @@
         // options selector, so set mCanChord to true so we can access them.
         mCanChord = true;
         int id = item.getItemId();
-        final WebView webView = getTopWindow();
-        if (null == webView) {
-            return false;
-        }
-        final HashMap hrefMap = new HashMap();
-        hrefMap.put("webview", webView);
-        final Message msg = mHandler.obtainMessage(
-                FOCUS_NODE_HREF, id, 0, hrefMap);
         switch (id) {
+            // For the context menu from the title bar
+            case R.id.title_bar_share_page_url:
+            case R.id.title_bar_copy_page_url:
+                WebView mainView = mTabControl.getCurrentWebView();
+                if (null == mainView) {
+                    return false;
+                }
+                if (id == R.id.title_bar_share_page_url) {
+                    Browser.sendString(this, mainView.getUrl());
+                } else {
+                    copy(mainView.getUrl());
+                }
+                break;
             // -- Browser context menu
             case R.id.open_context_menu_id:
             case R.id.open_newtab_context_menu_id:
@@ -1419,6 +1384,14 @@
             case R.id.save_link_context_menu_id:
             case R.id.share_link_context_menu_id:
             case R.id.copy_link_context_menu_id:
+                final WebView webView = getTopWindow();
+                if (null == webView) {
+                    return false;
+                }
+                final HashMap hrefMap = new HashMap();
+                hrefMap.put("webview", webView);
+                final Message msg = mHandler.obtainMessage(
+                        FOCUS_NODE_HREF, id, 0, hrefMap);
                 webView.requestFocusNodeHref(msg);
                 break;
 
@@ -1441,7 +1414,8 @@
      */
     @Override
     public boolean onSearchRequested() {
-        String url = getTopWindow().getUrl();
+        if (mOptionsMenuOpen) closeOptionsMenu();
+        String url = (getTopWindow() == null) ? null : getTopWindow().getUrl();
         startSearch(mSettings.getHomePage().equals(url) ? null : url, true,
                 createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_SEARCHKEY), false);
         return true;
@@ -1456,6 +1430,82 @@
         super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
     }
 
+    /**
+     * Switch tabs.  Called by the TitleBarSet when sliding the title bar
+     * results in changing tabs.
+     * @param index Index of the tab to change to, as defined by
+     *              mTabControl.getTabIndex(Tab t).
+     * @return boolean True if we successfully switched to a different tab.  If
+     *                 the indexth tab is null, or if that tab is the same as
+     *                 the current one, return false.
+     */
+    /* package */ boolean switchToTab(int index) {
+        TabControl.Tab tab = mTabControl.getTab(index);
+        TabControl.Tab currentTab = mTabControl.getCurrentTab();
+        if (tab == null || tab == currentTab) {
+            return false;
+        }
+        if (currentTab != null) {
+            // currentTab may be null if it was just removed.  In that case,
+            // we do not need to remove it
+            removeTabFromContentView(currentTab);
+        }
+        mTabControl.setCurrentTab(tab);
+        attachTabToContentView(tab);
+        resetTitleIconAndProgress();
+        updateLockIconToLatest();
+        return true;
+    }
+
+    /* package */ TabControl.Tab openTabToHomePage() {
+        return openTabAndShow(mSettings.getHomePage(), false, null);
+    }
+
+    /* package */ void closeCurrentWindow() {
+        final TabControl.Tab current = mTabControl.getCurrentTab();
+        if (mTabControl.getTabCount() == 1) {
+            // This is the last tab.  Open a new one, with the home
+            // page and close the current one.
+            TabControl.Tab newTab = openTabToHomePage();
+            closeTab(current);
+            return;
+        }
+        final TabControl.Tab parent = current.getParentTab();
+        int indexToShow = -1;
+        if (parent != null) {
+            indexToShow = mTabControl.getTabIndex(parent);
+        } else {
+            final int currentIndex = mTabControl.getCurrentIndex();
+            // Try to move to the tab to the right
+            indexToShow = currentIndex + 1;
+            if (indexToShow > mTabControl.getTabCount() - 1) {
+                // Try to move to the tab to the left
+                indexToShow = currentIndex - 1;
+            }
+        }
+        if (switchToTab(indexToShow)) {
+            // Close window
+            closeTab(current);
+        }
+    }
+
+    private ActiveTabsPage mActiveTabsPage;
+
+    /**
+     * Remove the active tabs page.
+     * @param needToAttach If true, the active tabs page did not attach a tab
+     *                     to the content view, so we need to do that here.
+     */
+    /* package */ void removeActiveTabPage(boolean needToAttach) {
+        mContentView.removeView(mActiveTabsPage);
+        mActiveTabsPage = null;
+        mMenuState = R.id.MAIN_MENU;
+        if (needToAttach) {
+            attachTabToContentView(mTabControl.getCurrentTab());
+        }
+        getTopWindow().requestFocus();
+    }
+
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         if (!mCanChord) {
@@ -1463,7 +1513,7 @@
             // menu key.
             return false;
         }
-        if (null == mTabOverview && null == getTopWindow()) {
+        if (null == getTopWindow()) {
             return false;
         }
         if (mMenuIsDown) {
@@ -1475,23 +1525,36 @@
         }
         switch (item.getItemId()) {
             // -- Main menu
-            case R.id.goto_menu_id: {
-                String url = getTopWindow().getUrl();
-                startSearch(mSettings.getHomePage().equals(url) ? null : url, true,
-                        createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_GOTO), false);
-                }
+            case R.id.new_tab_menu_id:
+                openTabToHomePage();
+                break;
+
+            case R.id.goto_menu_id:
+                onSearchRequested();
                 break;
 
             case R.id.bookmarks_menu_id:
                 bookmarksOrHistoryPicker(false);
                 break;
 
-            case R.id.windows_menu_id:
-                if (mTabControl.getTabCount() == 1) {
-                    openTabAndShow(mSettings.getHomePage(), null, false, null);
-                } else {
-                    tabPicker(true, mTabControl.getCurrentIndex(), false);
-                }
+            case R.id.active_tabs_menu_id:
+                mActiveTabsPage = new ActiveTabsPage(this, mTabControl);
+                removeTabFromContentView(mTabControl.getCurrentTab());
+                hideFakeTitleBar();
+                mContentView.addView(mActiveTabsPage, COVER_SCREEN_PARAMS);
+                mActiveTabsPage.requestFocus();
+                mMenuState = EMPTY_MENU;
+                break;
+
+            case R.id.add_bookmark_menu_id:
+                Intent i = new Intent(BrowserActivity.this,
+                        AddBookmarkPage.class);
+                WebView w = getTopWindow();
+                i.putExtra("url", w.getUrl());
+                i.putExtra("title", w.getTitle());
+                i.putExtra("touch_icon_url", w.getTouchIconUrl());
+                i.putExtra("thumbnail", createScreenshot(w));
+                startActivity(i);
                 break;
 
             case R.id.stop_reload_menu_id:
@@ -1516,21 +1579,7 @@
                     dismissSubWindow(mTabControl.getCurrentTab());
                     break;
                 }
-                final int currentIndex = mTabControl.getCurrentIndex();
-                final TabControl.Tab parent =
-                        mTabControl.getCurrentTab().getParentTab();
-                int indexToShow = -1;
-                if (parent != null) {
-                    indexToShow = mTabControl.getTabIndex(parent);
-                } else {
-                    // Get the last tab in the list. If it is the current tab,
-                    // subtract 1 more.
-                    indexToShow = mTabControl.getTabCount() - 1;
-                    if (currentIndex == indexToShow) {
-                        indexToShow--;
-                    }
-                }
-                switchTabs(currentIndex, indexToShow, true);
+                closeCurrentWindow();
                 break;
 
             case R.id.homepage_menu_id:
@@ -1568,7 +1617,8 @@
                 break;
 
             case R.id.share_page_menu_id:
-                Browser.sendString(this, getTopWindow().getUrl());
+                Browser.sendString(this, getTopWindow().getUrl(),
+                        getText(R.string.choosertitle_sharevia).toString());
                 break;
 
             case R.id.dump_nav_menu_id:
@@ -1587,62 +1637,6 @@
                 viewDownloads(null);
                 break;
 
-            // -- Tab menu
-            case R.id.view_tab_menu_id:
-                if (mTabListener != null && mTabOverview != null) {
-                    int pos = mTabOverview.getContextMenuPosition(item);
-                    mTabOverview.setCurrentIndex(pos);
-                    mTabListener.onClick(pos);
-                }
-                break;
-
-            case R.id.remove_tab_menu_id:
-                if (mTabListener != null && mTabOverview != null) {
-                    int pos = mTabOverview.getContextMenuPosition(item);
-                    mTabListener.remove(pos);
-                }
-                break;
-
-            case R.id.new_tab_menu_id:
-                // No need to check for mTabOverview here since we are not
-                // dependent on it for a position.
-                if (mTabListener != null) {
-                    // If the overview happens to be non-null, make the "New
-                    // Tab" cell visible.
-                    if (mTabOverview != null) {
-                        mTabOverview.setCurrentIndex(ImageGrid.NEW_TAB);
-                    }
-                    mTabListener.onClick(ImageGrid.NEW_TAB);
-                }
-                break;
-
-            case R.id.bookmark_tab_menu_id:
-                if (mTabListener != null && mTabOverview != null) {
-                    int pos = mTabOverview.getContextMenuPosition(item);
-                    TabControl.Tab t = mTabControl.getTab(pos);
-                    // Since we called populatePickerData for all of the
-                    // tabs, getTitle and getUrl will return appropriate
-                    // values.
-                    Browser.saveBookmark(BrowserActivity.this, t.getTitle(),
-                            t.getUrl());
-                }
-                break;
-
-            case R.id.history_tab_menu_id:
-                bookmarksOrHistoryPicker(true);
-                break;
-
-            case R.id.bookmarks_tab_menu_id:
-                bookmarksOrHistoryPicker(false);
-                break;
-
-            case R.id.properties_tab_menu_id:
-                if (mTabListener != null && mTabOverview != null) {
-                    int pos = mTabOverview.getContextMenuPosition(item);
-                    showPageInfo(mTabControl.getTab(pos), false);
-                }
-                break;
-
             case R.id.window_one_menu_id:
             case R.id.window_two_menu_id:
             case R.id.window_three_menu_id:
@@ -1658,7 +1652,7 @@
                             TabControl.Tab desiredTab = mTabControl.getTab(id);
                             if (desiredTab != null &&
                                     desiredTab != mTabControl.getCurrentTab()) {
-                                switchTabs(mTabControl.getCurrentIndex(), id, false);
+                                switchToTab(id);
                             }
                             break;
                         }
@@ -1690,26 +1684,11 @@
         // whether the matching shortcut key will function.
         super.onPrepareOptionsMenu(menu);
         switch (mMenuState) {
-            case R.id.TAB_MENU:
-                if (mCurrentMenuState != mMenuState) {
-                    menu.setGroupVisible(R.id.MAIN_MENU, false);
-                    menu.setGroupEnabled(R.id.MAIN_MENU, false);
-                    menu.setGroupEnabled(R.id.MAIN_SHORTCUT_MENU, false);
-                    menu.setGroupVisible(R.id.TAB_MENU, true);
-                    menu.setGroupEnabled(R.id.TAB_MENU, true);
-                }
-                boolean newT = mTabControl.getTabCount() < TabControl.MAX_TABS;
-                final MenuItem tab = menu.findItem(R.id.new_tab_menu_id);
-                tab.setVisible(newT);
-                tab.setEnabled(newT);
-                break;
             case EMPTY_MENU:
                 if (mCurrentMenuState != mMenuState) {
                     menu.setGroupVisible(R.id.MAIN_MENU, false);
                     menu.setGroupEnabled(R.id.MAIN_MENU, false);
                     menu.setGroupEnabled(R.id.MAIN_SHORTCUT_MENU, false);
-                    menu.setGroupVisible(R.id.TAB_MENU, false);
-                    menu.setGroupEnabled(R.id.TAB_MENU, false);
                 }
                 break;
             default:
@@ -1717,8 +1696,6 @@
                     menu.setGroupVisible(R.id.MAIN_MENU, true);
                     menu.setGroupEnabled(R.id.MAIN_MENU, true);
                     menu.setGroupEnabled(R.id.MAIN_SHORTCUT_MENU, true);
-                    menu.setGroupVisible(R.id.TAB_MENU, false);
-                    menu.setGroupEnabled(R.id.TAB_MENU, false);
                 }
                 final WebView w = getTopWindow();
                 boolean canGoBack = false;
@@ -1738,6 +1715,9 @@
                 menu.findItem(R.id.forward_menu_id)
                         .setEnabled(canGoForward);
 
+                menu.findItem(R.id.new_tab_menu_id).setEnabled(
+                        mTabControl.getTabCount() < TabControl.MAX_TABS);
+
                 // decide whether to show the share link option
                 PackageManager pm = getPackageManager();
                 Intent send = new Intent(Intent.ACTION_SEND);
@@ -1745,12 +1725,6 @@
                 ResolveInfo ri = pm.resolveActivity(send, PackageManager.MATCH_DEFAULT_ONLY);
                 menu.findItem(R.id.share_page_menu_id).setVisible(ri != null);
 
-                // If there is only 1 window, the text will be "New window"
-                final MenuItem windows = menu.findItem(R.id.windows_menu_id);
-                windows.setTitleCondensed(mTabControl.getTabCount() > 1 ?
-                        getString(R.string.view_tabs_condensed) :
-                        getString(R.string.tab_picker_new_tab));
-
                 boolean isNavDump = mSettings.isNavDump();
                 final MenuItem nav = menu.findItem(R.id.dump_nav_menu_id);
                 nav.setVisible(isNavDump);
@@ -1811,7 +1785,7 @@
                                 .parse(WebView.SCHEME_TEL + extra)));
                 Intent addIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
                 addIntent.putExtra(Insert.PHONE, Uri.decode(extra));
-                addIntent.setType(Contacts.People.CONTENT_ITEM_TYPE);
+                addIntent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
                 menu.findItem(R.id.add_contact_context_menu_id).setIntent(
                         addIntent);
                 menu.findItem(R.id.copy_phone_context_menu_id).setOnMenuItemClickListener(
@@ -1873,176 +1847,122 @@
     }
 
     // Attach the given tab to the content view.
+    // this should only be called for the current tab.
     private void attachTabToContentView(TabControl.Tab t) {
-        final WebView main = t.getWebView();
-        // Attach the main WebView.
-        mContentView.addView(main, COVER_SCREEN_PARAMS);
-        // Attach the sub window if necessary
-        attachSubWindow(t);
+        // Attach the container that contains the main WebView and any other UI
+        // associated with the tab.
+        t.attachTabToContentView(mContentView);
+
+        if (mShouldShowErrorConsole) {
+            ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole(true);
+            if (errorConsole.numberOfErrors() == 0) {
+                errorConsole.showConsole(ErrorConsoleView.SHOW_NONE);
+            } else {
+                errorConsole.showConsole(ErrorConsoleView.SHOW_MINIMIZED);
+            }
+
+            mErrorConsoleContainer.addView(errorConsole,
+                    new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+                                                  ViewGroup.LayoutParams.WRAP_CONTENT));
+        }
+
+        setLockIconType(t.getLockIconType());
+        setPrevLockType(t.getPrevLockIconType());
+
+        // this is to match the code in removeTabFromContentView()
+        if (!mPageStarted && t.getTopWindow().getProgress() < 100) {
+            mPageStarted = true;
+        }
+
+        WebView view = t.getWebView();
+        view.setEmbeddedTitleBar(mTitleBar);
         // Request focus on the top window.
         t.getTopWindow().requestFocus();
     }
 
     // Attach a sub window to the main WebView of the given tab.
     private void attachSubWindow(TabControl.Tab t) {
-        // If a sub window exists, attach it to the content view.
-        final WebView subView = t.getSubWebView();
-        if (subView != null) {
-            final View container = t.getSubWebViewContainer();
-            mContentView.addView(container, COVER_SCREEN_PARAMS);
-            subView.requestFocus();
-        }
+        t.attachSubWindow(mContentView);
+        getTopWindow().requestFocus();
     }
 
     // Remove the given tab from the content view.
     private void removeTabFromContentView(TabControl.Tab t) {
-        // Remove the main WebView.
-        mContentView.removeView(t.getWebView());
-        // Remove the sub window if it exists.
-        if (t.getSubWebView() != null) {
-            mContentView.removeView(t.getSubWebViewContainer());
+        // Remove the container that contains the main WebView.
+        t.removeTabFromContentView(mContentView);
+
+        if (mTabControl.getCurrentErrorConsole(false) != null) {
+            mErrorConsoleContainer.removeView(mTabControl.getCurrentErrorConsole(false));
+        }
+
+        WebView view = t.getWebView();
+        if (view != null) {
+            view.setEmbeddedTitleBar(null);
+        }
+
+        // unlike attachTabToContentView(), removeTabFromContentView() can be
+        // called for the non-current tab. Need to add the check.
+        if (t == mTabControl.getCurrentTab()) {
+            t.setLockIconType(getLockIconType());
+            t.setPrevLockIconType(getPrevLockType());
+
+            // this is not a perfect solution. But currently there is one
+            // WebViewClient for all the WebView. if user switches from an
+            // in-load window to an already loaded window, mPageStarted will not
+            // be set to false. If user leaves the Browser, pauseWebViewTimers()
+            // won't do anything and leaves the timer running even Browser is in
+            // the background.
+            if (mPageStarted) {
+                mPageStarted = false;
+            }
         }
     }
 
     // Remove the sub window if it exists. Also called by TabControl when the
     // user clicks the 'X' to dismiss a sub window.
     /* package */ void dismissSubWindow(TabControl.Tab t) {
-        final WebView mainView = t.getWebView();
-        if (t.getSubWebView() != null) {
-            // Remove the container view and request focus on the main WebView.
-            mContentView.removeView(t.getSubWebViewContainer());
-            mainView.requestFocus();
-            // Tell the TabControl to dismiss the subwindow. This will destroy
-            // the WebView.
-            mTabControl.dismissSubWindow(t);
-        }
+        t.removeSubWindow(mContentView);
+        // Tell the TabControl to dismiss the subwindow. This will destroy
+        // the WebView.
+        mTabControl.dismissSubWindow(t);
+        getTopWindow().requestFocus();
     }
 
-    // Send the ANIMTE_FROM_OVERVIEW message after changing the current tab.
-    private void sendAnimateFromOverview(final TabControl.Tab tab,
-            final boolean newTab, final UrlData urlData, final int delay,
-            final Message msg) {
-        // Set the current tab.
-        mTabControl.setCurrentTab(tab);
-        // Attach the WebView so it will layout.
-        attachTabToContentView(tab);
-        // Set the view to invisibile for now.
-        tab.getWebView().setVisibility(View.INVISIBLE);
-        // If there is a sub window, make it invisible too.
-        if (tab.getSubWebView() != null) {
-            tab.getSubWebViewContainer().setVisibility(View.INVISIBLE);
-        }
-        // Create our fake animating view.
-        final AnimatingView view = new AnimatingView(this, tab);
-        // Attach it to the view system and make in invisible so it will
-        // layout but not flash white on the screen.
-        mContentView.addView(view, COVER_SCREEN_PARAMS);
-        view.setVisibility(View.INVISIBLE);
-        // Send the animate message.
-        final HashMap map = new HashMap();
-        map.put("view", view);
-        // Load the url after the AnimatingView has captured the picture. This
-        // prevents any bad layout or bad scale from being used during
-        // animation.
-        if (!urlData.isEmpty()) {
-            dismissSubWindow(tab);
-            urlData.loadIn(tab.getWebView());
-        }
-        map.put("msg", msg);
-        mHandler.sendMessageDelayed(mHandler.obtainMessage(
-                ANIMATE_FROM_OVERVIEW, newTab ? 1 : 0, 0, map), delay);
-        // Increment the count to indicate that we are in an animation.
-        mAnimationCount++;
-        // Remove the listener so we don't get any more tab changes.
-        mTabOverview.setListener(null);
-        mTabListener = null;
-        // Make the menu empty until the animation completes.
-        mMenuState = EMPTY_MENU;
-
-    }
-
-    // 500ms animation with 800ms delay
-    private static final int TAB_ANIMATION_DURATION = 200;
-    private static final int TAB_OVERVIEW_DELAY     = 500;
-
-    // Called by TabControl when a tab is requesting focus
-    /* package */ void showTab(TabControl.Tab t) {
-        showTab(t, EMPTY_URL_DATA);
-    }
-
-    private void showTab(TabControl.Tab t, UrlData urlData) {
-        // Disallow focus change during a tab animation.
-        if (mAnimationCount > 0) {
-            return;
-        }
-        int delay = 0;
-        if (mTabOverview == null) {
-            // Add a delay so the tab overview can be shown before the second
-            // animation begins.
-            delay = TAB_ANIMATION_DURATION + TAB_OVERVIEW_DELAY;
-            tabPicker(false, mTabControl.getTabIndex(t), false);
-        }
-        sendAnimateFromOverview(t, false, urlData, delay, null);
-    }
-
-    // A wrapper function of {@link #openTabAndShow(UrlData, Message, boolean, String)}
+    // A wrapper function of {@link #openTabAndShow(UrlData, boolean, String)}
     // that accepts url as string.
-    private TabControl.Tab openTabAndShow(String url, final Message msg,
-            boolean closeOnExit, String appId) {
-        return openTabAndShow(new UrlData(url), msg, closeOnExit, appId);
+    private TabControl.Tab openTabAndShow(String url, boolean closeOnExit,
+            String appId) {
+        return openTabAndShow(new UrlData(url), closeOnExit, appId);
     }
 
     // This method does a ton of stuff. It will attempt to create a new tab
     // if we haven't reached MAX_TABS. Otherwise it uses the current tab. If
-    // url isn't null, it will load the given url. If the tab overview is not
-    // showing, it will animate to the tab overview, create a new tab and
-    // animate away from it. After the animation completes, it will dispatch
-    // the given Message. If the tab overview is already showing (i.e. this
-    // method is called from TabListener.onClick(), the method will animate
-    // away from the tab overview.
-    private TabControl.Tab openTabAndShow(UrlData urlData, final Message msg,
+    // url isn't null, it will load the given url.
+    /* package */ TabControl.Tab openTabAndShow(UrlData urlData,
             boolean closeOnExit, String appId) {
         final boolean newTab = mTabControl.getTabCount() != TabControl.MAX_TABS;
         final TabControl.Tab currentTab = mTabControl.getCurrentTab();
         if (newTab) {
-            int delay = 0;
-            // If the tab overview is up and there are animations, just load
-            // the url.
-            if (mTabOverview != null && mAnimationCount > 0) {
-                if (!urlData.isEmpty()) {
-                    // We should not have a msg here since onCreateWindow
-                    // checks the animation count and every other caller passes
-                    // null.
-                    assert msg == null;
-                    // just dismiss the subwindow and load the given url.
-                    dismissSubWindow(currentTab);
-                    urlData.loadIn(currentTab.getWebView());
-                }
-            } else {
-                // show mTabOverview if it is not there.
-                if (mTabOverview == null) {
-                    // We have to delay the animation from the tab picker by the
-                    // length of the tab animation. Add a delay so the tab
-                    // overview can be shown before the second animation begins.
-                    delay = TAB_ANIMATION_DURATION + TAB_OVERVIEW_DELAY;
-                    tabPicker(false, ImageGrid.NEW_TAB, false);
-                }
-                // Animate from the Tab overview after any animations have
-                // finished.
-                final TabControl.Tab tab = mTabControl.createNewTab(
-                        closeOnExit, appId, urlData.mUrl);
-                sendAnimateFromOverview(tab, true, urlData, delay, msg);
-                return tab;
+            final TabControl.Tab tab = mTabControl.createNewTab(
+                    closeOnExit, appId, urlData.mUrl);
+            WebView webview = tab.getWebView();
+            // If the last tab was removed from the active tabs page, currentTab
+            // will be null.
+            if (currentTab != null) {
+                removeTabFromContentView(currentTab);
             }
-        } else if (!urlData.isEmpty()) {
-            // We should not have a msg here.
-            assert msg == null;
-            if (mTabOverview != null && mAnimationCount == 0) {
-                sendAnimateFromOverview(currentTab, false, urlData,
-                        TAB_OVERVIEW_DELAY, null);
-            } else {
-                // Get rid of the subwindow if it exists
-                dismissSubWindow(currentTab);
+            // We must set the new tab as the current tab to reflect the old
+            // animation behavior.
+            mTabControl.setCurrentTab(tab);
+            attachTabToContentView(tab);
+            if (!urlData.isEmpty()) {
+                urlData.loadIn(webview);
+            }
+            return tab;
+        } else {
+            // Get rid of the subwindow if it exists
+            dismissSubWindow(currentTab);
+            if (!urlData.isEmpty()) {
                 // Load the given url.
                 urlData.loadIn(currentTab.getWebView());
             }
@@ -2050,234 +1970,16 @@
         return currentTab;
     }
 
-    private Animation createTabAnimation(final AnimatingView view,
-            final View cell, boolean scaleDown) {
-        final AnimationSet set = new AnimationSet(true);
-        final float scaleX = (float) cell.getWidth() / view.getWidth();
-        final float scaleY = (float) cell.getHeight() / view.getHeight();
-        if (scaleDown) {
-            set.addAnimation(new ScaleAnimation(1.0f, scaleX, 1.0f, scaleY));
-            set.addAnimation(new TranslateAnimation(0, cell.getLeft(), 0,
-                    cell.getTop()));
-        } else {
-            set.addAnimation(new ScaleAnimation(scaleX, 1.0f, scaleY, 1.0f));
-            set.addAnimation(new TranslateAnimation(cell.getLeft(), 0,
-                    cell.getTop(), 0));
-        }
-        set.setDuration(TAB_ANIMATION_DURATION);
-        set.setInterpolator(new DecelerateInterpolator());
-        return set;
-    }
-
-    // Animate to the tab overview. currentIndex tells us which position to
-    // animate to and newIndex is the position that should be selected after
-    // the animation completes.
-    // If remove is true, after the animation stops, a confirmation dialog will
-    // be displayed to the user.
-    private void animateToTabOverview(final int newIndex, final boolean remove,
-            final AnimatingView view) {
-        // Find the view in the ImageGrid allowing for the "New Tab" cell.
-        int position = mTabControl.getTabIndex(view.mTab);
-        if (!((ImageAdapter) mTabOverview.getAdapter()).maxedOut()) {
-            position++;
-        }
-
-        // Offset the tab position with the first visible position to get a
-        // number between 0 and 3.
-        position -= mTabOverview.getFirstVisiblePosition();
-
-        // Grab the view that we are going to animate to.
-        final View v = mTabOverview.getChildAt(position);
-
-        final Animation.AnimationListener l =
-                new Animation.AnimationListener() {
-                    public void onAnimationStart(Animation a) {
-                        if (mTabOverview != null) {
-                            mTabOverview.requestFocus();
-                            // Clear the listener so we don't trigger a tab
-                            // selection.
-                            mTabOverview.setListener(null);
-                        }
-                    }
-                    public void onAnimationRepeat(Animation a) {}
-                    public void onAnimationEnd(Animation a) {
-                        // We are no longer animating so decrement the count.
-                        mAnimationCount--;
-                        // Make the view GONE so that it will not draw between
-                        // now and when the Runnable is handled.
-                        view.setVisibility(View.GONE);
-                        // Post a runnable since we can't modify the view
-                        // hierarchy during this callback.
-                        mHandler.post(new Runnable() {
-                            public void run() {
-                                // Remove the AnimatingView.
-                                mContentView.removeView(view);
-                                if (mTabOverview != null) {
-                                    // Make newIndex visible.
-                                    mTabOverview.setCurrentIndex(newIndex);
-                                    // Restore the listener.
-                                    mTabOverview.setListener(mTabListener);
-                                    // Change the menu to TAB_MENU if the
-                                    // ImageGrid is interactive.
-                                    if (mTabOverview.isLive()) {
-                                        mMenuState = R.id.TAB_MENU;
-                                        mTabOverview.requestFocus();
-                                    }
-                                }
-                                // If a remove was requested, remove the tab.
-                                if (remove) {
-                                    // During a remove, the current tab has
-                                    // already changed. Remember the current one
-                                    // here.
-                                    final TabControl.Tab currentTab =
-                                            mTabControl.getCurrentTab();
-                                    // Remove the tab at newIndex from
-                                    // TabControl and the tab overview.
-                                    final TabControl.Tab tab =
-                                            mTabControl.getTab(newIndex);
-                                    mTabControl.removeTab(tab);
-                                    // Restore the current tab.
-                                    if (currentTab != tab) {
-                                        mTabControl.setCurrentTab(currentTab);
-                                    }
-                                    if (mTabOverview != null) {
-                                        mTabOverview.remove(newIndex);
-                                        // Make the current tab visible.
-                                        mTabOverview.setCurrentIndex(
-                                                mTabControl.getCurrentIndex());
-                                    }
-                                }
-                            }
-                        });
-                    }
-                };
-
-        // Do an animation if there is a view to animate to.
-        if (v != null) {
-            // Create our animation
-            final Animation anim = createTabAnimation(view, v, true);
-            anim.setAnimationListener(l);
-            // Start animating
-            view.startAnimation(anim);
-        } else {
-            // If something goes wrong and we didn't find a view to animate to,
-            // just do everything here.
-            l.onAnimationStart(null);
-            l.onAnimationEnd(null);
-        }
-    }
-
-    // Animate from the tab picker. The index supplied is the index to animate
-    // from.
-    private void animateFromTabOverview(final AnimatingView view,
-            final boolean newTab, final Message msg) {
-        // firstVisible is the first visible tab on the screen.  This helps
-        // to know which corner of the screen the selected tab is.
-        int firstVisible = mTabOverview.getFirstVisiblePosition();
-        // tabPosition is the 0-based index of of the tab being opened
-        int tabPosition = mTabControl.getTabIndex(view.mTab);
-        if (!((ImageAdapter) mTabOverview.getAdapter()).maxedOut()) {
-            // Add one to make room for the "New Tab" cell.
-            tabPosition++;
-        }
-        // If this is a new tab, animate from the "New Tab" cell.
-        if (newTab) {
-            tabPosition = 0;
-        }
-        // Location corresponds to the four corners of the screen.
-        // A new tab or 0 is upper left, 0 for an old tab is upper
-        // right, 1 is lower left, and 2 is lower right
-        int location = tabPosition - firstVisible;
-
-        // Find the view at this location.
-        final View v = mTabOverview.getChildAt(location);
-
-        // Wait until the animation completes to replace the AnimatingView.
-        final Animation.AnimationListener l =
-                new Animation.AnimationListener() {
-                    public void onAnimationStart(Animation a) {}
-                    public void onAnimationRepeat(Animation a) {}
-                    public void onAnimationEnd(Animation a) {
-                        mHandler.post(new Runnable() {
-                            public void run() {
-                                mContentView.removeView(view);
-                                // Dismiss the tab overview. If the cell at the
-                                // given location is null, set the fade
-                                // parameter to true.
-                                dismissTabOverview(v == null);
-                                TabControl.Tab t =
-                                        mTabControl.getCurrentTab();
-                                mMenuState = R.id.MAIN_MENU;
-                                // Resume regular updates.
-                                t.getWebView().resumeTimers();
-                                // Dispatch the message after the animation
-                                // completes.
-                                if (msg != null) {
-                                    msg.sendToTarget();
-                                }
-                                // The animation is done and the tab overview is
-                                // gone so allow key events and other animations
-                                // to begin.
-                                mAnimationCount--;
-                                // Reset all the title bar info.
-                                resetTitle();
-                            }
-                        });
-                    }
-                };
-
-        if (v != null) {
-            final Animation anim = createTabAnimation(view, v, false);
-            // Set the listener and start animating
-            anim.setAnimationListener(l);
-            view.startAnimation(anim);
-            // Make the view VISIBLE during the animation.
-            view.setVisibility(View.VISIBLE);
-        } else {
-            // Go ahead and do all the cleanup.
-            l.onAnimationEnd(null);
-        }
-    }
-
-    // Dismiss the tab overview applying a fade if needed.
-    private void dismissTabOverview(final boolean fade) {
-        if (fade) {
-            AlphaAnimation anim = new AlphaAnimation(1.0f, 0.0f);
-            anim.setDuration(500);
-            anim.startNow();
-            mTabOverview.startAnimation(anim);
-        }
-        // Just in case there was a problem with animating away from the tab
-        // overview
-        WebView current = mTabControl.getCurrentWebView();
-        if (current != null) {
-            current.setVisibility(View.VISIBLE);
-        } else {
-            Log.e(LOGTAG, "No current WebView in dismissTabOverview");
-        }
-        // Make the sub window container visible.
-        if (mTabControl.getCurrentSubWindow() != null) {
-            mTabControl.getCurrentTab().getSubWebViewContainer()
-                    .setVisibility(View.VISIBLE);
-        }
-        mContentView.removeView(mTabOverview);
-        // Clear all the data for tab picker so next time it will be
-        // recreated.
-        mTabControl.wipeAllPickerData();
-        mTabOverview.clear();
-        mTabOverview = null;
-        mTabListener = null;
-    }
-
     private TabControl.Tab openTab(String url) {
         if (mSettings.openInBackground()) {
             TabControl.Tab t = mTabControl.createNewTab();
             if (t != null) {
-                t.getWebView().loadUrl(url);
+                WebView view = t.getWebView();
+                view.loadUrl(url);
             }
             return t;
         } else {
-            return openTabAndShow(url, null, false, null);
+            return openTabAndShow(url, false, null);
         }
     }
 
@@ -2319,15 +2021,6 @@
     }
 
     /**
-     * Resets the browser title-view to whatever it must be (for example, if we
-     * load a page from history).
-     */
-    private void resetTitle() {
-        resetLockIcon();
-        resetTitleIconAndProgress();
-    }
-
-    /**
      * Resets the browser title-view to whatever it must be
      * (for example, if we had a loading error)
      * When we have a new page, we call resetTitle, when we
@@ -2374,43 +2067,13 @@
         mUrl = url;
         mTitle = title;
 
-        // While the tab overview is animating or being shown, block changes
-        // to the title.
-        if (mAnimationCount == 0 && mTabOverview == null) {
-            setTitle(buildUrlTitle(url, title));
+        mTitleBar.setTitleAndUrl(title, url);
+        if (mFakeTitleBar != null) {
+            mFakeTitleBar.setTitleAndUrl(title, url);
         }
     }
 
     /**
-     * Builds and returns the page title, which is some
-     * combination of the page URL and title.
-     * @param url The URL of the site being loaded.
-     * @param title The title of the site being loaded.
-     * @return The page title.
-     */
-    private String buildUrlTitle(String url, String title) {
-        String urlTitle = "";
-
-        if (url != null) {
-            String titleUrl = buildTitleUrl(url);
-
-            if (title != null && 0 < title.length()) {
-                if (titleUrl != null && 0 < titleUrl.length()) {
-                    urlTitle = titleUrl + ": " + title;
-                } else {
-                    urlTitle = title;
-                }
-            } else {
-                if (titleUrl != null) {
-                    urlTitle = titleUrl;
-                }
-            }
-        }
-
-        return urlTitle;
-    }
-
-    /**
      * @param url The URL to build a title version of the URL from.
      * @return The title version of the URL or null if fails.
      * The title version of the URL can be either the URL hostname,
@@ -2418,7 +2081,7 @@
      * or an empty string if, for example, the URL in question is a
      * file:// URL with no hostname.
      */
-    private static String buildTitleUrl(String url) {
+    /* package */ static String buildTitleUrl(String url) {
         String titleUrl = null;
 
         if (url != null) {
@@ -2449,23 +2112,10 @@
 
     // Set the favicon in the title bar.
     private void setFavicon(Bitmap icon) {
-        // While the tab overview is animating or being shown, block changes to
-        // the favicon.
-        if (mAnimationCount > 0 || mTabOverview != null) {
-            return;
+        mTitleBar.setFavicon(icon);
+        if (mFakeTitleBar != null) {
+            mFakeTitleBar.setFavicon(icon);
         }
-        Drawable[] array = new Drawable[2];
-        PaintDrawable p = new PaintDrawable(Color.WHITE);
-        p.setCornerRadius(3f);
-        array[0] = p;
-        if (icon == null) {
-            array[1] = mGenericFavicon;
-        } else {
-            array[1] = new BitmapDrawable(icon);
-        }
-        LayerDrawable d = new LayerDrawable(array);
-        d.setLayerInset(1, 2, 2, 2, 2);
-        getWindow().setFeatureDrawable(Window.FEATURE_LEFT_ICON, d);
     }
 
     /**
@@ -2490,29 +2140,22 @@
                   " revert lock icon to " + mLockIconType);
         }
 
-        updateLockIconImage(mLockIconType);
+        updateLockIconToLatest();
     }
 
-    private void switchTabs(int indexFrom, int indexToShow, boolean remove) {
-        int delay = TAB_ANIMATION_DURATION + TAB_OVERVIEW_DELAY;
-        // Animate to the tab picker, remove the current tab, then
-        // animate away from the tab picker to the parent WebView.
-        tabPicker(false, indexFrom, remove);
-        // Change to the parent tab
-        final TabControl.Tab tab = mTabControl.getTab(indexToShow);
-        if (tab != null) {
-            sendAnimateFromOverview(tab, false, EMPTY_URL_DATA, delay, null);
-        } else {
-            // Increment this here so that no other animations can happen in
-            // between the end of the tab picker transition and the beginning
-            // of openTabAndShow. This has a matching decrement in the handler
-            // of OPEN_TAB_AND_SHOW.
-            mAnimationCount++;
-            // Send a message to open a new tab.
-            mHandler.sendMessageDelayed(
-                    mHandler.obtainMessage(OPEN_TAB_AND_SHOW,
-                        mSettings.getHomePage()), delay);
+    /**
+     * Close the tab, remove its associated title bar, and adjust mTabControl's
+     * current tab to a valid value.
+     */
+    /* package */ void closeTab(TabControl.Tab t) {
+        int currentIndex = mTabControl.getCurrentIndex();
+        int removeIndex = mTabControl.getTabIndex(t);
+        mTabControl.removeTab(t);
+        if (currentIndex >= removeIndex && currentIndex != 0) {
+            currentIndex--;
         }
+        mTabControl.setCurrentTab(mTabControl.getTab(currentIndex));
+        resetTitleIconAndProgress();
     }
 
     private void goBackOnePageOrQuit() {
@@ -2526,6 +2169,7 @@
              * moveTaskToBack().
              */
             moveTaskToBack(true);
+            return;
         }
         WebView w = current.getWebView();
         if (w.canGoBack()) {
@@ -2535,25 +2179,31 @@
             // another window. If so, we switch back to that window.
             TabControl.Tab parent = current.getParentTab();
             if (parent != null) {
-                switchTabs(mTabControl.getCurrentIndex(),
-                        mTabControl.getTabIndex(parent), true);
+                switchToTab(mTabControl.getTabIndex(parent));
+                // Now we close the other tab
+                closeTab(current);
             } else {
                 if (current.closeOnExit()) {
+                    // force mPageStarted to be false as we are going to either
+                    // finish the activity or remove the tab. This will ensure
+                    // pauseWebView() taking action.
+                    mPageStarted = false;
                     if (mTabControl.getTabCount() == 1) {
                         finish();
                         return;
                     }
-                    // call pauseWebView() now, we won't be able to call it in
-                    // onPause() as the WebView won't be valid. Temporarily
-                    // change mActivityInPause to be true as pauseWebView() will
-                    // do nothing if mActivityInPause is false.
+                    // call pauseWebViewTimers() now, we won't be able to call
+                    // it in onPause() as the WebView won't be valid.
+                    // Temporarily change mActivityInPause to be true as
+                    // pauseWebViewTimers() will do nothing if mActivityInPause
+                    // is false.
                     boolean savedState = mActivityInPause;
                     if (savedState) {
-                        Log.e(LOGTAG, "BrowserActivity is already paused " +
-                                "while handing goBackOnePageOrQuit.");
+                        Log.e(LOGTAG, "BrowserActivity is already paused "
+                                + "while handing goBackOnePageOrQuit.");
                     }
                     mActivityInPause = true;
-                    pauseWebView();
+                    pauseWebViewTimers();
                     mActivityInPause = savedState;
                     removeTabFromContentView(current);
                     mTabControl.removeTab(current);
@@ -2570,84 +2220,76 @@
         }
     }
 
-    public KeyTracker.State onKeyTracker(int keyCode,
-                                         KeyEvent event,
-                                         KeyTracker.Stage stage,
-                                         int duration) {
-        // if onKeyTracker() is called after activity onStop()
-        // because of accumulated key events,
-        // we should ignore it as browser is not active any more.
-        WebView topWindow = getTopWindow();
-        if (topWindow == null)
-            return KeyTracker.State.NOT_TRACKING;
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        // The default key mode is DEFAULT_KEYS_SEARCH_LOCAL. As the MENU is
+        // still down, we don't want to trigger the search. Pretend to consume
+        // the key and do nothing.
+        if (mMenuIsDown) return true;
 
-        if (keyCode == KeyEvent.KEYCODE_BACK) {
-            // During animations, block the back key so that other animations
-            // are not triggered and so that we don't end up destroying all the
-            // WebViews before finishing the animation.
-            if (mAnimationCount > 0) {
-                return KeyTracker.State.DONE_TRACKING;
-            }
-            if (stage == KeyTracker.Stage.LONG_REPEAT) {
-                bookmarksOrHistoryPicker(true);
-                return KeyTracker.State.DONE_TRACKING;
-            } else if (stage == KeyTracker.Stage.UP) {
-                // FIXME: Currently, we do not have a notion of the
-                // history picker for the subwindow, but maybe we
-                // should?
-                WebView subwindow = mTabControl.getCurrentSubWindow();
-                if (subwindow != null) {
-                    if (subwindow.canGoBack()) {
-                        subwindow.goBack();
-                    } else {
-                        dismissSubWindow(mTabControl.getCurrentTab());
-                    }
+        switch(keyCode) {
+            case KeyEvent.KEYCODE_MENU:
+                mMenuIsDown = true;
+                break;
+            case KeyEvent.KEYCODE_SPACE:
+                // WebView/WebTextView handle the keys in the KeyDown. As
+                // the Activity's shortcut keys are only handled when WebView
+                // doesn't, have to do it in onKeyDown instead of onKeyUp.
+                if (event.isShiftPressed()) {
+                    getTopWindow().pageUp(false);
                 } else {
-                    goBackOnePageOrQuit();
+                    getTopWindow().pageDown(false);
                 }
-                return KeyTracker.State.DONE_TRACKING;
-            }
-            return KeyTracker.State.KEEP_TRACKING;
+                return true;
+            case KeyEvent.KEYCODE_BACK:
+                if (event.getRepeatCount() == 0) {
+                    event.startTracking();
+                    return true;
+                } else if (mCustomView == null && mActiveTabsPage == null
+                        && event.isLongPress()) {
+                    bookmarksOrHistoryPicker(true);
+                    return true;
+                }
+                break;
         }
-        return KeyTracker.State.NOT_TRACKING;
+        return super.onKeyDown(keyCode, event);
     }
 
-    @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_MENU) {
-            mMenuIsDown = true;
-        } else if (mMenuIsDown) {
-            // The default key mode is DEFAULT_KEYS_SEARCH_LOCAL. As the MENU is
-            // still down, we don't want to trigger the search. Pretend to
-            // consume the key and do nothing.
-            return true;
-        }
-        boolean handled =  mKeyTracker.doKeyDown(keyCode, event);
-        if (!handled) {
-            switch (keyCode) {
-                case KeyEvent.KEYCODE_SPACE:
-                    if (event.isShiftPressed()) {
-                        getTopWindow().pageUp(false);
+    @Override
+    public boolean onKeyUp(int keyCode, KeyEvent event) {
+        switch(keyCode) {
+            case KeyEvent.KEYCODE_MENU:
+                mMenuIsDown = false;
+                break;
+            case KeyEvent.KEYCODE_BACK:
+                if (event.isTracking() && !event.isCanceled()) {
+                    if (mCustomView != null) {
+                        // if a custom view is showing, hide it
+                        mWebChromeClient.onHideCustomView();
+                    } else if (mActiveTabsPage != null) {
+                        // if tab page is showing, hide it
+                        removeActiveTabPage(true);
                     } else {
-                        getTopWindow().pageDown(false);
+                        WebView subwindow = mTabControl.getCurrentSubWindow();
+                        if (subwindow != null) {
+                            if (subwindow.canGoBack()) {
+                                subwindow.goBack();
+                            } else {
+                                dismissSubWindow(mTabControl.getCurrentTab());
+                            }
+                        } else {
+                            goBackOnePageOrQuit();
+                        }
                     }
-                    handled = true;
-                    break;
-
-                default:
-                    break;
-            }
+                    return true;
+                }
+                break;
         }
-        return handled || super.onKeyDown(keyCode, event);
+        return super.onKeyUp(keyCode, event);
     }
 
-    @Override public boolean onKeyUp(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_MENU) {
-            mMenuIsDown = false;
-        }
-        return mKeyTracker.doKeyUp(keyCode, event) || super.onKeyUp(keyCode, event);
-    }
-
-    private void stopLoading() {
+    /* package */ void stopLoading() {
+        mDidStopLoad = true;
         resetTitleAndRevertLockIcon();
         WebView w = getTopWindow();
         w.stopLoading();
@@ -2678,37 +2320,17 @@
     // Message Ids
     private static final int FOCUS_NODE_HREF         = 102;
     private static final int CANCEL_CREDS_REQUEST    = 103;
-    private static final int ANIMATE_FROM_OVERVIEW   = 104;
-    private static final int ANIMATE_TO_OVERVIEW     = 105;
-    private static final int OPEN_TAB_AND_SHOW       = 106;
-    private static final int CHECK_MEMORY            = 107;
-    private static final int RELEASE_WAKELOCK        = 108;
+    private static final int RELEASE_WAKELOCK        = 107;
+
+    private static final int UPDATE_BOOKMARK_THUMBNAIL = 108;
 
     // Private handler for handling javascript and saving passwords
     private Handler mHandler = new Handler() {
 
         public void handleMessage(Message msg) {
             switch (msg.what) {
-                case ANIMATE_FROM_OVERVIEW:
-                    final HashMap map = (HashMap) msg.obj;
-                    animateFromTabOverview((AnimatingView) map.get("view"),
-                            msg.arg1 == 1, (Message) map.get("msg"));
-                    break;
-
-                case ANIMATE_TO_OVERVIEW:
-                    animateToTabOverview(msg.arg1, msg.arg2 == 1,
-                            (AnimatingView) msg.obj);
-                    break;
-
-                case OPEN_TAB_AND_SHOW:
-                    // Decrement mAnimationCount before openTabAndShow because
-                    // the method relies on the value being 0 to start the next
-                    // animation.
-                    mAnimationCount--;
-                    openTabAndShow((String) msg.obj, null, false, null);
-                    break;
-
                 case FOCUS_NODE_HREF:
+                {
                     String url = (String) msg.getData().get("url");
                     if (url == null || url.length() == 0) {
                         break;
@@ -2739,7 +2361,8 @@
                             startActivity(intent);
                             break;
                         case R.id.share_link_context_menu_id:
-                            Browser.sendString(BrowserActivity.this, url);
+                            Browser.sendString(BrowserActivity.this, url,
+                                    getText(R.string.choosertitle_sharevia).toString());
                             break;
                         case R.id.copy_link_context_menu_id:
                             copy(url);
@@ -2750,6 +2373,7 @@
                             break;
                     }
                     break;
+                }
 
                 case LOAD_URL:
                     loadURL(getTopWindow(), (String) msg.obj);
@@ -2763,23 +2387,112 @@
                     resumeAfterCredentials();
                     break;
 
-                case CHECK_MEMORY:
-                    // reschedule to check memory condition
-                    mHandler.removeMessages(CHECK_MEMORY);
-                    mHandler.sendMessageDelayed(mHandler.obtainMessage
-                            (CHECK_MEMORY), CHECK_MEMORY_INTERVAL);
-                    checkMemory();
-                    break;
-
                 case RELEASE_WAKELOCK:
                     if (mWakeLock.isHeld()) {
                         mWakeLock.release();
                     }
                     break;
+
+                case UPDATE_BOOKMARK_THUMBNAIL:
+                    WebView view = (WebView) msg.obj;
+                    if (view != null) {
+                        updateScreenshot(view);
+                    }
+                    break;
             }
         }
     };
 
+    private void updateScreenshot(WebView view) {
+        // If this is a bookmarked site, add a screenshot to the database.
+        // FIXME: When should we update?  Every time?
+        // FIXME: Would like to make sure there is actually something to
+        // draw, but the API for that (WebViewCore.pictureReady()) is not
+        // currently accessible here.
+
+        ContentResolver cr = getContentResolver();
+        final Cursor c = BrowserBookmarksAdapter.queryBookmarksForUrl(
+                cr, view.getOriginalUrl(), view.getUrl(), true);
+        if (c != null) {
+            boolean succeed = c.moveToFirst();
+            ContentValues values = null;
+            while (succeed) {
+                if (values == null) {
+                    final ByteArrayOutputStream os
+                            = new ByteArrayOutputStream();
+                    Bitmap bm = createScreenshot(view);
+                    if (bm == null) {
+                        c.close();
+                        return;
+                    }
+                    bm.compress(Bitmap.CompressFormat.PNG, 100, os);
+                    values = new ContentValues();
+                    values.put(Browser.BookmarkColumns.THUMBNAIL,
+                            os.toByteArray());
+                }
+                cr.update(ContentUris.withAppendedId(Browser.BOOKMARKS_URI,
+                        c.getInt(0)), values, null, null);
+                succeed = c.moveToNext();
+            }
+            c.close();
+        }
+    }
+
+    /**
+     * Values for the size of the thumbnail created when taking a screenshot.
+     * Lazily initialized.  Instead of using these directly, use
+     * getDesiredThumbnailWidth() or getDesiredThumbnailHeight().
+     */
+    private static int THUMBNAIL_WIDTH = 0;
+    private static int THUMBNAIL_HEIGHT = 0;
+
+    /**
+     * Return the desired width for thumbnail screenshots, which are stored in
+     * the database, and used on the bookmarks screen.
+     * @param context Context for finding out the density of the screen.
+     * @return int desired width for thumbnail screenshot.
+     */
+    /* package */ static int getDesiredThumbnailWidth(Context context) {
+        if (THUMBNAIL_WIDTH == 0) {
+            float density = context.getResources().getDisplayMetrics().density;
+            THUMBNAIL_WIDTH = (int) (90 * density);
+            THUMBNAIL_HEIGHT = (int) (80 * density);
+        }
+        return THUMBNAIL_WIDTH;
+    }
+
+    /**
+     * Return the desired height for thumbnail screenshots, which are stored in
+     * the database, and used on the bookmarks screen.
+     * @param context Context for finding out the density of the screen.
+     * @return int desired height for thumbnail screenshot.
+     */
+    /* package */ static int getDesiredThumbnailHeight(Context context) {
+        // To ensure that they are both initialized.
+        getDesiredThumbnailWidth(context);
+        return THUMBNAIL_HEIGHT;
+    }
+
+    private Bitmap createScreenshot(WebView view) {
+        Picture thumbnail = view.capturePicture();
+        if (thumbnail == null) {
+            return null;
+        }
+        Bitmap bm = Bitmap.createBitmap(getDesiredThumbnailWidth(this),
+                getDesiredThumbnailHeight(this), Bitmap.Config.ARGB_4444);
+        Canvas canvas = new Canvas(bm);
+        // May need to tweak these values to determine what is the
+        // best scale factor
+        int thumbnailWidth = thumbnail.getWidth();
+        if (thumbnailWidth > 0) {
+            float scaleFactor = (float) getDesiredThumbnailWidth(this) /
+                    (float)thumbnailWidth;
+            canvas.scale(scaleFactor, scaleFactor);
+        }
+        thumbnail.draw(canvas);
+        return bm;
+    }
+
     // -------------------------------------------------------------------------
     // WebViewClient implementation.
     //-------------------------------------------------------------------------
@@ -2794,10 +2507,18 @@
         return mWebViewClient;
     }
 
+    private void updateIcon(WebView view, Bitmap icon) {
+        if (icon != null) {
+            BrowserBookmarksAdapter.updateBookmarkFavicon(mResolver,
+                    view.getOriginalUrl(), view.getUrl(), icon);
+        }
+        setFavicon(icon);
+    }
+
     private void updateIcon(String url, Bitmap icon) {
         if (icon != null) {
             BrowserBookmarksAdapter.updateBookmarkFavicon(mResolver,
-                    url, icon);
+                    null, url, icon);
         }
         setFavicon(icon);
     }
@@ -2807,35 +2528,45 @@
         public void onPageStarted(WebView view, String url, Bitmap favicon) {
             resetLockIcon(url);
             setUrlTitle(url, null);
+
+            // We've started to load a new page. If there was a pending message
+            // to save a screenshot then we will now take the new page and
+            // save an incorrect screenshot. Therefore, remove any pending
+            // thumbnail messages from the queue.
+            mHandler.removeMessages(UPDATE_BOOKMARK_THUMBNAIL);
+
+            // If we start a touch icon load and then load a new page, we don't
+            // want to cancel the current touch icon loader. But, we do want to
+            // create a new one when the touch icon url is known.
+            if (mTouchIconLoader != null) {
+                mTouchIconLoader.mActivity = null;
+                mTouchIconLoader = null;
+            }
+
+            ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole(false);
+            if (errorConsole != null) {
+                errorConsole.clearErrorMessages();
+                if (mShouldShowErrorConsole) {
+                    errorConsole.showConsole(ErrorConsoleView.SHOW_NONE);
+                }
+            }
+
             // Call updateIcon instead of setFavicon so the bookmark
             // database can be updated.
             updateIcon(url, favicon);
 
-            if (mSettings.isTracing() == true) {
-                // FIXME: we should save the trace file somewhere other than data.
-                // I can't use "/tmp" as it competes for system memory.
-                File file = getDir("browserTrace", 0);
-                String baseDir = file.getPath();
-                if (!baseDir.endsWith(File.separator)) baseDir += File.separator;
+            if (mSettings.isTracing()) {
                 String host;
                 try {
                     WebAddress uri = new WebAddress(url);
                     host = uri.mHost;
                 } catch (android.net.ParseException ex) {
-                    host = "unknown_host";
+                    host = "browser";
                 }
                 host = host.replace('.', '_');
-                baseDir = baseDir + host;
-                file = new File(baseDir+".data");
-                if (file.exists() == true) {
-                    file.delete();
-                }
-                file = new File(baseDir+".key");
-                if (file.exists() == true) {
-                    file.delete();
-                }
+                host += ".trace";
                 mInTrace = true;
-                Debug.startMethodTracing(baseDir, 8 * 1024 * 1024);
+                Debug.startMethodTracing(host, 20 * 1024 * 1024);
             }
 
             // Performance probe
@@ -2855,31 +2586,24 @@
 
             if (!mPageStarted) {
                 mPageStarted = true;
-                // if onResume() has been called, resumeWebView() does nothing.
-                resumeWebView();
+                // if onResume() has been called, resumeWebViewTimers() does
+                // nothing.
+                resumeWebViewTimers();
             }
 
             // reset sync timer to avoid sync starts during loading a page
             CookieSyncManager.getInstance().resetSync();
 
             mInLoad = true;
+            mDidStopLoad = false;
+            showFakeTitleBar();
             updateInLoadMenuItems();
             if (!mIsNetworkUp) {
-                if ( mAlertDialog == null) {
-                    mAlertDialog = new AlertDialog.Builder(BrowserActivity.this)
-                        .setTitle(R.string.loadSuspendedTitle)
-                        .setMessage(R.string.loadSuspended)
-                        .setPositiveButton(R.string.ok, null)
-                        .show();
-                }
+                createAndShowNetworkDialog();
                 if (view != null) {
                     view.setNetworkAvailable(false);
                 }
             }
-
-            // schedule to check memory condition
-            mHandler.sendMessageDelayed(mHandler.obtainMessage(CHECK_MEMORY),
-                    CHECK_MEMORY_INTERVAL);
         }
 
         @Override
@@ -2888,8 +2612,15 @@
             // load.
             resetTitleAndIcon(view);
 
+            if (!mDidStopLoad) {
+                // Only update the bookmark screenshot if the user did not
+                // cancel the load early.
+                Message updateScreenshot = Message.obtain(mHandler, UPDATE_BOOKMARK_THUMBNAIL, view);
+                mHandler.sendMessageDelayed(updateScreenshot, 500);
+            }
+
             // Update the lock icon image only once we are done loading
-            updateLockIconImage(mLockIconType);
+            updateLockIconToLatest();
 
             // Performance probe
             if (false) {
@@ -2977,18 +2708,15 @@
 
             if (mPageStarted) {
                 mPageStarted = false;
-                // pauseWebView() will do nothing and return false if onPause()
-                // is not called yet.
-                if (pauseWebView()) {
+                // pauseWebViewTimers() will do nothing and return false if
+                // onPause() is not called yet.
+                if (pauseWebViewTimers()) {
                     if (mWakeLock.isHeld()) {
                         mHandler.removeMessages(RELEASE_WAKELOCK);
                         mWakeLock.release();
                     }
                 }
             }
-
-            mHandler.removeMessages(CHECK_MEMORY);
-            checkMemory();
         }
 
         // return true if want to hijack the url to let another app to handle it
@@ -3025,9 +2753,9 @@
             if (url.startsWith("about:")) {
                 return false;
             }
-            
+
             Intent intent;
-            
+
             // perform generic parsing of the URI to turn it into an Intent.
             try {
                 intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
@@ -3167,7 +2895,7 @@
                 }
             }
             ErrorDialog errDialog = new ErrorDialog(
-                    err == EventHandler.FILE_NOT_FOUND_ERROR ?
+                    err == WebViewClient.ERROR_FILE_NOT_FOUND ?
                     R.string.browserFrameFileErrorLabel :
                     R.string.browserFrameNetworkErrorLabel,
                     desc, err);
@@ -3196,11 +2924,11 @@
         @Override
         public void onReceivedError(WebView view, int errorCode,
                 String description, String failingUrl) {
-            if (errorCode != EventHandler.ERROR_LOOKUP &&
-                    errorCode != EventHandler.ERROR_CONNECT &&
-                    errorCode != EventHandler.ERROR_BAD_URL &&
-                    errorCode != EventHandler.ERROR_UNSUPPORTED_SCHEME &&
-                    errorCode != EventHandler.FILE_ERROR) {
+            if (errorCode != WebViewClient.ERROR_HOST_LOOKUP &&
+                    errorCode != WebViewClient.ERROR_CONNECT &&
+                    errorCode != WebViewClient.ERROR_BAD_URL &&
+                    errorCode != WebViewClient.ERROR_UNSUPPORTED_SCHEME &&
+                    errorCode != WebViewClient.ERROR_FILE) {
                 queueError(errorCode, description);
             }
             Log.e(LOGTAG, "onReceivedError " + errorCode + " " + failingUrl
@@ -3247,6 +2975,19 @@
             if (url.regionMatches(true, 0, "about:", 0, 6)) {
                 return;
             }
+            // remove "client" before updating it to the history so that it wont
+            // show up in the auto-complete list.
+            int index = url.indexOf("client=ms-");
+            if (index > 0 && url.contains(".google.")) {
+                int end = url.indexOf('&', index);
+                if (end > 0) {
+                    url = url.substring(0, index)
+                            .concat(url.substring(end + 1));
+                } else {
+                    // the url.charAt(index-1) should be either '?' or '&'
+                    url = url.substring(0, index-1);
+                }
+            }
             Browser.updateVisitedHistory(mResolver, url, true);
             WebIconDatabase.getInstance().retainIconForPageUrl(url);
         }
@@ -3412,28 +3153,21 @@
                 msg.sendToTarget();
             } else {
                 final TabControl.Tab parent = mTabControl.getCurrentTab();
-                // openTabAndShow will dispatch the message after creating the
-                // new WebView. This will prevent another request from coming
-                // in during the animation.
-                final TabControl.Tab newTab =
-                        openTabAndShow(EMPTY_URL_DATA, msg, false, null);
+                final TabControl.Tab newTab
+                        = openTabAndShow(EMPTY_URL_DATA, false, null);
                 if (newTab != parent) {
                     parent.addChildTab(newTab);
                 }
                 WebView.WebViewTransport transport =
                         (WebView.WebViewTransport) msg.obj;
                 transport.setWebView(mTabControl.getCurrentWebView());
+                msg.sendToTarget();
             }
         }
 
         @Override
         public boolean onCreateWindow(WebView view, final boolean dialog,
                 final boolean userGesture, final Message resultMsg) {
-            // Ignore these requests during tab animations or if the tab
-            // overview is showing.
-            if (mAnimationCount > 0 || mTabOverview != null) {
-                return false;
-            }
             // Short-circuit if we can't create any more tabs or sub windows.
             if (dialog && mTabControl.getCurrentSubWindow() != null) {
                 new AlertDialog.Builder(BrowserActivity.this)
@@ -3455,9 +3189,6 @@
 
             // Short-circuit if this was a user gesture.
             if (userGesture) {
-                // createWindow will call openTabAndShow for new Windows and
-                // that will call tabPicker which will increment
-                // mAnimationCount.
                 createWindow(dialog, resultMsg);
                 return true;
             }
@@ -3467,12 +3198,7 @@
                     new AlertDialog.OnClickListener() {
                         public void onClick(DialogInterface d,
                                 int which) {
-                            // Same comment as above for setting
-                            // mAnimationCount.
                             createWindow(dialog, resultMsg);
-                            // Since we incremented mAnimationCount while the
-                            // dialog was up, we have to decrement it here.
-                            mAnimationCount--;
                         }
                     };
 
@@ -3481,9 +3207,6 @@
                     new AlertDialog.OnClickListener() {
                         public void onClick(DialogInterface d, int which) {
                             resultMsg.sendToTarget();
-                            // We are not going to trigger an animation so
-                            // unblock keys and animation requests.
-                            mAnimationCount--;
                         }
                     };
 
@@ -3500,51 +3223,57 @@
 
             // Show the confirmation dialog.
             d.show();
-            // We want to increment mAnimationCount here to prevent a
-            // potential race condition. If the user allows a pop-up from a
-            // site and that pop-up then triggers another pop-up, it is
-            // possible to get the BACK key between here and when the dialog
-            // appears.
-            mAnimationCount++;
             return true;
         }
 
         @Override
         public void onCloseWindow(WebView window) {
-            final int currentIndex = mTabControl.getCurrentIndex();
-            final TabControl.Tab parent =
-                    mTabControl.getCurrentTab().getParentTab();
+            final TabControl.Tab current = mTabControl.getCurrentTab();
+            final TabControl.Tab parent = current.getParentTab();
             if (parent != null) {
                 // JavaScript can only close popup window.
-                switchTabs(currentIndex, mTabControl.getTabIndex(parent), true);
+                switchToTab(mTabControl.getTabIndex(parent));
+                // Now we need to close the window
+                closeTab(current);
             }
         }
 
         @Override
         public void onProgressChanged(WebView view, int newProgress) {
-            // Block progress updates to the title bar while the tab overview
-            // is animating or being displayed.
-            if (mAnimationCount == 0 && mTabOverview == null) {
-                getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
-                        newProgress * 100);
+            mTitleBar.setProgress(newProgress);
+            if (mFakeTitleBar != null) {
+                mFakeTitleBar.setProgress(newProgress);
             }
 
             if (newProgress == 100) {
-                // onProgressChanged() is called for sub-frame too while
-                // onPageFinished() is only called for the main frame. sync
-                // cookie and cache promptly here.
+                // onProgressChanged() may continue to be called after the main
+                // frame has finished loading, as any remaining sub frames
+                // continue to load. We'll only get called once though with
+                // newProgress as 100 when everything is loaded.
+                // (onPageFinished is called once when the main frame completes
+                // loading regardless of the state of any sub frames so calls
+                // to onProgressChanges may continue after onPageFinished has
+                // executed)
+
+                // sync cookies and cache promptly here.
                 CookieSyncManager.getInstance().sync();
                 if (mInLoad) {
                     mInLoad = false;
                     updateInLoadMenuItems();
+                    // If the options menu is open, leave the title bar
+                    if (!mOptionsMenuOpen || !mIconView) {
+                        hideFakeTitleBar();
+                    }
                 }
-            } else {
+            } else if (!mInLoad) {
                 // onPageFinished may have already been called but a subframe
                 // is still loading and updating the progress. Reset mInLoad
                 // and update the menu items.
-                if (!mInLoad) {
-                    mInLoad = true;
-                    updateInLoadMenuItems();
+                mInLoad = true;
+                updateInLoadMenuItems();
+                if (!mOptionsMenuOpen || mIconView) {
+                    // This page has begun to load, so show the title bar
+                    showFakeTitleBar();
                 }
             }
         }
@@ -3560,6 +3289,8 @@
                 url.length() >= SQLiteDatabase.SQLITE_MAX_LIKE_PATTERN_LENGTH) {
                 return;
             }
+            // See if we can find the current url in our history database and
+            // add the new title to it.
             if (url.startsWith("http://www.")) {
                 url = url.substring(11);
             } else if (url.startsWith("http://")) {
@@ -3574,9 +3305,6 @@
                 Cursor c = mResolver.query(Browser.BOOKMARKS_URI,
                     Browser.HISTORY_PROJECTION, where, selArgs, null);
                 if (c.moveToFirst()) {
-                    if (LOGV_ENABLED) {
-                        Log.v(LOGTAG, "updating cursor");
-                    }
                     // Current implementation of database only has one entry per
                     // url.
                     ContentValues map = new ContentValues();
@@ -3594,8 +3322,200 @@
 
         @Override
         public void onReceivedIcon(WebView view, Bitmap icon) {
-            updateIcon(view.getUrl(), icon);
+            updateIcon(view, icon);
         }
+
+        @Override
+        public void onReceivedTouchIconUrl(WebView view, String url,
+                boolean precomposed) {
+            final ContentResolver cr = getContentResolver();
+            final Cursor c =
+                    BrowserBookmarksAdapter.queryBookmarksForUrl(cr,
+                            view.getOriginalUrl(), view.getUrl(), true);
+            if (c != null) {
+                if (c.getCount() > 0) {
+                    // Let precomposed icons take precedence over non-composed
+                    // icons.
+                    if (precomposed && mTouchIconLoader != null) {
+                        mTouchIconLoader.cancel(false);
+                        mTouchIconLoader = null;
+                    }
+                    // Have only one async task at a time.
+                    if (mTouchIconLoader == null) {
+                        mTouchIconLoader = new DownloadTouchIcon(
+                                BrowserActivity.this, cr, c, view);
+                        mTouchIconLoader.execute(url);
+                    }
+                } else {
+                    c.close();
+                }
+            }
+        }
+
+        @Override
+        public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
+            if (mCustomView != null)
+                return;
+
+            // Add the custom view to its container.
+            mCustomViewContainer.addView(view, COVER_SCREEN_GRAVITY_CENTER);
+            mCustomView = view;
+            mCustomViewCallback = callback;
+            // Save the menu state and set it to empty while the custom
+            // view is showing.
+            mOldMenuState = mMenuState;
+            mMenuState = EMPTY_MENU;
+            // Hide the content view.
+            mContentView.setVisibility(View.GONE);
+            // Finally show the custom view container.
+            mCustomViewContainer.setVisibility(View.VISIBLE);
+            mCustomViewContainer.bringToFront();
+        }
+
+        @Override
+        public void onHideCustomView() {
+            if (mCustomView == null)
+                return;
+
+            // Hide the custom view.
+            mCustomView.setVisibility(View.GONE);
+            // Remove the custom view from its container.
+            mCustomViewContainer.removeView(mCustomView);
+            mCustomView = null;
+            // Reset the old menu state.
+            mMenuState = mOldMenuState;
+            mOldMenuState = EMPTY_MENU;
+            mCustomViewContainer.setVisibility(View.GONE);
+            mCustomViewCallback.onCustomViewHidden();
+            // Show the content view.
+            mContentView.setVisibility(View.VISIBLE);
+        }
+
+        /**
+         * The origin has exceeded its database quota.
+         * @param url the URL that exceeded the quota
+         * @param databaseIdentifier the identifier of the database on
+         *     which the transaction that caused the quota overflow was run
+         * @param currentQuota the current quota for the origin.
+         * @param estimatedSize the estimated size of the database.
+         * @param totalUsedQuota is the sum of all origins' quota.
+         * @param quotaUpdater The callback to run when a decision to allow or
+         *     deny quota has been made. Don't forget to call this!
+         */
+        @Override
+        public void onExceededDatabaseQuota(String url,
+            String databaseIdentifier, long currentQuota, long estimatedSize,
+            long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
+            mSettings.getWebStorageSizeManager().onExceededDatabaseQuota(
+                    url, databaseIdentifier, currentQuota, estimatedSize,
+                    totalUsedQuota, quotaUpdater);
+        }
+
+        /**
+         * The Application Cache has exceeded its max size.
+         * @param spaceNeeded is the amount of disk space that would be needed
+         * in order for the last appcache operation to succeed.
+         * @param totalUsedQuota is the sum of all origins' quota.
+         * @param quotaUpdater A callback to inform the WebCore thread that a new
+         * app cache size is available. This callback must always be executed at
+         * some point to ensure that the sleeping WebCore thread is woken up.
+         */
+        @Override
+        public void onReachedMaxAppCacheSize(long spaceNeeded,
+                long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
+            mSettings.getWebStorageSizeManager().onReachedMaxAppCacheSize(
+                    spaceNeeded, totalUsedQuota, quotaUpdater);
+        }
+
+        /**
+         * Instructs the browser to show a prompt to ask the user to set the
+         * Geolocation permission state for the specified origin.
+         * @param origin The origin for which Geolocation permissions are
+         *     requested.
+         * @param callback The callback to call once the user has set the
+         *     Geolocation permission state.
+         */
+        @Override
+        public void onGeolocationPermissionsShowPrompt(String origin,
+                GeolocationPermissions.Callback callback) {
+            mTabControl.getCurrentTab().getGeolocationPermissionsPrompt().show(
+                    origin, callback);
+        }
+
+        /**
+         * Instructs the browser to hide the Geolocation permissions prompt.
+         */
+        @Override
+        public void onGeolocationPermissionsHidePrompt() {
+            mTabControl.getCurrentTab().getGeolocationPermissionsPrompt().hide();
+        }
+
+        /* Adds a JavaScript error message to the system log.
+         * @param message The error message to report.
+         * @param lineNumber The line number of the error.
+         * @param sourceID The name of the source file that caused the error.
+         */
+        @Override
+        public void addMessageToConsole(String message, int lineNumber, String sourceID) {
+            ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole(true);
+            errorConsole.addErrorMessage(message, sourceID, lineNumber);
+                if (mShouldShowErrorConsole &&
+                        errorConsole.getShowState() != ErrorConsoleView.SHOW_MAXIMIZED) {
+                    errorConsole.showConsole(ErrorConsoleView.SHOW_MINIMIZED);
+                }
+            Log.w(LOGTAG, "Console: " + message + " " + sourceID + ":" + lineNumber);
+        }
+
+        /**
+         * Ask the browser for an icon to represent a <video> element.
+         * This icon will be used if the Web page did not specify a poster attribute.
+         *
+         * @return Bitmap The icon or null if no such icon is available.
+         * @hide pending API Council approval
+         */
+        @Override
+        public Bitmap getDefaultVideoPoster() {
+            if (mDefaultVideoPoster == null) {
+                mDefaultVideoPoster = BitmapFactory.decodeResource(
+                        getResources(), R.drawable.default_video_poster);
+            }
+            return mDefaultVideoPoster;
+        }
+
+        /**
+         * Ask the host application for a custom progress view to show while
+         * a <video> is loading.
+         *
+         * @return View The progress view.
+         * @hide pending API Council approval
+         */
+        @Override
+        public View getVideoLoadingProgressView() {
+            if (mVideoProgressView == null) {
+                LayoutInflater inflater = LayoutInflater.from(BrowserActivity.this);
+                mVideoProgressView = inflater.inflate(R.layout.video_loading_progress, null);
+            }
+            return mVideoProgressView;
+        }
+
+        /**
+         * Deliver a list of already-visited URLs
+         * @hide pending API Council approval
+         */
+        @Override
+        public void getVisitedHistory(final ValueCallback<String[]> callback) {
+            AsyncTask<Void, Void, String[]> task = new AsyncTask<Void, Void, String[]>() {
+                public String[] doInBackground(Void... unused) {
+                    return Browser.getVisitedHistory(getContentResolver());
+                }
+
+                public void onPostExecute(String[] result) {
+                    callback.onReceiveValue(result);
+
+                };
+            };
+            task.execute();
+        };
     };
 
     /**
@@ -3612,23 +3532,36 @@
         // if we're dealing wih A/V content that's not explicitly marked
         //     for download, check if it's streamable.
         if (contentDisposition == null
-                        || !contentDisposition.regionMatches(true, 0, "attachment", 0, 10)) {
+                || !contentDisposition.regionMatches(
+                        true, 0, "attachment", 0, 10)) {
             // query the package manager to see if there's a registered handler
             //     that matches.
             Intent intent = new Intent(Intent.ACTION_VIEW);
             intent.setDataAndType(Uri.parse(url), mimetype);
-            if (getPackageManager().resolveActivity(intent,
-                        PackageManager.MATCH_DEFAULT_ONLY) != null) {
-                // someone knows how to handle this mime type with this scheme, don't download.
-                try {
-                    startActivity(intent);
-                    return;
-                } catch (ActivityNotFoundException ex) {
-                    if (LOGD_ENABLED) {
-                        Log.d(LOGTAG, "activity not found for " + mimetype
-                                + " over " + Uri.parse(url).getScheme(), ex);
+            ResolveInfo info = getPackageManager().resolveActivity(intent,
+                    PackageManager.MATCH_DEFAULT_ONLY);
+            if (info != null) {
+                ComponentName myName = getComponentName();
+                // If we resolved to ourselves, we don't want to attempt to
+                // load the url only to try and download it again.
+                if (!myName.getPackageName().equals(
+                        info.activityInfo.packageName)
+                        || !myName.getClassName().equals(
+                                info.activityInfo.name)) {
+                    // someone (other than us) knows how to handle this mime
+                    // type with this scheme, don't download.
+                    try {
+                        startActivity(intent);
+                        return;
+                    } catch (ActivityNotFoundException ex) {
+                        if (LOGD_ENABLED) {
+                            Log.d(LOGTAG, "activity not found for " + mimetype
+                                    + " over " + Uri.parse(url).getScheme(),
+                                    ex);
+                        }
+                        // Best behavior is to fall back to a download in this
+                        // case
                     }
-                    // Best behavior is to fall back to a download in this case
                 }
             }
         }
@@ -3711,19 +3644,19 @@
         String cookies = CookieManager.getInstance().getCookie(url);
 
         ContentValues values = new ContentValues();
-        values.put(Downloads.URI, uri.toString());
-        values.put(Downloads.COOKIE_DATA, cookies);
-        values.put(Downloads.USER_AGENT, userAgent);
-        values.put(Downloads.NOTIFICATION_PACKAGE,
+        values.put(Downloads.COLUMN_URI, uri.toString());
+        values.put(Downloads.COLUMN_COOKIE_DATA, cookies);
+        values.put(Downloads.COLUMN_USER_AGENT, userAgent);
+        values.put(Downloads.COLUMN_NOTIFICATION_PACKAGE,
                 getPackageName());
-        values.put(Downloads.NOTIFICATION_CLASS,
+        values.put(Downloads.COLUMN_NOTIFICATION_CLASS,
                 BrowserDownloadPage.class.getCanonicalName());
-        values.put(Downloads.VISIBILITY, Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
-        values.put(Downloads.MIMETYPE, mimetype);
-        values.put(Downloads.FILENAME_HINT, filename);
-        values.put(Downloads.DESCRIPTION, uri.getHost());
+        values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
+        values.put(Downloads.COLUMN_MIME_TYPE, mimetype);
+        values.put(Downloads.COLUMN_FILE_NAME_HINT, filename);
+        values.put(Downloads.COLUMN_DESCRIPTION, uri.getHost());
         if (contentLength > 0) {
-            values.put(Downloads.TOTAL_BYTES, contentLength);
+            values.put(Downloads.COLUMN_TOTAL_BYTES, contentLength);
         }
         if (mimetype == null) {
             // We must have long pressed on a link or image to download it. We
@@ -3757,23 +3690,27 @@
         updateLockIconImage(LOCK_ICON_UNSECURE);
     }
 
+    /* package */ void setLockIconType(int type) {
+        mLockIconType = type;
+    }
+
+    /* package */ int getLockIconType() {
+        return mLockIconType;
+    }
+
+    /* package */ void setPrevLockType(int type) {
+        mPrevLockType = type;
+    }
+
+    /* package */ int getPrevLockType() {
+        return mPrevLockType;
+    }
+
     /**
-     * Resets the lock icon.  This method is called when the icon needs to be
-     * reset but we do not know whether we are loading a secure or not secure
-     * page.
+     * Update the lock icon to correspond to our latest state.
      */
-    private void resetLockIcon() {
-        // Save the lock-icon state (we revert to it if the load gets cancelled)
-        saveLockIcon();
-
-        mLockIconType = LOCK_ICON_UNSECURE;
-
-        if (LOGV_ENABLED) {
-          Log.v(LOGTAG, "BrowserActivity.resetLockIcon:" +
-                " reset lock icon to " + mLockIconType);
-        }
-
-        updateLockIconImage(LOCK_ICON_UNSECURE);
+    /* package */ void updateLockIconToLatest() {
+        updateLockIconImage(mLockIconType);
     }
 
     /**
@@ -3786,10 +3723,9 @@
         } else if (lockIconType == LOCK_ICON_MIXED) {
             d = mMixLockIcon;
         }
-        // If the tab overview is animating or being shown, do not update the
-        // lock icon.
-        if (mAnimationCount == 0 && mTabOverview == null) {
-            getWindow().setFeatureDrawable(Window.FEATURE_RIGHT_ICON, d);
+        mTitleBar.setLock(d);
+        if (mFakeTitleBar != null) {
+            mFakeTitleBar.setLock(d);
         }
     }
 
@@ -4259,13 +4195,9 @@
             }
         } else {
             mIsNetworkUp = false;
-            if (mInLoad && mAlertDialog == null) {
-                mAlertDialog = new AlertDialog.Builder(this)
-                        .setTitle(R.string.loadSuspendedTitle)
-                        .setMessage(R.string.loadSuspended)
-                        .setPositiveButton(R.string.ok, null)
-                        .show();
-            }
+            if (mInLoad) {
+                createAndShowNetworkDialog();
+           }
         }
         WebView w = mTabControl.getCurrentWebView();
         if (w != null) {
@@ -4273,6 +4205,18 @@
         }
     }
 
+    // This method shows the network dialog alerting the user that the net is
+    // down. It will only show the dialog if mAlertDialog is null.
+    private void createAndShowNetworkDialog() {
+        if (mAlertDialog == null) {
+            mAlertDialog = new AlertDialog.Builder(this)
+                    .setTitle(R.string.loadSuspendedTitle)
+                    .setMessage(R.string.loadSuspended)
+                    .setPositiveButton(R.string.ok, null)
+                    .show();
+        }
+    }
+
     @Override
     protected void onActivityResult(int requestCode, int resultCode,
                                     Intent intent) {
@@ -4286,17 +4230,9 @@
                     } else {
                         final TabControl.Tab currentTab =
                                 mTabControl.getCurrentTab();
-                        // If the Window overview is up and we are not in the
-                        // middle of an animation, animate away from it to the
-                        // current tab.
-                        if (mTabOverview != null && mAnimationCount == 0) {
-                            sendAnimateFromOverview(currentTab, false, new UrlData(data),
-                                    TAB_OVERVIEW_DELAY, null);
-                        } else {
-                            dismissSubWindow(currentTab);
-                            if (data != null && data.length() != 0) {
-                                getTopWindow().loadUrl(data);
-                            }
+                        dismissSubWindow(currentTab);
+                        if (data != null && data.length() != 0) {
+                            getTopWindow().loadUrl(data);
                         }
                     }
                 }
@@ -4321,176 +4257,11 @@
     }
 
     /**
-     * Handle results from Tab Switcher mTabOverview tool
+     * Open the Go page.
+     * @param startWithHistory If true, open starting on the history tab.
+     *                         Otherwise, start with the bookmarks tab.
      */
-    private class TabListener implements ImageGrid.Listener {
-        public void remove(int position) {
-            // Note: Remove is not enabled if we have only one tab.
-            if (DEBUG && mTabControl.getTabCount() == 1) {
-                throw new AssertionError();
-            }
-
-            // Remember the current tab.
-            TabControl.Tab current = mTabControl.getCurrentTab();
-            final TabControl.Tab remove = mTabControl.getTab(position);
-            mTabControl.removeTab(remove);
-            // If we removed the current tab, use the tab at position - 1 if
-            // possible.
-            if (current == remove) {
-                // If the user removes the last tab, act like the New Tab item
-                // was clicked on.
-                if (mTabControl.getTabCount() == 0) {
-                    current = mTabControl.createNewTab();
-                    sendAnimateFromOverview(current, true,
-                            new UrlData(mSettings.getHomePage()), TAB_OVERVIEW_DELAY, null);
-                } else {
-                    final int index = position > 0 ? (position - 1) : 0;
-                    current = mTabControl.getTab(index);
-                }
-            }
-
-            // The tab overview could have been dismissed before this method is
-            // called.
-            if (mTabOverview != null) {
-                // Remove the tab and change the index.
-                mTabOverview.remove(position);
-                mTabOverview.setCurrentIndex(mTabControl.getTabIndex(current));
-            }
-
-            // Only the current tab ensures its WebView is non-null. This
-            // implies that we are reloading the freed tab.
-            mTabControl.setCurrentTab(current);
-        }
-        public void onClick(int index) {
-            // Change the tab if necessary.
-            // Index equals ImageGrid.CANCEL when pressing back from the tab
-            // overview.
-            if (index == ImageGrid.CANCEL) {
-                index = mTabControl.getCurrentIndex();
-                // The current index is -1 if the current tab was removed.
-                if (index == -1) {
-                    // Take the last tab as a fallback.
-                    index = mTabControl.getTabCount() - 1;
-                }
-            }
-
-            // NEW_TAB means that the "New Tab" cell was clicked on.
-            if (index == ImageGrid.NEW_TAB) {
-                openTabAndShow(mSettings.getHomePage(), null, false, null);
-            } else {
-                sendAnimateFromOverview(mTabControl.getTab(index),
-                        false, EMPTY_URL_DATA, 0, null);
-            }
-        }
-    }
-
-    // A fake View that draws the WebView's picture with a fast zoom filter.
-    // The View is used in case the tab is freed during the animation because
-    // of low memory.
-    private static class AnimatingView extends View {
-        private static final int ZOOM_BITS = Paint.FILTER_BITMAP_FLAG |
-                Paint.DITHER_FLAG | Paint.SUBPIXEL_TEXT_FLAG;
-        private static final DrawFilter sZoomFilter =
-                new PaintFlagsDrawFilter(ZOOM_BITS, Paint.LINEAR_TEXT_FLAG);
-        private final Picture mPicture;
-        private final float   mScale;
-        private final int     mScrollX;
-        private final int     mScrollY;
-        final TabControl.Tab  mTab;
-
-        AnimatingView(Context ctxt, TabControl.Tab t) {
-            super(ctxt);
-            mTab = t;
-            // Use the top window in the animation since the tab overview will
-            // display the top window in each cell.
-            final WebView w = t.getTopWindow();
-            mPicture = w.capturePicture();
-            mScale = w.getScale() / w.getWidth();
-            mScrollX = w.getScrollX();
-            mScrollY = w.getScrollY();
-        }
-
-        @Override
-        protected void onDraw(Canvas canvas) {
-            canvas.save();
-            canvas.drawColor(Color.WHITE);
-            if (mPicture != null) {
-                canvas.setDrawFilter(sZoomFilter);
-                float scale = getWidth() * mScale;
-                canvas.scale(scale, scale);
-                canvas.translate(-mScrollX, -mScrollY);
-                canvas.drawPicture(mPicture);
-            }
-            canvas.restore();
-        }
-    }
-
-    /**
-     *  Open the tab picker. This function will always use the current tab in
-     *  its animation.
-     *  @param stay boolean stating whether the tab picker is to remain open
-     *          (in which case it needs a listener and its menu) or not.
-     *  @param index The index of the tab to show as the selection in the tab
-     *               overview.
-     *  @param remove If true, the tab at index will be removed after the
-     *                animation completes.
-     */
-    private void tabPicker(final boolean stay, final int index,
-            final boolean remove) {
-        if (mTabOverview != null) {
-            return;
-        }
-
-        int size = mTabControl.getTabCount();
-
-        TabListener l = null;
-        if (stay) {
-            l = mTabListener = new TabListener();
-        }
-        mTabOverview = new ImageGrid(this, stay, l);
-
-        for (int i = 0; i < size; i++) {
-            final TabControl.Tab t = mTabControl.getTab(i);
-            mTabControl.populatePickerData(t);
-            mTabOverview.add(t);
-        }
-
-        // Tell the tab overview to show the current tab, the tab overview will
-        // handle the "New Tab" case.
-        int currentIndex = mTabControl.getCurrentIndex();
-        mTabOverview.setCurrentIndex(currentIndex);
-
-        // Attach the tab overview.
-        mContentView.addView(mTabOverview, COVER_SCREEN_PARAMS);
-
-        // Create a fake AnimatingView to animate the WebView's picture.
-        final TabControl.Tab current = mTabControl.getCurrentTab();
-        final AnimatingView v = new AnimatingView(this, current);
-        mContentView.addView(v, COVER_SCREEN_PARAMS);
-        removeTabFromContentView(current);
-        // Pause timers to get the animation smoother.
-        current.getWebView().pauseTimers();
-
-        // Send a message so the tab picker has a chance to layout and get
-        // positions for all the cells.
-        mHandler.sendMessage(mHandler.obtainMessage(ANIMATE_TO_OVERVIEW,
-                index, remove ? 1 : 0, v));
-        // Setting this will indicate that we are animating to the overview. We
-        // set it here to prevent another request to animate from coming in
-        // between now and when ANIMATE_TO_OVERVIEW is handled.
-        mAnimationCount++;
-        // Always change the title bar to the window overview title while
-        // animating.
-        getWindow().setFeatureDrawable(Window.FEATURE_LEFT_ICON, null);
-        getWindow().setFeatureDrawable(Window.FEATURE_RIGHT_ICON, null);
-        getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
-                Window.PROGRESS_VISIBILITY_OFF);
-        setTitle(R.string.tab_picker_title);
-        // Make the menu empty until the animation completes.
-        mMenuState = EMPTY_MENU;
-    }
-
-    private void bookmarksOrHistoryPicker(boolean startWithHistory) {
+    /* package */ void bookmarksOrHistoryPicker(boolean startWithHistory) {
         WebView current = mTabControl.getCurrentWebView();
         if (current == null) {
             return;
@@ -4499,6 +4270,8 @@
                 CombinedBookmarkHistoryActivity.class);
         String title = current.getTitle();
         String url = current.getUrl();
+        Bitmap thumbnail = createScreenshot(current);
+
         // Just in case the user opens bookmarks before a page finishes loading
         // so the current history item, and therefore the page, is null.
         if (null == url) {
@@ -4514,8 +4287,11 @@
         }
         intent.putExtra("title", title);
         intent.putExtra("url", url);
-        intent.putExtra("maxTabsOpen",
-                mTabControl.getTabCount() >= TabControl.MAX_TABS);
+        intent.putExtra("thumbnail", thumbnail);
+        // Disable opening in a new window if we have maxed out the windows
+        intent.putExtra("disable_new_window", mTabControl.getTabCount()
+                >= TabControl.MAX_TABS);
+        intent.putExtra("touch_icon_url", current.getTouchIconUrl());
         if (startWithHistory) {
             intent.putExtra(CombinedBookmarkHistoryActivity.STARTING_TAB,
                     CombinedBookmarkHistoryActivity.HISTORY_TAB);
@@ -4534,21 +4310,6 @@
         }
     }
 
-    private void checkMemory() {
-        ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
-        ((ActivityManager) getSystemService(ACTIVITY_SERVICE))
-                .getMemoryInfo(mi);
-        // FIXME: mi.lowMemory is too aggressive, use (mi.availMem <
-        // mi.threshold) for now
-        //        if (mi.lowMemory) {
-        if (mi.availMem < mi.threshold) {
-            Log.w(LOGTAG, "Browser is freeing memory now because: available="
-                            + (mi.availMem / 1024) + "K threshold="
-                            + (mi.threshold / 1024) + "K");
-            mTabControl.freeMemory();
-        }
-    }
-
     private String smartUrlFilter(Uri inUri) {
         if (inUri != null) {
             return smartUrlFilter(inUri.toString());
@@ -4566,7 +4327,7 @@
       return 0;
     }
 
-    static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile(
+    protected static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile(
             "(?i)" + // switch on case insensitive matching
             "(" +    // begin group for schema
             "(?:http|https|file):\\/\\/" +
@@ -4631,9 +4392,37 @@
         return URLUtil.composeSearchUrl(inUrl, QuickSearch_G, QUERY_PLACE_HOLDER);
     }
 
-    private final static int LOCK_ICON_UNSECURE = 0;
-    private final static int LOCK_ICON_SECURE   = 1;
-    private final static int LOCK_ICON_MIXED    = 2;
+    /* package */ void setShouldShowErrorConsole(boolean flag) {
+        if (flag == mShouldShowErrorConsole) {
+            // Nothing to do.
+            return;
+        }
+
+        mShouldShowErrorConsole = flag;
+
+        ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole(true);
+
+        if (flag) {
+            // Setting the show state of the console will cause it's the layout to be inflated.
+            if (errorConsole.numberOfErrors() > 0) {
+                errorConsole.showConsole(ErrorConsoleView.SHOW_MINIMIZED);
+            } else {
+                errorConsole.showConsole(ErrorConsoleView.SHOW_NONE);
+            }
+
+            // Now we can add it to the main view.
+            mErrorConsoleContainer.addView(errorConsole,
+                    new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+                                                  ViewGroup.LayoutParams.WRAP_CONTENT));
+        } else {
+            mErrorConsoleContainer.removeView(errorConsole);
+        }
+
+    }
+
+    final static int LOCK_ICON_UNSECURE = 0;
+    final static int LOCK_ICON_SECURE   = 1;
+    final static int LOCK_ICON_MIXED    = 2;
 
     private int mLockIconType = LOCK_ICON_UNSECURE;
     private int mPrevLockType = LOCK_ICON_UNSECURE;
@@ -4642,12 +4431,15 @@
     private TabControl      mTabControl;
     private ContentResolver mResolver;
     private FrameLayout     mContentView;
-    private ImageGrid       mTabOverview;
+    private View            mCustomView;
+    private FrameLayout     mCustomViewContainer;
+    private WebChromeClient.CustomViewCallback mCustomViewCallback;
 
     // FIXME, temp address onPrepareMenu performance problem. When we move everything out of
     // view, we should rewrite this.
     private int mCurrentMenuState = 0;
     private int mMenuState = R.id.MAIN_MENU;
+    private int mOldMenuState = EMPTY_MENU;
     private static final int EMPTY_MENU = -1;
     private Menu mMenu;
 
@@ -4658,17 +4450,13 @@
 
     private boolean mInLoad;
     private boolean mIsNetworkUp;
+    private boolean mDidStopLoad;
 
     private boolean mPageStarted;
     private boolean mActivityInPause = true;
 
     private boolean mMenuIsDown;
 
-    private final KeyTracker mKeyTracker = new KeyTracker(this);
-
-    // As trackball doesn't send repeat down, we have to track it ourselves
-    private boolean mTrackTrackball;
-
     private static boolean mInTrace;
 
     // Performance probe
@@ -4694,7 +4482,6 @@
 
     private Drawable    mMixLockIcon;
     private Drawable    mSecLockIcon;
-    private Drawable    mGenericFavicon;
 
     /* hold a ref so we can auto-cancel if necessary */
     private AlertDialog mAlertDialog;
@@ -4738,6 +4525,11 @@
                                             new FrameLayout.LayoutParams(
                                             ViewGroup.LayoutParams.FILL_PARENT,
                                             ViewGroup.LayoutParams.FILL_PARENT);
+    /*package*/ static final FrameLayout.LayoutParams COVER_SCREEN_GRAVITY_CENTER =
+                                            new FrameLayout.LayoutParams(
+                                            ViewGroup.LayoutParams.FILL_PARENT,
+                                            ViewGroup.LayoutParams.FILL_PARENT,
+                                            Gravity.CENTER);
     // Google search
     final static String QuickSearch_G = "http://www.google.com/m?q=%s";
     // Wikipedia search
@@ -4762,8 +4554,6 @@
 
     private final static String LOGTAG = "browser";
 
-    private TabListener mTabListener;
-
     private String mLastEnteredUrl;
 
     private PowerManager.WakeLock mWakeLock;
@@ -4771,11 +4561,10 @@
 
     private Toast mStopToast;
 
-    // Used during animations to prevent other animations from being triggered.
-    // A count is used since the animation to and from the Window overview can
-    // overlap. A count of 0 means no animation where a count of > 0 means
-    // there are animations in progress.
-    private int mAnimationCount;
+    private TitleBar mTitleBar;
+
+    private LinearLayout mErrorConsoleContainer = null;
+    private boolean mShouldShowErrorConsole = false;
 
     // As the ids are dynamically created, we can't guarantee that they will
     // be in sequence, so this static array maps ids to a window number.
@@ -4788,13 +4577,20 @@
     private IntentFilter mNetworkStateChangedFilter;
     private BroadcastReceiver mNetworkStateIntentReceiver;
 
-    // activity requestCode
-    final static int COMBO_PAGE             = 1;
-    final static int DOWNLOAD_PAGE          = 2;
-    final static int PREFERENCES_PAGE       = 3;
+    private BroadcastReceiver mPackageInstallationReceiver;
 
-    // the frenquency of checking whether system memory is low
-    final static int CHECK_MEMORY_INTERVAL = 30000;     // 30 seconds
+    // AsyncTask for downloading touch icons
+    /* package */ DownloadTouchIcon mTouchIconLoader;
+
+    // activity requestCode
+    final static int COMBO_PAGE                 = 1;
+    final static int DOWNLOAD_PAGE              = 2;
+    final static int PREFERENCES_PAGE           = 3;
+
+    // the default <video> poster
+    private Bitmap mDefaultVideoPoster;
+    // the video progress view
+    private View mVideoProgressView;
 
     /**
      * A UrlData class to abstract how the content will be set to WebView.
@@ -4841,7 +4637,7 @@
         String mEncoding;
         @Override
         boolean isEmpty() {
-            return mInlined == null || mInlined.length() == 0 || super.isEmpty(); 
+            return mInlined == null || mInlined.length() == 0 || super.isEmpty();
         }
 
         @Override
@@ -4850,5 +4646,5 @@
         }
     }
 
-    private static final UrlData EMPTY_URL_DATA = new UrlData(null);
+    /* package */ static final UrlData EMPTY_URL_DATA = new UrlData(null);
 }
diff --git a/src/com/android/browser/BrowserBackupAgent.java b/src/com/android/browser/BrowserBackupAgent.java
new file mode 100644
index 0000000..387555d
--- /dev/null
+++ b/src/com/android/browser/BrowserBackupAgent.java
@@ -0,0 +1,298 @@
+/*
+ * 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 java.io.IOException;
+
+import android.app.BackupAgent;
+import android.backup.BackupDataInput;
+import android.backup.BackupDataOutput;
+import android.database.Cursor;
+import android.os.ParcelFileDescriptor;
+import android.provider.Browser;
+import android.provider.Browser.BookmarkColumns;
+import android.util.Log;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.ArrayList;
+import java.util.zip.CRC32;
+
+/**
+ * Settings backup agent for the Android browser.  Currently the only thing
+ * stored is the set of bookmarks.  It's okay if I/O exceptions are thrown
+ * out of the agent; the calling code handles it and the backup operation
+ * simply fails.
+ *
+ * @hide
+ */
+public class BrowserBackupAgent extends BackupAgent {
+    static final String TAG = "BrowserBackupAgent";
+    static final boolean DEBUG = false;
+
+    static final String BOOKMARK_KEY = "_bookmarks_";
+    /** this version num MUST be incremented if the flattened-file schema ever changes */
+    static final int BACKUP_AGENT_VERSION = 0;
+
+    /**
+     * In order to determine whether the bookmark set has changed since the
+     * last time we did a backup, we store the following bits of info in the
+     * state file after a backup:
+     *
+     * 1. the size of the flattened bookmark file
+     * 2. the CRC32 of that file
+     * 3. the agent version number [relevant following an OTA]
+     *
+     * After we flatten the bookmarks file here in onBackup, we compare its
+     * metrics with the values from the saved state.  If they match, it means
+     * the bookmarks didn't really change and we don't need to send the data.
+     * (If they don't match, of course, then they've changed and we do indeed
+     * send the new flattened file to be backed up.)
+     */
+    @Override
+    public void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
+            ParcelFileDescriptor newState) throws IOException {
+        long savedFileSize = -1;
+        long savedCrc = -1;
+        int savedVersion = -1;
+
+        // Extract the previous bookmark file size & CRC from the saved state
+        DataInputStream in = new DataInputStream(
+                new FileInputStream(oldState.getFileDescriptor()));
+        try {
+            savedFileSize = in.readLong();
+            savedCrc = in.readLong();
+            savedVersion = in.readInt();
+        } catch (EOFException e) {
+            // It means we had no previous state; that's fine
+        }
+
+        // Build a flattened representation of the bookmarks table
+        File tmpfile = File.createTempFile("bkp", null, getCacheDir());
+        try {
+            FileOutputStream outfstream = new FileOutputStream(tmpfile);
+            long newCrc = buildBookmarkFile(outfstream);
+            outfstream.close();
+
+            // Any changes since the last backup?
+            if ((savedVersion != BACKUP_AGENT_VERSION)
+                    || (newCrc != savedCrc)
+                    || (tmpfile.length() != savedFileSize)) {
+                // Different checksum or different size, so we need to back it up
+                copyFileToBackup(BOOKMARK_KEY, tmpfile, data);
+            }
+
+            // Record our backup state and we're done
+            writeBackupState(tmpfile.length(), newCrc, newState);
+        } finally {
+            // Make sure to tidy up when we're done
+            tmpfile.delete();
+        }
+    }
+
+    /**
+     * Restore from backup -- reads in the flattened bookmark file as supplied from
+     * the backup service, parses that out, and rebuilds the bookmarks table in the
+     * browser database from it.
+     */
+    @Override
+    public void onRestore(BackupDataInput data, int appVersionCode,
+            ParcelFileDescriptor newState) throws IOException {
+        long crc = -1;
+        File tmpfile = File.createTempFile("rst", null, getFilesDir());
+        try {
+            while (data.readNextHeader()) {
+                if (BOOKMARK_KEY.equals(data.getKey())) {
+                    // Read the flattened bookmark data into a temp file
+                    crc = copyBackupToFile(data, tmpfile, data.getDataSize());
+
+                    FileInputStream infstream = new FileInputStream(tmpfile);
+                    DataInputStream in = new DataInputStream(infstream);
+
+                    try {
+                        int count = in.readInt();
+                        ArrayList<Bookmark> bookmarks = new ArrayList<Bookmark>(count);
+
+                        // Read all the bookmarks, then process later -- if we can't read
+                        // all the data successfully, we don't touch the bookmarks table
+                        for (int i = 0; i < count; i++) {
+                            Bookmark mark = new Bookmark();
+                            mark.url = in.readUTF();
+                            mark.visits = in.readInt();
+                            mark.date = in.readLong();
+                            mark.created = in.readLong();
+                            mark.title = in.readUTF();
+                            bookmarks.add(mark);
+                        }
+
+                        // Okay, we have all the bookmarks -- now see if we need to add
+                        // them to the browser's database
+                        int N = bookmarks.size();
+                        int nUnique = 0;
+                        if (DEBUG) Log.v(TAG, "Restoring " + N + " bookmarks");
+                        String[] urlCol = new String[] { BookmarkColumns.URL };
+                        for (int i = 0; i < N; i++) {
+                            Bookmark mark = bookmarks.get(i);
+
+                            // Does this URL exist in the bookmark table?
+                            Cursor cursor = getContentResolver().query(Browser.BOOKMARKS_URI,
+                                    urlCol,  BookmarkColumns.URL + " == '" + mark.url + "' AND " +
+                                    BookmarkColumns.BOOKMARK + " == 1 ", null, null);
+                            // if not, insert it
+                            if (cursor.getCount() <= 0) {
+                                if (DEBUG) Log.v(TAG, "Did not see url: " + mark.url);
+                                // Right now we do not reconstruct the db entry in its
+                                // entirety; we just add a new bookmark with the same data
+                                Bookmarks.addBookmark(null, getContentResolver(),
+                                        mark.url, mark.title, null, false);
+                                nUnique++;
+                            } else {
+                                if (DEBUG) Log.v(TAG, "Skipping extant url: " + mark.url);
+                            }
+                            cursor.close();
+                        }
+                        Log.i(TAG, "Restored " + nUnique + " of " + N + " bookmarks");
+                    } catch (IOException ioe) {
+                        Log.w(TAG, "Bad backup data; not restoring");
+                        crc = -1;
+                    }
+                }
+
+                // Last, write the state we just restored from so we can discern
+                // changes whenever we get invoked for backup in the future
+                writeBackupState(tmpfile.length(), crc, newState);
+            }
+        } finally {
+            // Whatever happens, delete the temp file
+            tmpfile.delete();
+        }
+    }
+
+    class Bookmark {
+        public String url;
+        public int visits;
+        public long date;
+        public long created;
+        public String title;
+    }
+    /*
+     * Utility functions
+     */
+
+    // Flatten the bookmarks table into the given file, calculating its CRC in the process
+    private long buildBookmarkFile(FileOutputStream outfstream) throws IOException {
+        CRC32 crc = new CRC32();
+        ByteArrayOutputStream bufstream = new ByteArrayOutputStream(512);
+        DataOutputStream bout = new DataOutputStream(bufstream);
+
+        Cursor cursor = getContentResolver().query(Browser.BOOKMARKS_URI,
+                new String[] { BookmarkColumns.URL, BookmarkColumns.VISITS,
+                BookmarkColumns.DATE, BookmarkColumns.CREATED,
+                BookmarkColumns.TITLE },
+                BookmarkColumns.BOOKMARK + " == 1 ", null, null);
+
+        // The first thing in the file is the row count...
+        int count = cursor.getCount();
+        if (DEBUG) Log.v(TAG, "Backing up " + count + " bookmarks");
+        bout.writeInt(count);
+        byte[] record = bufstream.toByteArray();
+        crc.update(record);
+        outfstream.write(record);
+
+        // ... followed by the data for each row
+        for (int i = 0; i < count; i++) {
+            cursor.moveToNext();
+
+            String url = cursor.getString(0);
+            int visits = cursor.getInt(1);
+            long date = cursor.getLong(2);
+            long created = cursor.getLong(3);
+            String title = cursor.getString(4);
+
+            // construct the flattened record in a byte array
+            bufstream.reset();
+            bout.writeUTF(url);
+            bout.writeInt(visits);
+            bout.writeLong(date);
+            bout.writeLong(created);
+            bout.writeUTF(title);
+
+            // Update the CRC and write the record to the temp file
+            record = bufstream.toByteArray();
+            crc.update(record);
+            outfstream.write(record);
+
+            if (DEBUG) Log.v(TAG, "   wrote url " + url);
+        }
+
+        cursor.close();
+        return crc.getValue();
+    }
+
+    // Write the file to backup as a single record under the given key
+    private void copyFileToBackup(String key, File file, BackupDataOutput data)
+            throws IOException {
+        final int CHUNK = 8192;
+        byte[] buf = new byte[CHUNK];
+
+        int toCopy = (int) file.length();
+        data.writeEntityHeader(key, toCopy);
+
+        FileInputStream in = new FileInputStream(file);
+        int nRead;
+        while (toCopy > 0) {
+            nRead = in.read(buf, 0, CHUNK);
+            data.writeEntityData(buf, nRead);
+            toCopy -= nRead;
+        }
+        in.close();
+    }
+
+    // Read the given file from backup to a file, calculating a CRC32 along the way
+    private long copyBackupToFile(BackupDataInput data, File file, int toRead)
+            throws IOException {
+        final int CHUNK = 8192;
+        byte[] buf = new byte[CHUNK];
+        CRC32 crc = new CRC32();
+        FileOutputStream out = new FileOutputStream(file);
+
+        while (toRead > 0) {
+            int numRead = data.readEntityData(buf, 0, CHUNK);
+            crc.update(buf, 0, numRead);
+            out.write(buf, 0, numRead);
+            toRead -= numRead;
+        }
+
+        out.close();
+        return crc.getValue();
+    }
+
+    // Write the given metrics to the new state file
+    private void writeBackupState(long fileSize, long crc, ParcelFileDescriptor stateFile)
+            throws IOException {
+        DataOutputStream out = new DataOutputStream(
+                new FileOutputStream(stateFile.getFileDescriptor()));
+        out.writeLong(fileSize);
+        out.writeLong(crc);
+        out.writeInt(BACKUP_AGENT_VERSION);
+    }
+}
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index 27782e0..dd56d2f 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -30,38 +30,37 @@
 import android.provider.Browser;
 import android.provider.Browser.BookmarkColumns;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.webkit.WebIconDatabase;
 import android.webkit.WebIconDatabase.IconListener;
+import android.webkit.WebView;
 import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
 
 import java.io.ByteArrayOutputStream;
 
 class BrowserBookmarksAdapter extends BaseAdapter {
 
-    private final String            LOGTAG = "Bookmarks";
-
     private String                  mCurrentPage;
+    private String                  mCurrentTitle;
+    private Bitmap                  mCurrentThumbnail;
     private Cursor                  mCursor;
     private int                     mCount;
-    private String                  mLastWhereClause;
-    private String[]                mLastSelectionArgs;
-    private String                  mLastOrderBy;
     private BrowserBookmarksPage    mBookmarksPage;
     private ContentResolver         mContentResolver;
-    private ChangeObserver          mChangeObserver;
-    private DataSetObserver         mDataSetObserver;
     private boolean                 mDataValid;
-
-    // When true, this adapter is used to pick a bookmark to create a shortcut
-    private boolean mCreateShortcut;
-    private int mExtraOffset;
+    private BookmarkViewMode        mViewMode;
+    private boolean                 mMostVisited;
+    private boolean                 mNeedsOffset;
+    private int                     mExtraOffset;
 
     // Implementation of WebIconDatabase.IconListener
     private class IconReceiver implements IconListener {
         public void onReceivedIcon(String url, Bitmap icon) {
-            updateBookmarkFavicon(mContentResolver, url, icon);
+            updateBookmarkFavicon(mContentResolver, null, url, icon);
         }
     }
 
@@ -70,36 +69,44 @@
 
     /**
      *  Create a new BrowserBookmarksAdapter.
-     *  @param b        BrowserBookmarksPage that instantiated this.  
-     *                  Necessary so it will adjust its focus
-     *                  appropriately after a search.
-     */
-    public BrowserBookmarksAdapter(BrowserBookmarksPage b, String curPage) {
-        this(b, curPage, false);
-    }
-
-    /**
-     *  Create a new BrowserBookmarksAdapter.
      *  @param b        BrowserBookmarksPage that instantiated this.
      *                  Necessary so it will adjust its focus
      *                  appropriately after a search.
      */
     public BrowserBookmarksAdapter(BrowserBookmarksPage b, String curPage,
-            boolean createShortcut) {
-        mDataValid = false;
-        mCreateShortcut = createShortcut;
-        mExtraOffset = createShortcut ? 0 : 1;
+            String curTitle, Bitmap curThumbnail, boolean createShortcut,
+            boolean mostVisited) {
+        mNeedsOffset = !(createShortcut || mostVisited);
+        mMostVisited = mostVisited;
+        mExtraOffset = mNeedsOffset ? 1 : 0;
         mBookmarksPage = b;
-        mCurrentPage = b.getResources().getString(R.string.current_page) + 
-                curPage;
+        mCurrentPage = b.getResources().getString(R.string.current_page)
+                + curPage;
+        mCurrentTitle = curTitle;
+        mCurrentThumbnail = curThumbnail;
         mContentResolver = b.getContentResolver();
-        mLastOrderBy = Browser.BookmarkColumns.CREATED + " DESC";
-        mChangeObserver = new ChangeObserver();
-        mDataSetObserver = new MyDataSetObserver();
+        mViewMode = BookmarkViewMode.LIST;
+
+        String whereClause;
         // FIXME: Should have a default sort order that the user selects.
-        search(null);
+        String orderBy = Browser.BookmarkColumns.VISITS + " DESC";
+        if (mostVisited) {
+            whereClause = Browser.BookmarkColumns.VISITS + " != 0";
+        } else {
+            whereClause = Browser.BookmarkColumns.BOOKMARK + " != 0";
+        }
+        mCursor = b.managedQuery(Browser.BOOKMARKS_URI,
+                Browser.HISTORY_PROJECTION, whereClause, null, orderBy);
+        mCursor.registerContentObserver(new ChangeObserver());
+        mCursor.registerDataSetObserver(new MyDataSetObserver());
+
+        mDataValid = true;
+        notifyDataSetChanged();
+
+        mCount = mCursor.getCount() + mExtraOffset;
+
         // FIXME: This requires another query of the database after the
-        // initial search(null). Can we optimize this?
+        // managedQuery. Can we optimize this?
         Browser.requestAllIcons(mContentResolver,
                 Browser.BookmarkColumns.FAVICON + " is NULL AND " +
                 Browser.BookmarkColumns.BOOKMARK + " == 1", mIconReceiver);
@@ -163,6 +170,10 @@
                 getString(Browser.HISTORY_PROJECTION_URL_INDEX))) {
             values.put(Browser.BookmarkColumns.URL, url);
         }
+
+        if (map.getBoolean("invalidateThumbnail") == true) {
+            values.put(Browser.BookmarkColumns.THUMBNAIL, new byte[0]);
+        }
         if (values.size() > 0
                 && mContentResolver.update(Browser.BOOKMARKS_URI, values,
                         "_id = " + id, null) != -1) {
@@ -181,18 +192,8 @@
         }
         mCursor.moveToPosition(position- mExtraOffset);
         String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);
-        WebIconDatabase.getInstance().releaseIconForPageUrl(url);
-        Uri uri = ContentUris.withAppendedId(Browser.BOOKMARKS_URI, mCursor
-                .getInt(Browser.HISTORY_PROJECTION_ID_INDEX));
-        int numVisits = mCursor.getInt(Browser.HISTORY_PROJECTION_VISITS_INDEX);
-        if (0 == numVisits) {
-            mContentResolver.delete(uri, null, null);
-        } else {
-            // It is no longer a bookmark, but it is still a visited site.
-            ContentValues values = new ContentValues();
-            values.put(Browser.BookmarkColumns.BOOKMARK, 0);
-            mContentResolver.update(uri, values, null, null);
-        }
+        String title = mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX);
+        Bookmarks.removeFromBookmarks(null, mContentResolver, url, title);
         refreshList();
     }
     
@@ -253,84 +254,25 @@
      *  Refresh list to recognize a change in the database.
      */
     public void refreshList() {
-        // FIXME: consider using requery().
-        // Need to do more work to get it to function though.
-        searchInternal(mLastWhereClause, mLastSelectionArgs, mLastOrderBy);
+        mCursor.requery();
+        mCount = mCursor.getCount() + mExtraOffset;
+        notifyDataSetChanged();
     }
 
     /**
-     *  Search the database for bookmarks that match the input string.
-     *  @param like String to use to search the database.  Strings with spaces 
-     *              are treated as having multiple search terms using the
-     *              OR operator.  Search both the title and url.
-     */
-    public void search(String like) {
-        String whereClause = Browser.BookmarkColumns.BOOKMARK + " == 1";
-        String[] selectionArgs = null;
-        if (like != null) {
-            String[] likes = like.split(" ");
-            int count = 0;
-            boolean firstTerm = true;
-            StringBuilder andClause = new StringBuilder(256);
-            for (int j = 0; j < likes.length; j++) {
-                if (likes[j].length() > 0) {
-                    if (firstTerm) {
-                        firstTerm = false;
-                    } else {
-                        andClause.append(" OR ");
-                    }
-                    andClause.append(Browser.BookmarkColumns.TITLE
-                            + " LIKE ? OR " + Browser.BookmarkColumns.URL
-                            + " LIKE ? ");
-                    count += 2;
-                }
-            }
-            if (count > 0) {
-                selectionArgs = new String[count];
-                count = 0;
-                for (int j = 0; j < likes.length; j++) {
-                    if (likes[j].length() > 0) {
-                        like = "%" + likes[j] + "%";
-                        selectionArgs[count++] = like;
-                        selectionArgs[count++] = like;
-                    }
-                }
-                whereClause += " AND (" + andClause + ")";
-            }
-        }
-        searchInternal(whereClause, selectionArgs, mLastOrderBy);
-    }
-
-    /**
-     * Update the bookmark's favicon.
+     * Update the bookmark's favicon. This is a convenience method for updating
+     * a bookmark favicon for the originalUrl and url of the passed in WebView.
      * @param cr The ContentResolver to use.
-     * @param url The url of the bookmark to update.
+     * @param originalUrl The original url before any redirects.
+     * @param url The current url.
      * @param favicon The favicon bitmap to write to the db.
      */
     /* package */ static void updateBookmarkFavicon(ContentResolver cr,
-            String url, Bitmap favicon) {
-        if (url == null || favicon == null) {
+            String originalUrl, String url, Bitmap favicon) {
+        final Cursor c = queryBookmarksForUrl(cr, originalUrl, url, true);
+        if (c == null) {
             return;
         }
-        // Strip the query.
-        int query = url.indexOf('?');
-        String noQuery = url;
-        if (query != -1) {
-            noQuery = url.substring(0, query);
-        }
-        url = noQuery + '?';
-        // Use noQuery to search for the base url (i.e. if the url is
-        // http://www.yahoo.com/?rs=1, search for http://www.yahoo.com)
-        // Use url to match the base url with other queries (i.e. if the url is
-        // http://www.google.com/m, search for
-        // http://www.google.com/m?some_query)
-        final String[] selArgs = new String[] { noQuery, url };
-        final String where = "(" + Browser.BookmarkColumns.URL + " == ? OR "
-                + Browser.BookmarkColumns.URL + " GLOB ? || '*') AND "
-                + Browser.BookmarkColumns.BOOKMARK + " == 1";
-        final String[] projection = new String[] { Browser.BookmarkColumns._ID };
-        final Cursor c = cr.query(Browser.BOOKMARKS_URI, projection, where,
-                selArgs, null);
         boolean succeed = c.moveToFirst();
         ContentValues values = null;
         while (succeed) {
@@ -347,44 +289,55 @@
         c.close();
     }
 
-    /**
-     *  This sorts alphabetically, with non-capitalized titles before 
-     *  capitalized.
-     */
-    public void sortAlphabetical() {
-        searchInternal(mLastWhereClause, mLastSelectionArgs,
-                Browser.BookmarkColumns.TITLE + " COLLATE UNICODE ASC");
-    }
-
-    /**
-     *  Internal function used in search, sort, and refreshList.
-     */
-    private void searchInternal(String whereClause, String[] selectionArgs,
-            String orderBy) {
-        if (mCursor != null) {
-            mCursor.unregisterContentObserver(mChangeObserver);
-            mCursor.unregisterDataSetObserver(mDataSetObserver);
-            mBookmarksPage.stopManagingCursor(mCursor);
-            mCursor.deactivate();
+    /* package */ static Cursor queryBookmarksForUrl(ContentResolver cr,
+            String originalUrl, String url, boolean onlyBookmarks) {
+        if (cr == null || url == null) {
+            return null;
         }
 
-        mLastWhereClause = whereClause;
-        mLastSelectionArgs = selectionArgs;
-        mLastOrderBy = orderBy;
-        mCursor = mContentResolver.query(
-            Browser.BOOKMARKS_URI,
-            Browser.HISTORY_PROJECTION,
-            whereClause,
-            selectionArgs, 
-            orderBy);
-        mCursor.registerContentObserver(mChangeObserver);
-        mCursor.registerDataSetObserver(mDataSetObserver);
-        mBookmarksPage.startManagingCursor(mCursor);
+        // If originalUrl is null, just set it to url.
+        if (originalUrl == null) {
+            originalUrl = url;
+        }
 
-        mDataValid = true;
-        notifyDataSetChanged();
+        // Look for both the original url and the actual url. This takes in to
+        // account redirects.
+        String originalUrlNoQuery = removeQuery(originalUrl);
+        String urlNoQuery = removeQuery(url);
+        originalUrl = originalUrlNoQuery + '?';
+        url = urlNoQuery + '?';
 
-        mCount = mCursor.getCount() + mExtraOffset;
+        // Use NoQuery to search for the base url (i.e. if the url is
+        // http://www.yahoo.com/?rs=1, search for http://www.yahoo.com)
+        // Use url to match the base url with other queries (i.e. if the url is
+        // http://www.google.com/m, search for
+        // http://www.google.com/m?some_query)
+        final String[] selArgs = new String[] {
+            originalUrlNoQuery, urlNoQuery, originalUrl, url };
+        String where = BookmarkColumns.URL + " == ? OR "
+                + BookmarkColumns.URL + " == ? OR "
+                + BookmarkColumns.URL + " GLOB ? || '*' OR "
+                + BookmarkColumns.URL + " GLOB ? || '*'";
+        if (onlyBookmarks) {
+            where = "(" + where + ") AND " + BookmarkColumns.BOOKMARK + " == 1";
+        }
+        final String[] projection =
+                new String[] { Browser.BookmarkColumns._ID };
+        return cr.query(Browser.BOOKMARKS_URI, projection, where, selArgs,
+                null);
+    }
+
+    // Strip the query from the given url.
+    private static String removeQuery(String url) {
+        if (url == null) {
+            return null;
+        }
+        int query = url.indexOf('?');
+        String noQuery = url;
+        if (query != -1) {
+            noQuery = url.substring(0, query);
+        }
+        return noQuery;
     }
 
     /**
@@ -425,6 +378,26 @@
         return position;
     }
 
+    /* package */ void switchViewMode(BookmarkViewMode viewMode) {
+        mViewMode = viewMode;
+    }
+
+    /* package */ void populateBookmarkItem(BookmarkItem b, int position) {
+        mCursor.moveToPosition(position - mExtraOffset);
+        String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);
+        b.setUrl(url);
+        b.setName(mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX));
+        byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX);
+        Bitmap bitmap = null;
+        if (data == null) {
+            bitmap = CombinedBookmarkHistoryActivity.getIconListenerSet()
+                    .getFavicon(url);
+        } else {
+            bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
+        }
+        b.setFavicon(bitmap);
+    }
+
     /**
      * Get a View that displays the data at the specified position
      * in the list.
@@ -440,7 +413,45 @@
             throw new AssertionError(
                     "BrowserBookmarksAdapter tried to get a view out of range");
         }
-        if (position == 0 && !mCreateShortcut) {
+        if (mViewMode == BookmarkViewMode.GRID) {
+            if (convertView == null || convertView instanceof AddNewBookmark
+                    || convertView instanceof BookmarkItem) {
+                LayoutInflater factory = LayoutInflater.from(mBookmarksPage);
+                convertView
+                        = factory.inflate(R.layout.bookmark_thumbnail, null);
+            }
+            View holder = convertView.findViewById(R.id.holder);
+            ImageView thumb = (ImageView) convertView.findViewById(R.id.thumb);
+            TextView tv = (TextView) convertView.findViewById(R.id.label);
+
+            if (0 == position && mNeedsOffset) {
+                // This is to create a bookmark for the current page.
+                holder.setVisibility(View.VISIBLE);
+                tv.setText(mCurrentTitle);
+
+                if (mCurrentThumbnail != null) {
+                    thumb.setImageBitmap(mCurrentThumbnail);
+                } else {
+                    thumb.setImageResource(
+                            R.drawable.browser_thumbnail);
+                }
+                return convertView;
+            }
+            holder.setVisibility(View.GONE);
+            mCursor.moveToPosition(position - mExtraOffset);
+            tv.setText(mCursor.getString(
+                    Browser.HISTORY_PROJECTION_TITLE_INDEX));
+            Bitmap thumbnail = getBitmap(Browser.HISTORY_PROJECTION_THUMBNAIL_INDEX, position);
+            if (thumbnail == null) {
+                thumb.setImageResource(R.drawable.browser_thumbnail);
+            } else {
+                thumb.setImageBitmap(thumbnail);
+            }
+
+            return convertView;
+
+        }
+        if (position == 0 && mNeedsOffset) {
             AddNewBookmark b;
             if (convertView instanceof AddNewBookmark) {
                 b = (AddNewBookmark) convertView;
@@ -450,10 +461,20 @@
             b.setUrl(mCurrentPage);
             return b;
         }
-        if (convertView == null || convertView instanceof AddNewBookmark) {
-            convertView = new BookmarkItem(mBookmarksPage);
+        if (mMostVisited) {
+            if (convertView == null || !(convertView instanceof HistoryItem)) {
+                convertView = new HistoryItem(mBookmarksPage);
+            }
+        } else {
+            if (convertView == null || !(convertView instanceof BookmarkItem)) {
+                convertView = new BookmarkItem(mBookmarksPage);
+            }
         }
-        bind((BookmarkItem)convertView, position);
+        bind((BookmarkItem) convertView, position);
+        if (mMostVisited) {
+            ((HistoryItem) convertView).setIsBookmark(
+                    getIsBookmark(position));
+        }
         return convertView;
     }
 
@@ -475,11 +496,19 @@
      * Return the favicon for this item in the list.
      */
     public Bitmap getFavicon(int position) {
+        return getBitmap(Browser.HISTORY_PROJECTION_FAVICON_INDEX, position);
+    }
+
+    public Bitmap getTouchIcon(int position) {
+        return getBitmap(Browser.HISTORY_PROJECTION_TOUCH_ICON_INDEX, position);
+    }
+
+    private Bitmap getBitmap(int cursorIndex, int position) {
         if (position < mExtraOffset || position > mCount) {
             return null;
         }
         mCursor.moveToPosition(position - mExtraOffset);
-        byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX);
+        byte[] data = mCursor.getBlob(cursorIndex);
         if (data == null) {
             return null;
         }
@@ -487,6 +516,17 @@
     }
 
     /**
+     * Return whether or not this item represents a bookmarked site.
+     */
+    public boolean getIsBookmark(int position) {
+        if (position < mExtraOffset || position > mCount) {
+            return false;
+        }
+        mCursor.moveToPosition(position - mExtraOffset);
+        return (1 == mCursor.getInt(Browser.HISTORY_PROJECTION_BOOKMARK_INDEX));
+    }
+
+    /**
      * Private helper function to return the title or url.
      */
     private String getString(int cursorIndex, int position) {
@@ -514,7 +554,8 @@
         if (data != null) {
             b.setFavicon(BitmapFactory.decodeByteArray(data, 0, data.length));
         } else {
-            b.setFavicon(null);
+            b.setFavicon(CombinedBookmarkHistoryActivity.getIconListenerSet()
+                    .getFavicon(url));
         }
     }
 
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index dd34c14..a443090 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -20,11 +20,16 @@
 import android.app.AlertDialog;
 import android.content.DialogInterface;
 import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
 import android.graphics.RectF;
 import android.net.Uri;
 import android.os.Bundle;
@@ -36,35 +41,47 @@
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
+import android.view.ViewStub;
 import android.view.ContextMenu.ContextMenuInfo;
 import android.widget.AdapterView;
+import android.widget.GridView;
 import android.widget.ListView;
+import android.widget.Toast;
 
+/*package*/ enum BookmarkViewMode { NONE, GRID, LIST }
 /**
  *  View showing the user's bookmarks in the browser.
  */
 public class BrowserBookmarksPage extends Activity implements 
         View.OnCreateContextMenuListener {
 
+    private BookmarkViewMode        mViewMode = BookmarkViewMode.NONE;
+    private GridView                mGridPage;
+    private View                    mVerticalList;
     private BrowserBookmarksAdapter mBookmarksAdapter;
     private static final int        BOOKMARKS_SAVE = 1;
-    private boolean                 mMaxTabsOpen;
+    private boolean                 mDisableNewWindow;
     private BookmarkItem            mContextHeader;
     private AddNewBookmark          mAddHeader;
     private boolean                 mCanceled = false;
     private boolean                 mCreateShortcut;
+    private boolean                 mMostVisited;
+    private View                    mEmptyView;
     // XXX: There is no public string defining this intent so if Home changes
     // the value, we have to update this string.
     private static final String     INSTALL_SHORTCUT =
             "com.android.launcher.action.INSTALL_SHORTCUT";
     
     private final static String LOGTAG = "browser";
-
+    private final static String PREF_BOOKMARK_VIEW_MODE = "pref_bookmark_view_mode";
+    private final static String PREF_MOST_VISITED_VIEW_MODE = "pref_most_visited_view_mode";
 
     @Override
     public boolean onContextItemSelected(MenuItem item) {
@@ -91,23 +108,58 @@
             editBookmark(i.position);
             break;
         case R.id.shortcut_context_menu_id:
-            final Intent send = createShortcutIntent(getUrl(i.position),
-                    getBookmarkTitle(i.position), getFavicon(i.position));
+            final Intent send = createShortcutIntent(i.position);
             send.setAction(INSTALL_SHORTCUT);
             sendBroadcast(send);
             break;
         case R.id.delete_context_menu_id:
-            displayRemoveBookmarkDialog(i.position);
+            if (mMostVisited) {
+                Browser.deleteFromHistory(getContentResolver(),
+                        getUrl(i.position));
+                refreshList();
+            } else {
+                displayRemoveBookmarkDialog(i.position);
+            }
             break;
         case R.id.new_window_context_menu_id:
             openInNewWindow(i.position);
             break;
-        case R.id.send_context_menu_id:
-            Browser.sendString(BrowserBookmarksPage.this, getUrl(i.position));
+        case R.id.share_link_context_menu_id:
+            Browser.sendString(BrowserBookmarksPage.this, getUrl(i.position),
+                    getText(R.string.choosertitle_sharevia).toString());
             break;
         case R.id.copy_url_context_menu_id:
             copy(getUrl(i.position));
-            
+            break;
+        case R.id.homepage_context_menu_id:
+            BrowserSettings.getInstance().setHomePage(this,
+                    getUrl(i.position));
+            Toast.makeText(this, R.string.homepage_set,
+                    Toast.LENGTH_LONG).show();
+            break;
+        // Only for the Most visited page
+        case R.id.save_to_bookmarks_menu_id:
+            boolean isBookmark;
+            String name;
+            String url;
+            if (mViewMode == BookmarkViewMode.GRID) {
+                isBookmark = mBookmarksAdapter.getIsBookmark(i.position);
+                name = mBookmarksAdapter.getTitle(i.position);
+                url = mBookmarksAdapter.getUrl(i.position);
+            } else {
+                HistoryItem historyItem = ((HistoryItem) i.targetView);
+                isBookmark = historyItem.isBookmark();
+                name = historyItem.getName();
+                url = historyItem.getUrl();
+            }
+            // If the site is bookmarked, the item becomes remove from
+            // bookmarks.
+            if (isBookmark) {
+                Bookmarks.removeFromBookmarks(this, getContentResolver(), url, name);
+            } else {
+                Browser.saveBookmark(this, name, url);
+            }
+            break;
         default:
             return super.onContextItemSelected(item);
         }
@@ -121,9 +173,13 @@
                     (AdapterView.AdapterContextMenuInfo) menuInfo;
 
             MenuInflater inflater = getMenuInflater();
-            inflater.inflate(R.menu.bookmarkscontext, menu);
+            if (mMostVisited) {
+                inflater.inflate(R.menu.historycontext, menu);
+            } else {
+                inflater.inflate(R.menu.bookmarkscontext, menu);
+            }
 
-            if (0 == i.position) {
+            if (0 == i.position && !mMostVisited) {
                 menu.setGroupVisible(R.id.CONTEXT_MENU, false);
                 if (mAddHeader == null) {
                     mAddHeader = new AddNewBookmark(BrowserBookmarksPage.this);
@@ -131,25 +187,40 @@
                     ((ViewGroup) mAddHeader.getParent()).
                             removeView(mAddHeader);
                 }
-                ((AddNewBookmark) i.targetView).copyTo(mAddHeader);
+                mAddHeader.setUrl(getIntent().getStringExtra("url"));
                 menu.setHeaderView(mAddHeader);
                 return;
             }
-            menu.setGroupVisible(R.id.ADD_MENU, false);
-            BookmarkItem b = (BookmarkItem) i.targetView;
+            if (mMostVisited) {
+                if ((mViewMode == BookmarkViewMode.LIST
+                        && ((HistoryItem) i.targetView).isBookmark())
+                        || mBookmarksAdapter.getIsBookmark(i.position)) {
+                    MenuItem item = menu.findItem(
+                            R.id.save_to_bookmarks_menu_id);
+                    item.setTitle(R.string.remove_from_bookmarks);
+                }
+            } else {
+                // The historycontext menu has no ADD_MENU group.
+                menu.setGroupVisible(R.id.ADD_MENU, false);
+            }
+            if (mDisableNewWindow) {
+                menu.findItem(R.id.new_window_context_menu_id).setVisible(
+                        false);
+            }
             if (mContextHeader == null) {
                 mContextHeader = new BookmarkItem(BrowserBookmarksPage.this);
             } else if (mContextHeader.getParent() != null) {
                 ((ViewGroup) mContextHeader.getParent()).
                         removeView(mContextHeader);
             }
-            b.copyTo(mContextHeader);
-            menu.setHeaderView(mContextHeader);
-
-            if (mMaxTabsOpen) {
-                menu.findItem(R.id.new_window_context_menu_id).setVisible(
-                        false);
+            if (mViewMode == BookmarkViewMode.GRID) {
+                mBookmarksAdapter.populateBookmarkItem(mContextHeader,
+                        i.position);
+            } else {
+                BookmarkItem b = (BookmarkItem) i.targetView;
+                b.copyTo(mContextHeader);
             }
+            menu.setHeaderView(mContextHeader);
         }
 
     /**
@@ -159,28 +230,125 @@
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
-        setContentView(R.layout.browser_bookmarks_page);
-        setTitle(R.string.browser_bookmarks_page_bookmarks_text);
-
         if (Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())) {
             mCreateShortcut = true;
         }
+        mDisableNewWindow = getIntent().getBooleanExtra("disable_new_window",
+                false);
+        mMostVisited = getIntent().getBooleanExtra("mostVisited", false);
 
-        mBookmarksAdapter = new BrowserBookmarksAdapter(this, 
-                getIntent().getStringExtra("url"), mCreateShortcut);
-        mMaxTabsOpen = getIntent().getBooleanExtra("maxTabsOpen", false);
+        if (mCreateShortcut) {
+            setTitle(R.string.browser_bookmarks_page_bookmarks_text);
+        }
+        mBookmarksAdapter = new BrowserBookmarksAdapter(this,
+                        getIntent().getStringExtra("url"),
+                        getIntent().getStringExtra("title"),
+                        (Bitmap) getIntent().getParcelableExtra("thumbnail"),
+                        mCreateShortcut,
+                        mMostVisited);
 
-        ListView listView = (ListView) findViewById(R.id.list);
-        listView.setAdapter(mBookmarksAdapter);
-        listView.setDrawSelectorOnTop(false);
-        listView.setVerticalScrollBarEnabled(true);
-        listView.setOnItemClickListener(mListener);
+        setContentView(R.layout.empty_history);
+        mEmptyView = findViewById(R.id.empty_view);
+        mEmptyView.setVisibility(View.GONE);
 
-        if (!mCreateShortcut) {
-            listView.setOnCreateContextMenuListener(this);
+        SharedPreferences p = getPreferences(MODE_PRIVATE);
+
+        // See if the user has set a preference for the view mode of their
+        // bookmarks. Otherwise default to grid mode.
+        BookmarkViewMode preference = BookmarkViewMode.NONE;
+        if (mMostVisited) {
+            preference = BookmarkViewMode.values()[p.getInt(
+                    PREF_MOST_VISITED_VIEW_MODE,
+                    BookmarkViewMode.GRID.ordinal())];
+        } else {
+            preference = BookmarkViewMode.values()[p.getInt(
+                    PREF_BOOKMARK_VIEW_MODE, BookmarkViewMode.GRID.ordinal())];
+        }
+        switchViewMode(preference);
+    }
+
+    /**
+     *  Set the ContentView to be either the grid of thumbnails or the vertical
+     *  list.
+     */
+    private void switchViewMode(BookmarkViewMode gridMode) {
+        if (mViewMode == gridMode) {
+            return;
+        }
+
+        mViewMode = gridMode;
+
+        // Update the preferences to make the new view mode sticky.
+        Editor ed = getPreferences(MODE_PRIVATE).edit();
+        if (mMostVisited) {
+            ed.putInt(PREF_MOST_VISITED_VIEW_MODE, mViewMode.ordinal());
+        } else {
+            ed.putInt(PREF_BOOKMARK_VIEW_MODE, mViewMode.ordinal());
+        }
+        ed.commit();
+
+        mBookmarksAdapter.switchViewMode(gridMode);
+        if (mViewMode == BookmarkViewMode.GRID) {
+            if (mGridPage == null) {
+                mGridPage = new GridView(this);
+                mGridPage.setAdapter(mBookmarksAdapter);
+                mGridPage.setOnItemClickListener(mListener);
+                mGridPage.setNumColumns(GridView.AUTO_FIT);
+                mGridPage.setColumnWidth(
+                        BrowserActivity.getDesiredThumbnailWidth(this));
+                mGridPage.setFocusable(true);
+                mGridPage.setFocusableInTouchMode(true);
+                mGridPage.setSelector(android.R.drawable.gallery_thumb);
+                float density = getResources().getDisplayMetrics().density;
+                mGridPage.setVerticalSpacing((int) (14 * density));
+                mGridPage.setHorizontalSpacing((int) (8 * density));
+                mGridPage.setStretchMode(GridView.STRETCH_SPACING);
+                mGridPage.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
+                mGridPage.setDrawSelectorOnTop(true);
+                if (mMostVisited) {
+                    mGridPage.setEmptyView(mEmptyView);
+                }
+                if (!mCreateShortcut) {
+                    mGridPage.setOnCreateContextMenuListener(this);
+                }
+            }
+            addContentView(mGridPage, FULL_SCREEN_PARAMS);
+            if (mVerticalList != null) {
+                ViewGroup parent = (ViewGroup) mVerticalList.getParent();
+                if (parent != null) {
+                    parent.removeView(mVerticalList);
+                }
+            }
+        } else {
+            if (null == mVerticalList) {
+                ListView listView = new ListView(this);
+                listView.setAdapter(mBookmarksAdapter);
+                listView.setDrawSelectorOnTop(false);
+                listView.setVerticalScrollBarEnabled(true);
+                listView.setOnItemClickListener(mListener);
+                if (mMostVisited) {
+                    listView.setEmptyView(mEmptyView);
+                }
+                if (!mCreateShortcut) {
+                    listView.setOnCreateContextMenuListener(this);
+                }
+                mVerticalList = listView;
+            }
+            addContentView(mVerticalList, FULL_SCREEN_PARAMS);
+            if (mGridPage != null) {
+                ViewGroup parent = (ViewGroup) mGridPage.getParent();
+                if (parent != null) {
+                    parent.removeView(mGridPage);
+                }
+            }
         }
     }
 
+    private static final ViewGroup.LayoutParams FULL_SCREEN_PARAMS
+            = new ViewGroup.LayoutParams(
+            ViewGroup.LayoutParams.FILL_PARENT,
+            ViewGroup.LayoutParams.FILL_PARENT);
+
     private static final int SAVE_CURRENT_PAGE = 1000;
     private final Handler mHandler = new Handler() {
         @Override
@@ -196,27 +364,29 @@
             // It is possible that the view has been canceled when we get to
             // this point as back has a higher priority 
             if (mCanceled) {
-                android.util.Log.e("browser", "item clicked when dismising");
+                android.util.Log.e(LOGTAG, "item clicked when dismissing");
                 return;
             }
             if (!mCreateShortcut) {
-                if (0 == position) {
+                if (0 == position && !mMostVisited) {
                     // XXX: Work-around for a framework issue.
                     mHandler.sendEmptyMessage(SAVE_CURRENT_PAGE);
                 } else {
                     loadUrl(position);
                 }
             } else {
-                final Intent intent = createShortcutIntent(getUrl(position),
-                        getBookmarkTitle(position), getFavicon(position));
+                final Intent intent = createShortcutIntent(position);
                 setResultToParent(RESULT_OK, intent);
                 finish();
             }
         }
     };
 
-    private Intent createShortcutIntent(String url, String title,
-            Bitmap favicon) {
+    private Intent createShortcutIntent(int position) {
+        String url = getUrl(position);
+        String title = getBookmarkTitle(position);
+        Bitmap touchIcon = getTouchIcon(position);
+
         final Intent i = new Intent();
         final Intent shortcutIntent = new Intent(Intent.ACTION_VIEW,
                 Uri.parse(url));
@@ -226,41 +396,67 @@
                 Long.toString(uniqueId));
         i.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
         i.putExtra(Intent.EXTRA_SHORTCUT_NAME, title);
-        if (favicon == null) {
-            i.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
-                    Intent.ShortcutIconResource.fromContext(
-                            BrowserBookmarksPage.this,
-                            R.drawable.ic_launcher_shortcut_browser_bookmark));
-        } else {
-            Bitmap icon = BitmapFactory.decodeResource(getResources(),
-                    R.drawable.ic_launcher_shortcut_browser_bookmark);
-
-            // Make a copy of the regular icon so we can modify the pixels.
-            Bitmap copy = icon.copy(Bitmap.Config.ARGB_8888, true);
+        // Use the apple-touch-icon if available
+        if (touchIcon != null) {
+            // Make a copy so we can modify the pixels.
+            Bitmap copy = touchIcon.copy(Bitmap.Config.ARGB_8888, true);
             Canvas canvas = new Canvas(copy);
 
-            // Make a Paint for the white background rectangle and for
-            // filtering the favicon.
-            Paint p = new Paint(Paint.ANTI_ALIAS_FLAG
-                    | Paint.FILTER_BITMAP_FLAG);
-            p.setStyle(Paint.Style.FILL_AND_STROKE);
-            p.setColor(Color.WHITE);
+            // Construct a path from a round rect. This will allow drawing with
+            // an inverse fill so we can punch a hole using the round rect.
+            Path path = new Path();
+            path.setFillType(Path.FillType.INVERSE_WINDING);
+            RectF rect = new RectF(0, 0, touchIcon.getWidth(),
+                    touchIcon.getHeight());
+            rect.inset(1, 1);
+            path.addRoundRect(rect, 8f, 8f, Path.Direction.CW);
 
-            // Create a rectangle that is slightly wider than the favicon
-            final float iconSize = 16; // 16x16 favicon
-            final float padding = 2;   // white padding around icon
-            final float rectSize = iconSize + 2 * padding;
-            final float y = icon.getHeight() - rectSize;
-            RectF r = new RectF(0, y, rectSize, y + rectSize);
+            // Construct a paint that clears the outside of the rectangle and
+            // draw.
+            Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
+            paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
+            canvas.drawPath(path, paint);
 
-            // Draw a white rounded rectangle behind the favicon
-            canvas.drawRoundRect(r, 2, 2, p);
-
-            // Draw the favicon in the same rectangle as the rounded rectangle
-            // but inset by the padding (results in a 16x16 favicon).
-            r.inset(padding, padding);
-            canvas.drawBitmap(favicon, null, r, p);
             i.putExtra(Intent.EXTRA_SHORTCUT_ICON, copy);
+        } else {
+            Bitmap favicon = getFavicon(position);
+            if (favicon == null) {
+                i.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
+                        Intent.ShortcutIconResource.fromContext(
+                                BrowserBookmarksPage.this,
+                                R.drawable.ic_launcher_shortcut_browser_bookmark));
+            } else {
+                Bitmap icon = BitmapFactory.decodeResource(getResources(),
+                        R.drawable.ic_launcher_shortcut_browser_bookmark);
+
+                // Make a copy of the regular icon so we can modify the pixels.
+                Bitmap copy = icon.copy(Bitmap.Config.ARGB_8888, true);
+                Canvas canvas = new Canvas(copy);
+
+                // Make a Paint for the white background rectangle and for
+                // filtering the favicon.
+                Paint p = new Paint(Paint.ANTI_ALIAS_FLAG
+                        | Paint.FILTER_BITMAP_FLAG);
+                p.setStyle(Paint.Style.FILL_AND_STROKE);
+                p.setColor(Color.WHITE);
+
+                // Create a rectangle that is slightly wider than the favicon
+                final float iconSize = 16; // 16x16 favicon
+                final float padding = 2;   // white padding around icon
+                final float rectSize = iconSize + 2 * padding;
+                final float y = icon.getHeight() - rectSize;
+                RectF r = new RectF(0, y, rectSize, y + rectSize);
+
+                // Draw a white rounded rectangle behind the favicon
+                canvas.drawRoundRect(r, 2, 2, p);
+
+                // Draw the favicon in the same rectangle as the rounded
+                // rectangle but inset by the padding
+                // (results in a 16x16 favicon).
+                r.inset(padding, padding);
+                canvas.drawBitmap(favicon, null, r, p);
+                i.putExtra(Intent.EXTRA_SHORTCUT_ICON, copy);
+            }
         }
         // Do not allow duplicate items
         i.putExtra("duplicate", false);
@@ -286,20 +482,53 @@
         if (!mCreateShortcut) {
             MenuInflater inflater = getMenuInflater();
             inflater.inflate(R.menu.bookmarks, menu);
+            // Most visited page does not have an option to bookmark the last
+            // viewed page.
+            menu.findItem(R.id.new_context_menu_id).setVisible(!mMostVisited);
             return true;
         }
         return result;
     }
 
     @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        boolean result = super.onPrepareOptionsMenu(menu);
+        if (mCreateShortcut || mBookmarksAdapter.getCount() == 0) {
+            // No need to show the menu if there are no items.
+            return result;
+        }
+        MenuItem switchItem = menu.findItem(R.id.switch_mode_menu_id);
+        int titleResId;
+        int iconResId;
+        if (mViewMode == BookmarkViewMode.GRID) {
+            titleResId = R.string.switch_to_list;
+            iconResId = R.drawable.ic_menu_list;
+        } else {
+            titleResId = R.string.switch_to_thumbnails;
+            iconResId = R.drawable.ic_menu_thumbnail;
+        }
+        switchItem.setTitle(titleResId);
+        switchItem.setIcon(iconResId);
+        return true;
+    }
+
+    @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
-            case R.id.new_context_menu_id:
-                saveCurrentPage();
-                break;
-                
-            default:
-                return super.onOptionsItemSelected(item);
+        case R.id.new_context_menu_id:
+            saveCurrentPage();
+            break;
+
+        case R.id.switch_mode_menu_id:
+            if (mViewMode == BookmarkViewMode.GRID) {
+                switchViewMode(BookmarkViewMode.LIST);
+            } else {
+                switchViewMode(BookmarkViewMode.GRID);
+            }
+            break;
+
+        default:
+            return super.onOptionsItemSelected(item);
         }
         return true;
     }
@@ -370,7 +599,7 @@
     /**
      *  Refresh the shown list after the database has changed.
      */
-    public void refreshList() {
+    private void refreshList() {
         mBookmarksAdapter.refreshList();
     }
     
@@ -395,6 +624,10 @@
         return mBookmarksAdapter.getFavicon(position);
     }
 
+    private Bitmap getTouchIcon(int position) {
+        return mBookmarksAdapter.getTouchIcon(position);
+    }
+
     private void copy(CharSequence text) {
         try {
             IClipboard clip = IClipboard.Stub.asInterface(ServiceManager.getService("clipboard"));
@@ -416,13 +649,12 @@
     public void deleteBookmark(int position) {
         mBookmarksAdapter.deleteRow(position);
     }
-    
-    public boolean dispatchKeyEvent(KeyEvent event) {    
-        if (event.getKeyCode() ==  KeyEvent.KEYCODE_BACK && event.isDown()) {
-            setResultToParent(RESULT_CANCELED, null);
-            mCanceled = true;
-        }
-        return super.dispatchKeyEvent(event);
+
+    @Override
+    public void onBackPressed() {
+        setResultToParent(RESULT_CANCELED, null);
+        mCanceled = true;
+        super.onBackPressed();
     }
 
     // This Activity is generally a sub-Activity of CombinedHistoryActivity. In
diff --git a/src/com/android/browser/BrowserDownloadAdapter.java b/src/com/android/browser/BrowserDownloadAdapter.java
index 38b83fe..16cb982 100644
--- a/src/com/android/browser/BrowserDownloadAdapter.java
+++ b/src/com/android/browser/BrowserDownloadAdapter.java
@@ -60,14 +60,14 @@
     public BrowserDownloadAdapter(Context context, int layout, Cursor c) {
         super(context, layout, c);
         mFilenameColumnId = c.getColumnIndexOrThrow(Downloads._DATA);
-        mTitleColumnId = c.getColumnIndexOrThrow(Downloads.TITLE);
-        mDescColumnId = c.getColumnIndexOrThrow(Downloads.DESCRIPTION);
-        mStatusColumnId = c.getColumnIndexOrThrow(Downloads.STATUS);
-        mTotalBytesColumnId = c.getColumnIndexOrThrow(Downloads.TOTAL_BYTES);
+        mTitleColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_TITLE);
+        mDescColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_DESCRIPTION);
+        mStatusColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_STATUS);
+        mTotalBytesColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_TOTAL_BYTES);
         mCurrentBytesColumnId = 
-            c.getColumnIndexOrThrow(Downloads.CURRENT_BYTES);
-        mMimetypeColumnId = c.getColumnIndexOrThrow(Downloads.MIMETYPE);
-        mDateColumnId = c.getColumnIndexOrThrow(Downloads.LAST_MODIFICATION);
+            c.getColumnIndexOrThrow(Downloads.COLUMN_CURRENT_BYTES);
+        mMimetypeColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_MIME_TYPE);
+        mDateColumnId = c.getColumnIndexOrThrow(Downloads.COLUMN_LAST_MODIFICATION);
     }
 
     @Override
@@ -106,7 +106,7 @@
                 // We have a filename, so we can build a title from that
                 title = new File(fullFilename).getName();
                 ContentValues values = new ContentValues();
-                values.put(Downloads.TITLE, title);
+                values.put(Downloads.COLUMN_TITLE, title);
                 // assume "_id" is the first column for the cursor 
                 context.getContentResolver().update(
                         ContentUris.withAppendedId(Downloads.CONTENT_URI,
diff --git a/src/com/android/browser/BrowserDownloadPage.java b/src/com/android/browser/BrowserDownloadPage.java
index 4397337..22e0e65 100644
--- a/src/com/android/browser/BrowserDownloadPage.java
+++ b/src/com/android/browser/BrowserDownloadPage.java
@@ -66,34 +66,30 @@
         setTitle(getText(R.string.download_title));
 
         mListView = (ListView) findViewById(R.id.list);
-        LayoutInflater factory = LayoutInflater.from(this);
-        View v = factory.inflate(R.layout.no_downloads, null);
-        addContentView(v, new LayoutParams(LayoutParams.FILL_PARENT,
-                LayoutParams.FILL_PARENT));
-        mListView.setEmptyView(v);
+        mListView.setEmptyView(findViewById(R.id.empty));
         
         mDownloadCursor = managedQuery(Downloads.CONTENT_URI, 
-                new String [] {"_id", Downloads.TITLE, Downloads.STATUS,
-                Downloads.TOTAL_BYTES, Downloads.CURRENT_BYTES, 
-                Downloads._DATA, Downloads.DESCRIPTION, 
-                Downloads.MIMETYPE, Downloads.LAST_MODIFICATION,
-                Downloads.VISIBILITY}, 
+                new String [] {"_id", Downloads.COLUMN_TITLE, Downloads.COLUMN_STATUS,
+                Downloads.COLUMN_TOTAL_BYTES, Downloads.COLUMN_CURRENT_BYTES, 
+                Downloads._DATA, Downloads.COLUMN_DESCRIPTION, 
+                Downloads.COLUMN_MIME_TYPE, Downloads.COLUMN_LAST_MODIFICATION,
+                Downloads.COLUMN_VISIBILITY}, 
                 null, null);
         
         // only attach everything to the listbox if we can access
         // the download database. Otherwise, just show it empty
         if (mDownloadCursor != null) {
             mStatusColumnId = 
-                    mDownloadCursor.getColumnIndexOrThrow(Downloads.STATUS);
+                    mDownloadCursor.getColumnIndexOrThrow(Downloads.COLUMN_STATUS);
             mIdColumnId =
                     mDownloadCursor.getColumnIndexOrThrow(Downloads._ID);
             mTitleColumnId = 
-                    mDownloadCursor.getColumnIndexOrThrow(Downloads.TITLE);
+                    mDownloadCursor.getColumnIndexOrThrow(Downloads.COLUMN_TITLE);
             
             // Create a list "controller" for the data
             mDownloadAdapter = new BrowserDownloadAdapter(this, 
                     R.layout.browser_download_item, mDownloadCursor);
-            
+
             mListView.setAdapter(mDownloadAdapter);
             mListView.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
             mListView.setOnCreateContextMenuListener(this);
@@ -403,7 +399,7 @@
                 mDownloadCursor.getColumnIndexOrThrow(Downloads._DATA);
         String filename = mDownloadCursor.getString(filenameColumnId);
         int mimetypeColumnId =
-                mDownloadCursor.getColumnIndexOrThrow(Downloads.MIMETYPE);
+                mDownloadCursor.getColumnIndexOrThrow(Downloads.COLUMN_MIME_TYPE);
         String mimetype = mDownloadCursor.getString(mimetypeColumnId);
         Uri path = Uri.parse(filename);
         // If there is no scheme, then it must be a file
@@ -453,13 +449,13 @@
     private void hideCompletedDownload() {
         int status = mDownloadCursor.getInt(mStatusColumnId);
 
-        int visibilityColumn = mDownloadCursor.getColumnIndexOrThrow(Downloads.VISIBILITY);
+        int visibilityColumn = mDownloadCursor.getColumnIndexOrThrow(Downloads.COLUMN_VISIBILITY);
         int visibility = mDownloadCursor.getInt(visibilityColumn);
 
         if (Downloads.isStatusCompleted(status) &&
                 visibility == Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
             ContentValues values = new ContentValues();
-            values.put(Downloads.VISIBILITY, Downloads.VISIBILITY_VISIBLE);
+            values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE);
             getContentResolver().update(
                     ContentUris.withAppendedId(Downloads.CONTENT_URI,
                     mDownloadCursor.getLong(mIdColumnId)), values, null, null);
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 4a0f8c5..bdd109b 100644
--- a/src/com/android/browser/BrowserHistoryPage.java
+++ b/src/com/android/browser/BrowserHistoryPage.java
@@ -25,6 +25,7 @@
 import android.database.Cursor;
 import android.database.DataSetObserver;
 import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.ServiceManager;
@@ -41,6 +42,7 @@
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
 import android.view.ContextMenu.ContextMenuInfo;
+import android.view.ViewStub;
 import android.webkit.DateSorter;
 import android.webkit.WebIconDatabase.IconListener;
 import android.widget.AdapterView;
@@ -48,6 +50,7 @@
 import android.widget.ExpandableListView;
 import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import java.util.List;
 import java.util.Vector;
@@ -59,7 +62,8 @@
 public class BrowserHistoryPage extends ExpandableListActivity {
     private HistoryAdapter          mAdapter;
     private DateSorter              mDateSorter;
-    private boolean                 mMaxTabsOpen;
+    private boolean                 mDisableNewWindow;
+    private HistoryItem             mContextHeader;
 
     private final static String LOGTAG = "browser";
 
@@ -110,8 +114,7 @@
         setListAdapter(mAdapter);
         final ExpandableListView list = getExpandableListView();
         list.setOnCreateContextMenuListener(this);
-        LayoutInflater factory = LayoutInflater.from(this);
-        View v = factory.inflate(R.layout.empty_history, null);
+        View v = new ViewStub(this, R.layout.empty_history);
         addContentView(v, new LayoutParams(LayoutParams.FILL_PARENT,
                 LayoutParams.FILL_PARENT));
         list.setEmptyView(v);
@@ -127,8 +130,9 @@
                 }
             });
         }
-        mMaxTabsOpen = getIntent().getBooleanExtra("maxTabsOpen", false);
-        CombinedBookmarkHistoryActivity.getIconListenerSet(getContentResolver())
+        mDisableNewWindow = getIntent().getBooleanExtra("disable_new_window",
+                false);
+        CombinedBookmarkHistoryActivity.getIconListenerSet()
                 .addListener(mIconReceiver);
         
         // initialize the result to canceled, so that if the user just presses
@@ -139,7 +143,7 @@
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        CombinedBookmarkHistoryActivity.getIconListenerSet(getContentResolver())
+        CombinedBookmarkHistoryActivity.getIconListenerSet()
                 .removeListener(mIconReceiver);
     }
 
@@ -172,7 +176,7 @@
         }  
         return super.onOptionsItemSelected(item);
     }
-    
+
     @Override
     public void onCreateContextMenu(ContextMenu menu, View v,
             ContextMenuInfo menuInfo) {
@@ -187,12 +191,26 @@
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.historycontext, menu);
 
-        // Setup the header
-        menu.setHeaderTitle(((HistoryItem)i.targetView).getUrl());
+        HistoryItem historyItem = (HistoryItem) i.targetView;
 
-        // Only show open in new tab if we have not maxed out available tabs
-        menu.findItem(R.id.new_window_context_menu_id).setVisible(!mMaxTabsOpen);
-        
+        // Setup the header
+        if (mContextHeader == null) {
+            mContextHeader = new HistoryItem(this);
+        } else if (mContextHeader.getParent() != null) {
+            ((ViewGroup) mContextHeader.getParent()).removeView(mContextHeader);
+        }
+        historyItem.copyTo(mContextHeader);
+        menu.setHeaderView(mContextHeader);
+
+        // Only show open in new tab if it was not explicitly disabled
+        if (mDisableNewWindow) {
+            menu.findItem(R.id.new_window_context_menu_id).setVisible(false);
+        }
+        // For a bookmark, provide the option to remove it from bookmarks
+        if (historyItem.isBookmark()) {
+            MenuItem item = menu.findItem(R.id.save_to_bookmarks_menu_id);
+            item.setTitle(R.string.remove_from_bookmarks);
+        }
         // decide whether to show the share link option
         PackageManager pm = getPackageManager();
         Intent send = new Intent(Intent.ACTION_SEND);
@@ -207,8 +225,9 @@
     public boolean onContextItemSelected(MenuItem item) {
         ExpandableListContextMenuInfo i = 
             (ExpandableListContextMenuInfo) item.getMenuInfo();
-        String url = ((HistoryItem)i.targetView).getUrl();
-        String title = ((HistoryItem)i.targetView).getName();
+        HistoryItem historyItem = (HistoryItem) i.targetView;
+        String url = historyItem.getUrl();
+        String title = historyItem.getName();
         switch (item.getItemId()) {
             case R.id.open_context_menu_id:
                 loadUrl(url, false);
@@ -217,18 +236,29 @@
                 loadUrl(url, true);
                 return true;
             case R.id.save_to_bookmarks_menu_id:
-                Browser.saveBookmark(this, title, url);
+                if (historyItem.isBookmark()) {
+                    Bookmarks.removeFromBookmarks(this, getContentResolver(),
+                            url, title);
+                } else {
+                    Browser.saveBookmark(this, title, url);
+                }
                 return true;
             case R.id.share_link_context_menu_id:
-                Browser.sendString(this, url);
+                Browser.sendString(this, url,
+                        getText(R.string.choosertitle_sharevia).toString());
                 return true;
-            case R.id.copy_context_menu_id:
+            case R.id.copy_url_context_menu_id:
                 copy(url);
                 return true;
             case R.id.delete_context_menu_id:
                 Browser.deleteFromHistory(getContentResolver(), url);
                 mAdapter.refreshData();
                 return true;
+            case R.id.homepage_context_menu_id:
+                BrowserSettings.getInstance().setHomePage(this, url);
+                Toast.makeText(this, R.string.homepage_set,
+                    Toast.LENGTH_LONG).show();
+                return true;
             default:
                 break;
         }
@@ -274,18 +304,25 @@
         
         // Array for each of our bins.  Each entry represents how many items are
         // in that bin.
-        int mItemMap[];
+        private int mItemMap[];
         // This is our GroupCount.  We will have at most DateSorter.DAY_COUNT
         // bins, less if the user has no items in one or more bins.
-        int mNumberOfBins;
-        Vector<DataSetObserver> mObservers;
-        Cursor mCursor;
+        private int mNumberOfBins;
+        private Vector<DataSetObserver> mObservers;
+        private Cursor mCursor;
         
         HistoryAdapter() {
             mObservers = new Vector<DataSetObserver>();
             
-            String whereClause = Browser.BookmarkColumns.VISITS + " > 0 ";
-            String orderBy = Browser.BookmarkColumns.DATE + " DESC";
+            final String whereClause = Browser.BookmarkColumns.VISITS + " > 0"
+                    // In AddBookmarkPage, where we save new bookmarks, we add
+                    // three visits to newly created bookmarks, so that
+                    // bookmarks that have not been visited will show up in the
+                    // most visited, and higher in the goto search box.
+                    // However, this puts the site in the history, unless we
+                    // ignore sites with a DATE of 0, which the next line does.
+                    + " AND " + Browser.BookmarkColumns.DATE + " > 0";
+            final String orderBy = Browser.BookmarkColumns.DATE + " DESC";
            
             mCursor = managedQuery(
                     Browser.BOOKMARKS_URI,
@@ -297,6 +334,9 @@
         }
         
         void refreshData() {
+            if (mCursor.isClosed()) {
+                return;
+            }
             mCursor.requery();
             buildMap();
             for (DataSetObserver o : mObservers) {
@@ -386,8 +426,14 @@
             item.setName(mCursor.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX));
             String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);
             item.setUrl(url);
-            item.setFavicon(CombinedBookmarkHistoryActivity.getIconListenerSet(
-                    getContentResolver()).getFavicon(url));
+            byte[] data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX);
+            if (data != null) {
+                item.setFavicon(BitmapFactory.decodeByteArray(data, 0,
+                        data.length));
+            } else {
+                item.setFavicon(CombinedBookmarkHistoryActivity
+                        .getIconListenerSet().getFavicon(url));
+            }
             item.setIsBookmark(1 ==
                     mCursor.getInt(Browser.HISTORY_PROJECTION_BOOKMARK_INDEX));
             return item;
diff --git a/src/com/android/browser/BrowserHomepagePreference.java b/src/com/android/browser/BrowserHomepagePreference.java
index d4708c3..be96db3 100644
--- a/src/com/android/browser/BrowserHomepagePreference.java
+++ b/src/com/android/browser/BrowserHomepagePreference.java
@@ -18,47 +18,46 @@
 
 import android.app.AlertDialog;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.preference.EditTextPreference;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.text.util.Regex;
 import android.util.AttributeSet;
 
-public class BrowserHomepagePreference extends EditTextPreference implements
-        TextWatcher {
+public class BrowserHomepagePreference extends EditTextPreference {
 
     public BrowserHomepagePreference(Context context, AttributeSet attrs,
             int defStyle) {
         super(context, attrs, defStyle);
-        getEditText().addTextChangedListener(this);
     }
 
     public BrowserHomepagePreference(Context context, AttributeSet attrs) {
         super(context, attrs);
-        getEditText().addTextChangedListener(this);
     }
 
     public BrowserHomepagePreference(Context context) {
         super(context);
-        getEditText().addTextChangedListener(this);
     }
 
-    public void afterTextChanged(Editable s) {
-        AlertDialog dialog = (AlertDialog) getDialog();
-        // This callback is called before the dialog has been fully constructed
-        if (dialog != null) {
-            String url = s.toString();
-            dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(
-                    url.length() == 0 || url.equals("about:blank") ||
-                    Regex.WEB_URL_PATTERN.matcher(url).matches());
+    @Override
+    protected void onDialogClosed(boolean positiveResult) {
+        if (positiveResult) {
+            String url = getEditText().getText().toString();
+            if (url.length() > 0
+                    && !BrowserActivity.ACCEPTED_URI_SCHEMA.matcher(url)
+                            .matches()) {
+                int colon = url.indexOf(':');
+                int space = url.indexOf(' ');
+                if (colon == -1 && space == -1) {
+                    // if no colon, no space, add "http://" to make it a url
+                    getEditText().setText("http://" + url);
+                } else {
+                    // show an error dialog and change the positiveResult to
+                    // false so that the bad url will not override the old url
+                    new AlertDialog.Builder(this.getContext()).setMessage(
+                            R.string.bookmark_url_not_valid).setPositiveButton(
+                            R.string.ok, null).show();
+                    positiveResult = false;
+                }
+            }
         }
-    }
-
-    public void beforeTextChanged(CharSequence s, int start, int count,
-            int after) {
-    }
-
-    public void onTextChanged(CharSequence s, int start, int before, int count) {
+        super.onDialogClosed(positiveResult);
     }
 }
diff --git a/src/com/android/browser/BrowserPluginList.java b/src/com/android/browser/BrowserPluginList.java
deleted file mode 100644
index 6689b0e..0000000
--- a/src/com/android/browser/BrowserPluginList.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.ListActivity;
-import android.os.Bundle;
-import android.view.View;
-import android.view.ViewGroup;
-import android.webkit.Plugin;
-import android.webkit.PluginList;
-import android.webkit.WebView;
-import android.widget.ArrayAdapter;
-import android.widget.LinearLayout;
-import android.widget.LinearLayout.LayoutParams;
-import android.widget.ListView;
-import android.widget.TextView;
-import java.util.ArrayList;
-import java.util.List;
-
-// Manages the list of installed (and loaded) plugins.
-public class BrowserPluginList extends ListActivity {
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        // The list of plugins can change under us, as the plugins are
-        // loaded and unloaded in a different thread. We make a copy
-        // of the list here.
-        List loadedPlugins = WebView.getPluginList().getList();
-        ArrayList localLoadedPluginList = new ArrayList();
-        synchronized (loadedPlugins) {
-            localLoadedPluginList.addAll(loadedPlugins);
-        }
-        setListAdapter(new ArrayAdapter(this,
-                                        android.R.layout.simple_list_item_1,
-                                        localLoadedPluginList));
-        setTitle(R.string.pref_plugin_installed);
-        // Add a text view to this ListActivity. This text view
-        // will be displayed when the list of plugins is empty.
-        TextView textView = new TextView(this);
-        textView.setId(android.R.id.empty);
-        textView.setText(R.string.pref_plugin_installed_empty_list);
-        addContentView(textView, new LinearLayout.LayoutParams(
-                               ViewGroup.LayoutParams.FILL_PARENT,
-                               ViewGroup.LayoutParams.WRAP_CONTENT));
-
-    }
-
-    @Override
-    public void onListItemClick(ListView l, View v, int position, long id) {
-        WebView.getPluginList().pluginClicked(this, position);
-    }
-}
diff --git a/src/com/android/browser/BrowserPreferencesPage.java b/src/com/android/browser/BrowserPreferencesPage.java
index 3b747d1..fb0b2ba 100644
--- a/src/com/android/browser/BrowserPreferencesPage.java
+++ b/src/com/android/browser/BrowserPreferencesPage.java
@@ -17,18 +17,28 @@
 package com.android.browser;
 
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
 
+import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
 import android.preference.EditTextPreference;
+import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
+import android.preference.PreferenceScreen;
+import android.util.Log;
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
+import android.webkit.WebStorage;
 import android.webkit.WebView;
-import android.webkit.Plugin;
 
 public class BrowserPreferencesPage extends PreferenceActivity
-        implements Preference.OnPreferenceChangeListener, 
-        Preference.OnPreferenceClickListener {
+        implements Preference.OnPreferenceChangeListener {
+
+    private String LOGTAG = "BrowserPreferencesPage";
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -59,13 +69,42 @@
 
         e = findPreference(BrowserSettings.PREF_DEFAULT_TEXT_ENCODING);
         e.setOnPreferenceChangeListener(this);
-        
+
         if (BrowserSettings.getInstance().showDebugSettings()) {
             addPreferencesFromResource(R.xml.debug_preferences);
         }
-        
-        e = findPreference(BrowserSettings.PREF_GEARS_SETTINGS);
-        e.setOnPreferenceClickListener(this);
+
+        PreferenceScreen websiteSettings = (PreferenceScreen)
+            findPreference(BrowserSettings.PREF_WEBSITE_SETTINGS);
+        Intent intent = new Intent(this, WebsiteSettingsActivity.class);
+        websiteSettings.setIntent(intent);
+    }
+
+    /*
+     * We need to set the PreferenceScreen state in onResume(), as the number of
+     * origins with active features (WebStorage, Geolocation etc) could have
+     * changed after calling the WebsiteSettingsActivity.
+     */
+    @Override
+    protected void onResume() {
+        super.onResume();
+        final PreferenceScreen websiteSettings = (PreferenceScreen)
+            findPreference(BrowserSettings.PREF_WEBSITE_SETTINGS);
+        websiteSettings.setEnabled(false);
+        WebStorage.getInstance().getOrigins(new ValueCallback<Map>() {
+            public void onReceiveValue(Map webStorageOrigins) {
+                if ((webStorageOrigins != null) && !webStorageOrigins.isEmpty()) {
+                    websiteSettings.setEnabled(true);
+                }
+            }
+        });
+        GeolocationPermissions.getInstance().getOrigins(new ValueCallback<Set>() {
+            public void onReceiveValue(Set geolocationOrigins) {
+                if ((geolocationOrigins != null) && !geolocationOrigins.isEmpty()) {
+                    websiteSettings.setEnabled(true);
+                }
+            }
+        });
     }
 
     @Override
@@ -121,20 +160,6 @@
         
         return false;
     }
-    
-    public boolean onPreferenceClick(Preference pref) {
-        if (pref.getKey().equals(BrowserSettings.PREF_GEARS_SETTINGS)) {
-            List<Plugin> loadedPlugins = WebView.getPluginList().getList();
-            for(Plugin p : loadedPlugins) {
-                if (p.getName().equals("gears")) {
-                    p.dispatchClickEvent(this);
-                    return true;
-                }
-            }
-            
-        }
-        return true;
-    }
 
     private CharSequence getVisualTextSizeName(String enumName) {
         CharSequence[] visualNames = getResources().getTextArray(
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index a3ccf04..8e0929b 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -19,8 +19,10 @@
 import com.google.android.providers.GoogleSettings.Partner;
 
 import android.app.SearchManager;
+import android.backup.BackupManager;
 import android.content.ComponentName;
 import android.content.ContentProvider;
+import android.content.ContentResolver;
 import android.content.ContentUris;
 import android.content.ContentValues;
 import android.content.Context;
@@ -36,16 +38,20 @@
 import android.database.sqlite.SQLiteDatabase;
 import android.database.sqlite.SQLiteOpenHelper;
 import android.net.Uri;
+import android.os.AsyncTask;
 import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.provider.Browser;
 import android.provider.Settings;
+import android.provider.Browser.BookmarkColumns;
 import android.server.search.SearchableInfo;
 import android.text.TextUtils;
 import android.text.util.Regex;
 import android.util.Log;
 import android.util.TypedValue;
 
+import java.io.File;
+import java.io.FilenameFilter;
 import java.util.Date;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -54,6 +60,7 @@
 public class BrowserProvider extends ContentProvider {
 
     private SQLiteOpenHelper mOpenHelper;
+    private BackupManager mBackupManager;
     private static final String sDatabaseName = "browser.db";
     private static final String TAG = "BrowserProvider";
     private static final String ORDER_BY = "visits DESC, date DESC";
@@ -81,6 +88,7 @@
     private static final int SUGGEST_COLUMN_ICON_2_ID = 6;
     private static final int SUGGEST_COLUMN_QUERY_ID = 7;
     private static final int SUGGEST_COLUMN_FORMAT = 8;
+    private static final int SUGGEST_COLUMN_INTENT_EXTRA_DATA = 9;
 
     // shared suggestion columns
     private static final String[] COLUMNS = new String[] {
@@ -92,10 +100,13 @@
             SearchManager.SUGGEST_COLUMN_ICON_1,
             SearchManager.SUGGEST_COLUMN_ICON_2,
             SearchManager.SUGGEST_COLUMN_QUERY,
-            SearchManager.SUGGEST_COLUMN_FORMAT};
+            SearchManager.SUGGEST_COLUMN_FORMAT,
+            SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA};
 
     private static final int MAX_SUGGESTION_SHORT_ENTRIES = 3;
     private static final int MAX_SUGGESTION_LONG_ENTRIES = 6;
+    private static final String MAX_SUGGESTION_LONG_ENTRIES_STRING =
+            Integer.valueOf(MAX_SUGGESTION_LONG_ENTRIES).toString();
 
     // make sure that these match the index of TABLE_NAMES
     private static final int URI_MATCH_BOOKMARKS = 0;
@@ -143,7 +154,10 @@
     // 15 -> 17 Set it up for the SearchManager
     // 17 -> 18 Added favicon in bookmarks table for Home shortcuts
     // 18 -> 19 Remove labels table
-    private static final int DATABASE_VERSION = 19;
+    // 19 -> 20 Added thumbnail
+    // 20 -> 21 Added touch_icon
+    // 21 -> 22 Remove "clientid"
+    private static final int DATABASE_VERSION = 22;
 
     // Regular expression which matches http://, followed by some stuff, followed by
     // optionally a trailing slash, all matched as separate groups.
@@ -215,7 +229,9 @@
                     "created LONG," +
                     "description TEXT," +
                     "bookmark INTEGER," +
-                    "favicon BLOB DEFAULT NULL" +
+                    "favicon BLOB DEFAULT NULL," +
+                    "thumbnail BLOB DEFAULT NULL," +
+                    "touch_icon BLOB DEFAULT NULL" +
                     ");");
 
             final CharSequence[] bookmarks = mContext.getResources()
@@ -242,21 +258,81 @@
         @Override
         public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
             Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
-                    + newVersion + ", which will destroy all old data");
+                    + newVersion);
             if (oldVersion == 18) {
                 db.execSQL("DROP TABLE IF EXISTS labels");
+            }
+            if (oldVersion <= 19) {
+                db.execSQL("ALTER TABLE bookmarks ADD COLUMN thumbnail BLOB DEFAULT NULL;");
+            }
+            if (oldVersion < 21) {
+                db.execSQL("ALTER TABLE bookmarks ADD COLUMN touch_icon BLOB DEFAULT NULL;");
+            }
+            if (oldVersion < 22) {
+                db.execSQL("DELETE FROM bookmarks WHERE (bookmark = 0 AND url LIKE \"%.google.%client=ms-%\")");
+                removeGears();
             } else {
                 db.execSQL("DROP TABLE IF EXISTS bookmarks");
                 db.execSQL("DROP TABLE IF EXISTS searches");
                 onCreate(db);
             }
         }
+
+        private void removeGears() {
+            AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
+                public Void doInBackground(Void... unused) {
+                    String browserDataDirString = mContext.getApplicationInfo().dataDir;
+                    final String appPluginsDirString = "app_plugins";
+                    final String gearsPrefix = "gears";
+                    File appPluginsDir = new File(browserDataDirString + File.separator
+                            + appPluginsDirString);
+                    if (!appPluginsDir.exists()) {
+                        return null;
+                    }
+                    // Delete the Gears plugin files
+                    File[] gearsFiles = appPluginsDir.listFiles(new FilenameFilter() {
+                        public boolean accept(File dir, String filename) {
+                            return filename.startsWith(gearsPrefix);
+                        }
+                    });
+                    for (int i = 0; i < gearsFiles.length; ++i) {
+                        if (gearsFiles[i].isDirectory()) {
+                            deleteDirectory(gearsFiles[i]);
+                        } else {
+                            gearsFiles[i].delete();
+                        }
+                    }
+                    // Delete the Gears data files
+                    File gearsDataDir = new File(browserDataDirString + File.separator
+                            + gearsPrefix);
+                    if (!gearsDataDir.exists()) {
+                        return null;
+                    }
+                    deleteDirectory(gearsDataDir);
+                    return null;
+                }
+
+                private void deleteDirectory(File currentDir) {
+                    File[] files = currentDir.listFiles();
+                    for (int i = 0; i < files.length; ++i) {
+                        if (files[i].isDirectory()) {
+                            deleteDirectory(files[i]);
+                        }
+                        files[i].delete();
+                    }
+                    currentDir.delete();
+                }
+            };
+
+            task.execute();
+        }
     }
 
     @Override
     public boolean onCreate() {
         final Context context = getContext();
         mOpenHelper = new DatabaseHelper(context);
+        mBackupManager = new BackupManager(context);
         // we added "picasa web album" into default bookmarks for version 19.
         // To avoid erasing the bookmark table, we added it explicitly for
         // version 18 and 19 as in the other cases, we will erase the table.
@@ -370,6 +446,7 @@
         private int     mSuggestText1Id;
         private int     mSuggestText2Id;
         private int     mSuggestQueryId;
+        private int     mSuggestIntentExtraDataId;
 
         public MySuggestionCursor(Cursor hc, Cursor sc, String string) {
             mHistoryCursor = hc;
@@ -389,6 +466,7 @@
                 mSuggestText1Id = -1;
                 mSuggestText2Id = -1;
                 mSuggestQueryId = -1;
+                mSuggestIntentExtraDataId = -1;
             } else {
                 mSuggestText1Id = mSuggestCursor.getColumnIndex(
                                 SearchManager.SUGGEST_COLUMN_TEXT_1);
@@ -396,6 +474,8 @@
                                 SearchManager.SUGGEST_COLUMN_TEXT_2);
                 mSuggestQueryId = mSuggestCursor.getColumnIndex(
                                 SearchManager.SUGGEST_COLUMN_QUERY);
+                mSuggestIntentExtraDataId = mSuggestCursor.getColumnIndex(
+                                SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA);
             }
         }
 
@@ -471,22 +551,22 @@
                     case SUGGEST_COLUMN_ICON_1_ID:
                         if (mHistoryCount > mPos) {
                             if (mHistoryCursor.getInt(3) == 1) {
-                                return new Integer(
+                                return Integer.valueOf(
                                         R.drawable.ic_search_category_bookmark)
                                         .toString();
                             } else {
-                                return new Integer(
+                                return Integer.valueOf(
                                         R.drawable.ic_search_category_history)
                                         .toString();
                             }
                         } else {
-                            return new Integer(
+                            return Integer.valueOf(
                                     R.drawable.ic_search_category_suggest)
                                     .toString();
                         }
 
                     case SUGGEST_COLUMN_ICON_2_ID:
-                        return new String("0");
+                        return "0";
 
                     case SUGGEST_COLUMN_QUERY_ID:
                         if (mHistoryCount > mPos) {
@@ -504,6 +584,16 @@
 
                     case SUGGEST_COLUMN_FORMAT:
                         return "html";
+
+                    case SUGGEST_COLUMN_INTENT_EXTRA_DATA:
+                        if (mHistoryCount > mPos) {
+                            return null;
+                        } else if (!mBeyondCursor) {
+                            if (mSuggestIntentExtraDataId == -1) return null;
+                            return mSuggestCursor.getString(mSuggestIntentExtraDataId);
+                        } else {
+                            return null;
+                        }
                 }
             }
             return null;
@@ -637,7 +727,8 @@
                 myArgs = null;
             } else {
                 String like = selectionArgs[0] + "%";
-                if (selectionArgs[0].startsWith("http")) {
+                if (selectionArgs[0].startsWith("http")
+                        || selectionArgs[0].startsWith("file")) {
                     myArgs = new String[1];
                     myArgs[0] = like;
                     suggestSelection = selection;
@@ -655,8 +746,7 @@
 
             Cursor c = db.query(TABLE_NAMES[URI_MATCH_BOOKMARKS],
                     SUGGEST_PROJECTION, suggestSelection, myArgs, null, null,
-                    ORDER_BY,
-                    (new Integer(MAX_SUGGESTION_LONG_ENTRIES)).toString());
+                    ORDER_BY, MAX_SUGGESTION_LONG_ENTRIES_STRING);
 
             if (match == URI_MATCH_BOOKMARKS_SUGGEST
                     || Regex.WEB_URL_PATTERN.matcher(selectionArgs[0]).matches()) {
@@ -729,6 +819,7 @@
 
     @Override
     public Uri insert(Uri url, ContentValues initialValues) {
+        boolean isBookmarkTable = false;
         SQLiteDatabase db = mOpenHelper.getWritableDatabase();
 
         int match = URI_MATCHER.match(url);
@@ -742,6 +833,7 @@
                     uri = ContentUris.withAppendedId(Browser.BOOKMARKS_URI,
                             rowID);
                 }
+                isBookmarkTable = true;
                 break;
             }
 
@@ -764,6 +856,15 @@
             throw new IllegalArgumentException("Unknown URL");
         }
         getContext().getContentResolver().notifyChange(uri, null);
+
+        // Back up the new bookmark set if we just inserted one.
+        // A row created when bookmarks are added from scratch will have
+        // bookmark=1 in the initial value set.
+        if (isBookmarkTable
+                && initialValues.containsKey(BookmarkColumns.BOOKMARK)
+                && initialValues.getAsInteger(BookmarkColumns.BOOKMARK) != 0) {
+            mBackupManager.dataChanged();
+        }
         return uri;
     }
 
@@ -776,20 +877,41 @@
             throw new IllegalArgumentException("Unknown URL");
         }
 
-        if (match == URI_MATCH_BOOKMARKS_ID || match == URI_MATCH_SEARCHES_ID) {
+        // need to know whether it's the bookmarks table for a couple of reasons
+        boolean isBookmarkTable = (match == URI_MATCH_BOOKMARKS_ID);
+        String id = null;
+
+        if (isBookmarkTable || match == URI_MATCH_SEARCHES_ID) {
             StringBuilder sb = new StringBuilder();
             if (where != null && where.length() > 0) {
                 sb.append("( ");
                 sb.append(where);
                 sb.append(" ) AND ");
             }
+            id = url.getPathSegments().get(1);
             sb.append("_id = ");
-            sb.append(url.getPathSegments().get(1));
+            sb.append(id);
             where = sb.toString();
         }
 
+        ContentResolver cr = getContext().getContentResolver();
+
+        // we'lll need to back up the bookmark set if we are about to delete one
+        if (isBookmarkTable) {
+            Cursor cursor = cr.query(Browser.BOOKMARKS_URI,
+                    new String[] { BookmarkColumns.BOOKMARK },
+                    "_id = " + id, null, null);
+            if (cursor.moveToNext()) {
+                if (cursor.getInt(0) != 0) {
+                    // yep, this record is a bookmark
+                    mBackupManager.dataChanged();
+                }
+            }
+            cursor.close();
+        }
+
         int count = db.delete(TABLE_NAMES[match % 10], where, whereArgs);
-        getContext().getContentResolver().notifyChange(url, null);
+        cr.notifyChange(url, null);
         return count;
     }
 
@@ -803,20 +925,59 @@
             throw new IllegalArgumentException("Unknown URL");
         }
 
-        if (match == URI_MATCH_BOOKMARKS_ID || match == URI_MATCH_SEARCHES_ID) {
+        String id = null;
+        boolean isBookmarkTable = (match == URI_MATCH_BOOKMARKS_ID);
+        boolean changingBookmarks = false;
+
+        if (isBookmarkTable || match == URI_MATCH_SEARCHES_ID) {
             StringBuilder sb = new StringBuilder();
             if (where != null && where.length() > 0) {
                 sb.append("( ");
                 sb.append(where);
                 sb.append(" ) AND ");
             }
+            id = url.getPathSegments().get(1);
             sb.append("_id = ");
-            sb.append(url.getPathSegments().get(1));
+            sb.append(id);
             where = sb.toString();
         }
 
+        ContentResolver cr = getContext().getContentResolver();
+
+        // Not all bookmark-table updates should be backed up.  Look to see
+        // whether we changed the title, url, or "is a bookmark" state, and
+        // request a backup if so.
+        if (isBookmarkTable) {
+            // Alterations to the bookmark field inherently change the bookmark
+            // set, so we don't need to query the record; we know a priori that
+            // we will need to back up this change.
+            if (values.containsKey(BookmarkColumns.BOOKMARK)) {
+                changingBookmarks = true;
+            }
+            // changing the title or URL of a bookmark record requires a backup,
+            // but we don't know wether such an update is on a bookmark without
+            // querying the record
+            if (!changingBookmarks &&
+                    (values.containsKey(BookmarkColumns.TITLE)
+                     || values.containsKey(BookmarkColumns.URL))) {
+                // when isBookmarkTable is true, the 'id' var was assigned above
+                Cursor cursor = cr.query(Browser.BOOKMARKS_URI,
+                        new String[] { BookmarkColumns.BOOKMARK },
+                        "_id = " + id, null, null);
+                if (cursor.moveToNext()) {
+                    changingBookmarks = (cursor.getInt(0) != 0);
+                }
+                cursor.close();
+            }
+
+            // if this *is* a bookmark row we're altering, we need to back it up.
+            if (changingBookmarks) {
+                mBackupManager.dataChanged();
+            }
+        }
+
         int ret = db.update(TABLE_NAMES[match % 10], values, where, whereArgs);
-        getContext().getContentResolver().notifyChange(url, null);
+        cr.notifyChange(url, null);
         return ret;
     }
 
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index a5e23c9..e36d54b 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (C) 2007 The Android Open Source Project
  *
@@ -20,17 +21,25 @@
 
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.pm.ActivityInfo;
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.Editor;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceScreen;
 import android.webkit.CookieManager;
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
 import android.webkit.WebView;
 import android.webkit.WebViewDatabase;
 import android.webkit.WebIconDatabase;
 import android.webkit.WebSettings;
+import android.webkit.WebStorage;
 import android.preference.PreferenceManager;
 import android.provider.Browser;
 
 import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
 import java.util.Observable;
 
 /*
@@ -48,14 +57,13 @@
  */
 class BrowserSettings extends Observable {
 
-    // Public variables for settings
+    // Private variables for settings
     // NOTE: these defaults need to be kept in sync with the XML
     // until the performance of PreferenceManager.setDefaultValues()
     // is improved.
     private boolean loadsImagesAutomatically = true;
     private boolean javaScriptEnabled = true;
     private boolean pluginsEnabled = true;
-    private String pluginsPath;  // default value set in loadFromDb().
     private boolean javaScriptCanOpenWindowsAutomatically = false;
     private boolean showSecurityWarnings = true;
     private boolean rememberPasswords = true;
@@ -65,7 +73,25 @@
     private String homeUrl = "";
     private boolean loginInitialized = false;
     private boolean autoFitPage = true;
+    private boolean landscapeOnly = false;
+    private boolean loadsPageInOverviewMode = true;
     private boolean showDebugSettings = false;
+    // HTML5 API flags
+    private boolean appCacheEnabled = true;
+    private boolean databaseEnabled = true;
+    private boolean domStorageEnabled = true;
+    private boolean geolocationEnabled = true;
+    private boolean workersEnabled = true;  // only affects V8. JSC does not have a similar setting
+    // HTML5 API configuration params
+    private long appCacheMaxSize = Long.MAX_VALUE;
+    private String appCachePath;  // default value set in loadFromDb().
+    private String databasePath; // default value set in loadFromDb()
+    private String geolocationDatabasePath; // default value set in loadFromDb()
+    private WebStorageSizeManager webStorageSizeManager;
+
+    private String jsFlags = "";
+
+    private final static String TAG = "BrowserSettings";
 
     // Development settings
     public WebSettings.LayoutAlgorithm layoutAlgorithm =
@@ -75,6 +101,11 @@
     private boolean tracing = false;
     private boolean lightTouch = false;
     private boolean navDump = false;
+
+    // By default the error console is shown once the user navigates to about:debug.
+    // The setting can be then toggled from the settings menu.
+    private boolean showConsole = true;
+
     // Browser only settings
     private boolean doFlick = false;
 
@@ -100,19 +131,21 @@
     public final static String PREF_EXTRAS_RESET_DEFAULTS =
             "reset_default_preferences";
     public final static String PREF_DEBUG_SETTINGS = "debug_menu";
-    public final static String PREF_GEARS_SETTINGS = "gears_settings";
+    public final static String PREF_WEBSITE_SETTINGS = "website_settings";
     public final static String PREF_TEXT_SIZE = "text_size";
     public final static String PREF_DEFAULT_ZOOM = "default_zoom";
     public final static String PREF_DEFAULT_TEXT_ENCODING =
             "default_text_encoding";
+    public final static String PREF_CLEAR_GEOLOCATION_ACCESS =
+            "privacy_clear_geolocation_access";
 
     private static final String DESKTOP_USERAGENT = "Mozilla/5.0 (Macintosh; " +
-            "U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, " +
-            "like Gecko) Version/3.1.2 Safari/525.20.1";
+            "U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, " +
+            "like Gecko) Version/4.0 Safari/530.17";
 
     private static final String IPHONE_USERAGENT = "Mozilla/5.0 (iPhone; U; " +
-            "CPU iPhone OS 2_2 like Mac OS X; en-us) AppleWebKit/525.18.1 " +
-            "(KHTML, like Gecko) Version/3.1.1 Mobile/5G77 Safari/525.20";
+            "CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 " +
+            "(KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16";
 
     // Value to truncate strings when adding them to a TextView within
     // a ListView
@@ -157,7 +190,6 @@
             s.setLoadsImagesAutomatically(b.loadsImagesAutomatically);
             s.setJavaScriptEnabled(b.javaScriptEnabled);
             s.setPluginsEnabled(b.pluginsEnabled);
-            s.setPluginsPath(b.pluginsPath);
             s.setJavaScriptCanOpenWindowsAutomatically(
                     b.javaScriptCanOpenWindowsAutomatically);
             s.setDefaultTextEncodingName(b.defaultTextEncodingName);
@@ -171,13 +203,29 @@
             s.setLightTouchEnabled(b.lightTouch);
             s.setSaveFormData(b.saveFormData);
             s.setSavePassword(b.rememberPasswords);
+            s.setLoadWithOverviewMode(b.loadsPageInOverviewMode);
 
             // WebView inside Browser doesn't want initial focus to be set.
             s.setNeedInitialFocus(false);
             // Browser supports multiple windows
             s.setSupportMultipleWindows(true);
-            // Turn off file access
-            s.setAllowFileAccess(false);
+
+            // HTML5 API flags
+            s.setAppCacheEnabled(b.appCacheEnabled);
+            s.setDatabaseEnabled(b.databaseEnabled);
+            s.setDomStorageEnabled(b.domStorageEnabled);
+            s.setWorkersEnabled(b.workersEnabled);  // This only affects V8.
+            s.setGeolocationEnabled(b.geolocationEnabled);
+
+            // HTML5 configuration parameters.
+            s.setAppCacheMaxSize(b.appCacheMaxSize);
+            s.setAppCachePath(b.appCachePath);
+            s.setDatabasePath(b.databasePath);
+            s.setGeolocationDatabasePath(b.geolocationDatabasePath);
+
+            // Enable/Disable the error console.
+            b.mTabControl.getBrowserActivity().setShouldShowErrorConsole(
+                    b.showDebugSettings && b.showConsole);
         }
     }
 
@@ -193,10 +241,18 @@
     public void loadFromDb(Context ctx) {
         SharedPreferences p =
                 PreferenceManager.getDefaultSharedPreferences(ctx);
-
-        // Set the default value for the plugins path to the application's
-        // local directory.
-        pluginsPath = ctx.getDir("plugins", 0).getPath();
+        // Set the default value for the Application Caches path.
+        appCachePath = ctx.getDir("appcache", 0).getPath();
+        // Determine the maximum size of the application cache.
+        webStorageSizeManager = new WebStorageSizeManager(
+                ctx,
+                new WebStorageSizeManager.StatFsDiskInfo(appCachePath),
+                new WebStorageSizeManager.WebKitAppCacheInfo(appCachePath));
+        appCacheMaxSize = webStorageSizeManager.getAppCacheMaxSize();
+        // Set the default value for the Database path.
+        databasePath = ctx.getDir("databases", 0).getPath();
+        // Set the default value for the Geolocation database path.
+        geolocationDatabasePath = ctx.getDir("geolocation", 0).getPath();
 
         homeUrl = getFactoryResetHomeUrl(ctx);
 
@@ -218,7 +274,6 @@
                 javaScriptEnabled);
         pluginsEnabled = p.getBoolean("enable_plugins",
                 pluginsEnabled);
-        pluginsPath = p.getString("plugins_path", pluginsPath);
         javaScriptCanOpenWindowsAutomatically = !p.getBoolean(
             "block_popup_windows",
             !javaScriptCanOpenWindowsAutomatically);
@@ -238,6 +293,16 @@
         zoomDensity = WebSettings.ZoomDensity.valueOf(
                 p.getString(PREF_DEFAULT_ZOOM, zoomDensity.name()));
         autoFitPage = p.getBoolean("autofit_pages", autoFitPage);
+        loadsPageInOverviewMode = p.getBoolean("load_page",
+                loadsPageInOverviewMode);
+        boolean landscapeOnlyTemp =
+                p.getBoolean("landscape_only", landscapeOnly);
+        if (landscapeOnlyTemp != landscapeOnly) {
+            landscapeOnly = landscapeOnlyTemp;
+            mTabControl.getBrowserActivity().setRequestedOrientation(
+                    landscapeOnly ? ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
+                    : ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+        }
         useWideViewPort = true; // use wide view port for either setting
         if (autoFitPage) {
             layoutAlgorithm = WebSettings.LayoutAlgorithm.NARROW_COLUMNS;
@@ -274,17 +339,41 @@
             doFlick = p.getBoolean("enable_flick", doFlick);
             userAgent = Integer.parseInt(p.getString("user_agent", "0"));
         }
-        update();
-    }
+        // JS flags is loaded from DB even if showDebugSettings is false,
+        // so that it can be set once and be effective all the time.
+        jsFlags = p.getString("js_engine_flags", "");
 
-    public String getPluginsPath() {
-        return pluginsPath;
+        // Read the setting for showing/hiding the JS Console always so that should the
+        // user enable debug settings, we already know if we should show the console.
+        // The user will never see the console unless they navigate to about:debug,
+        // regardless of the setting we read here. This setting is only used after debug
+        // is enabled.
+        showConsole = p.getBoolean("javascript_console", showConsole);
+        mTabControl.getBrowserActivity().setShouldShowErrorConsole(
+                showDebugSettings && showConsole);
+
+        // HTML5 API flags
+        appCacheEnabled = p.getBoolean("enable_appcache", appCacheEnabled);
+        databaseEnabled = p.getBoolean("enable_database", databaseEnabled);
+        domStorageEnabled = p.getBoolean("enable_domstorage", domStorageEnabled);
+        geolocationEnabled = p.getBoolean("enable_geolocation", geolocationEnabled);
+        workersEnabled = p.getBoolean("enable_workers", workersEnabled);
+
+        update();
     }
 
     public String getHomePage() {
         return homeUrl;
     }
 
+    public String getJsFlags() {
+        return jsFlags;
+    }
+
+    public WebStorageSizeManager getWebStorageSizeManager() {
+        return webStorageSizeManager;
+    }
+
     public void setHomePage(Context context, String url) {
         Editor ed = PreferenceManager.
                 getDefaultSharedPreferences(context).edit();
@@ -436,14 +525,48 @@
         db.clearHttpAuthUsernamePassword();
     }
 
-    /*package*/ void resetDefaultPreferences(Context context) {
+    private void maybeDisableWebsiteSettings(Context context) {
+        PreferenceActivity activity = (PreferenceActivity) context;
+        final PreferenceScreen screen = (PreferenceScreen)
+            activity.findPreference(BrowserSettings.PREF_WEBSITE_SETTINGS);
+        screen.setEnabled(false);
+        WebStorage.getInstance().getOrigins(new ValueCallback<Map>() {
+            public void onReceiveValue(Map webStorageOrigins) {
+                if ((webStorageOrigins != null) && !webStorageOrigins.isEmpty()) {
+                    screen.setEnabled(true);
+                }
+            }
+        });
+
+        GeolocationPermissions.getInstance().getOrigins(new ValueCallback<Set>() {
+            public void onReceiveValue(Set geolocationOrigins) {
+                if ((geolocationOrigins != null) && !geolocationOrigins.isEmpty()) {
+                    screen.setEnabled(true);
+                }
+            }
+        });
+    }
+
+    /*package*/ void clearDatabases(Context context) {
+        WebStorage.getInstance().deleteAllData();
+        maybeDisableWebsiteSettings(context);
+    }
+
+    /*package*/ void clearLocationAccess(Context context) {
+        GeolocationPermissions.getInstance().clearAll();
+        maybeDisableWebsiteSettings(context);
+    }
+
+    /*package*/ void resetDefaultPreferences(Context ctx) {
         SharedPreferences p =
-            PreferenceManager.getDefaultSharedPreferences(context);
+            PreferenceManager.getDefaultSharedPreferences(ctx);
         p.edit().clear().commit();
-        PreferenceManager.setDefaultValues(context, R.xml.browser_preferences,
+        PreferenceManager.setDefaultValues(ctx, R.xml.browser_preferences,
                 true);
         // reset homeUrl
-        setHomePage(context, getFactoryResetHomeUrl(context));
+        setHomePage(ctx, getFactoryResetHomeUrl(ctx));
+        // reset appcache max size
+        appCacheMaxSize = webStorageSizeManager.getAppCacheMaxSize();
     }
 
     private String getFactoryResetHomeUrl(Context context) {
diff --git a/src/com/android/browser/BrowserYesNoPreference.java b/src/com/android/browser/BrowserYesNoPreference.java
index 65cde71..caea092 100644
--- a/src/com/android/browser/BrowserYesNoPreference.java
+++ b/src/com/android/browser/BrowserYesNoPreference.java
@@ -38,6 +38,7 @@
             Context context = getContext();
             if (BrowserSettings.PREF_CLEAR_CACHE.equals(getKey())) {
                 BrowserSettings.getInstance().clearCache(context);
+                BrowserSettings.getInstance().clearDatabases(context);
             } else if (BrowserSettings.PREF_CLEAR_COOKIES.equals(getKey())) {
                 BrowserSettings.getInstance().clearCookies(context);
             } else if (BrowserSettings.PREF_CLEAR_HISTORY.equals(getKey())) {
@@ -50,6 +51,9 @@
                     getKey())) {
                 BrowserSettings.getInstance().resetDefaultPreferences(context);
                 setEnabled(true);
+            } else if (BrowserSettings.PREF_CLEAR_GEOLOCATION_ACCESS.equals(
+                    getKey())) {
+                BrowserSettings.getInstance().clearLocationAccess(context);
             }
         }
     }
diff --git a/src/com/android/browser/CombinedBookmarkHistoryActivity.java b/src/com/android/browser/CombinedBookmarkHistoryActivity.java
index 5678b44..a611d79 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryActivity.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryActivity.java
@@ -24,10 +24,10 @@
 import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.provider.Browser;
+import android.view.Window;
 import android.webkit.WebIconDatabase.IconListener;
 import android.widget.TabHost;
 import android.widget.TabHost.TabSpec;
-import android.view.Window;
 
 import java.util.HashMap;
 import java.util.Vector;
@@ -67,10 +67,9 @@
         }
     }
     private static IconListenerSet sIconListenerSet;
-    static IconListenerSet getIconListenerSet(ContentResolver cr) {
+    static IconListenerSet getIconListenerSet() {
         if (null == sIconListenerSet) {
             sIconListenerSet = new IconListenerSet();
-            Browser.requestAllIcons(cr, null, sIconListenerSet);
         }
         return sIconListenerSet;
     }
@@ -78,42 +77,52 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
         setContentView(R.layout.tabs);
-        TabHost tabHost = getTabHost();
-        tabHost.setOnTabChangedListener(this);
+
+        setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
+
+        getTabHost().setOnTabChangedListener(this);
 
         Bundle extras = getIntent().getExtras();
-        Resources resources = getResources();
 
-        getIconListenerSet(getContentResolver());
+        getIconListenerSet();
+        // Do this every time we create a new activity so that we get the
+        // newest icons.
+        Browser.requestAllIcons(getContentResolver(), null, sIconListenerSet);
+
         Intent bookmarksIntent = new Intent(this, BrowserBookmarksPage.class);
         bookmarksIntent.putExtras(extras);
-        tabHost.addTab(tabHost.newTabSpec(BOOKMARKS_TAB)
-                .setIndicator(resources.getString(R.string.tab_bookmarks),
-                resources.getDrawable(R.drawable.browser_bookmark_tab))
-                .setContent(bookmarksIntent));
+        createTab(bookmarksIntent, R.string.tab_bookmarks,
+                R.drawable.browser_bookmark_tab, BOOKMARKS_TAB);
 
-        Intent visitedIntent = new Intent(this, MostVisitedActivity.class);
-        visitedIntent.putExtras(extras);
-        tabHost.addTab(tabHost.newTabSpec(VISITED_TAB)
-                .setIndicator(resources.getString(R.string.tab_most_visited),
-                resources.getDrawable(R.drawable.browser_visited_tab))
-                .setContent(visitedIntent));
+        Intent visitedIntent = new Intent(this, BrowserBookmarksPage.class);
+        // Need to copy extras so the bookmarks activity and this one will be
+        // different
+        Bundle visitedExtras = new Bundle(extras);
+        visitedExtras.putBoolean("mostVisited", true);
+        visitedIntent.putExtras(visitedExtras);
+        createTab(visitedIntent, R.string.tab_most_visited,
+                R.drawable.browser_visited_tab, VISITED_TAB);
 
         Intent historyIntent = new Intent(this, BrowserHistoryPage.class);
         historyIntent.putExtras(extras);
-        tabHost.addTab(tabHost.newTabSpec(HISTORY_TAB)
-                .setIndicator(resources.getString(R.string.tab_history),
-                resources.getDrawable(R.drawable.
-                browser_history_tab)).setContent(historyIntent));
+        createTab(historyIntent, R.string.tab_history,
+                R.drawable.browser_history_tab, HISTORY_TAB);
 
         String defaultTab = extras.getString(STARTING_TAB);
         if (defaultTab != null) {
-            tabHost.setCurrentTab(2);
+            getTabHost().setCurrentTab(2);
         }
     }
 
+    private void createTab(Intent intent, int labelResId, int iconResId,
+            String tab) {
+        Resources resources = getResources();
+        TabHost tabHost = getTabHost();
+        tabHost.addTab(tabHost.newTabSpec(tab).setIndicator(
+                resources.getText(labelResId), resources.getDrawable(iconResId))
+                .setContent(intent));
+    }
     // Copied from DialTacts Activity
     /** {@inheritDoc} */
     public void onTabChanged(String tabId) {
diff --git a/src/com/android/browser/DownloadTouchIcon.java b/src/com/android/browser/DownloadTouchIcon.java
new file mode 100644
index 0000000..07d2d3a
--- /dev/null
+++ b/src/com/android/browser/DownloadTouchIcon.java
@@ -0,0 +1,136 @@
+/*
+ * 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.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.http.AndroidHttpClient;
+import android.os.AsyncTask;
+import android.provider.Browser;
+import android.webkit.WebView;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.params.HttpClientParams;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+class DownloadTouchIcon extends AsyncTask<String, Void, Bitmap> {
+    private final ContentResolver mContentResolver;
+    private final Cursor mCursor;
+    private final String mOriginalUrl;
+    private final String mUrl;
+    private final String mUserAgent;
+    /* package */ BrowserActivity mActivity;
+
+    public DownloadTouchIcon(BrowserActivity activity, ContentResolver cr,
+            Cursor c, WebView view) {
+        mActivity = activity;
+        mContentResolver = cr;
+        mCursor = c;
+        // Store these in case they change.
+        mOriginalUrl = view.getOriginalUrl();
+        mUrl = view.getUrl();
+        mUserAgent = view.getSettings().getUserAgentString();
+    }
+
+    public DownloadTouchIcon(ContentResolver cr, Cursor c, String url) {
+        mActivity = null;
+        mContentResolver = cr;
+        mCursor = c;
+        mOriginalUrl = null;
+        mUrl = url;
+        mUserAgent = null;
+    }
+
+    @Override
+    public Bitmap doInBackground(String... values) {
+        String url = values[0];
+
+        AndroidHttpClient client = AndroidHttpClient.newInstance(
+                mUserAgent);
+        HttpGet request = new HttpGet(url);
+
+        // Follow redirects
+        HttpClientParams.setRedirecting(client.getParams(), true);
+
+        try {
+            HttpResponse response = client.execute(request);
+
+            if (response.getStatusLine().getStatusCode() == 200) {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    InputStream content = entity.getContent();
+                    if (content != null) {
+                        Bitmap icon = BitmapFactory.decodeStream(
+                                content, null, null);
+                        return icon;
+                    }
+                }
+            }
+        } catch (IllegalArgumentException ex) {
+            request.abort();
+        } catch (IOException ex) {
+            request.abort();
+        } finally {
+            client.close();
+        }
+        return null;
+    }
+
+    @Override
+    protected void onCancelled() {
+        if (mCursor != null) {
+            mCursor.close();
+        }
+    }
+
+    @Override
+    public void onPostExecute(Bitmap icon) {
+        // Do this first in case the download failed.
+        if (mActivity != null) {
+            // Remove the touch icon loader from the BrowserActivity.
+            mActivity.mTouchIconLoader = null;
+        }
+
+        if (icon == null || mCursor == null || isCancelled()) {
+            return;
+        }
+
+        final ByteArrayOutputStream os = new ByteArrayOutputStream();
+        icon.compress(Bitmap.CompressFormat.PNG, 100, os);
+        ContentValues values = new ContentValues();
+        values.put(Browser.BookmarkColumns.TOUCH_ICON,
+                os.toByteArray());
+
+        if (mCursor.moveToFirst()) {
+            do {
+                mContentResolver.update(ContentUris.withAppendedId(
+                        Browser.BOOKMARKS_URI, mCursor.getInt(0)),
+                        values, null, null);
+            } while (mCursor.moveToNext());
+        }
+        mCursor.close();
+    }
+}
diff --git a/src/com/android/browser/ErrorConsoleView.java b/src/com/android/browser/ErrorConsoleView.java
new file mode 100644
index 0000000..56f663b
--- /dev/null
+++ b/src/com/android/browser/ErrorConsoleView.java
@@ -0,0 +1,339 @@
+/*
+ * 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.content.Context;
+import android.database.DataSetObserver;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.View.OnClickListener;
+import android.webkit.WebView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.TwoLineListItem;
+
+import java.util.Vector;
+
+/* package */ class ErrorConsoleView extends LinearLayout {
+
+    /**
+     * Define some constants to describe the visibility of the error console.
+     */
+    public static final int SHOW_MINIMIZED = 0;
+    public static final int SHOW_MAXIMIZED = 1;
+    public static final int SHOW_NONE      = 2;
+
+    private TextView mConsoleHeader;
+    private ErrorConsoleListView mErrorList;
+    private LinearLayout mEvalJsViewGroup;
+    private EditText mEvalEditText;
+    private Button mEvalButton;
+    private WebView mWebView;
+    private int mCurrentShowState = SHOW_NONE;
+
+    private boolean mSetupComplete = false;
+
+    // Before we've been asked to display the console, cache any messages that should
+    // be added to the console. Then when we do display the console, add them to the view
+    // then.
+    private Vector<ErrorConsoleMessage> mErrorMessageCache;
+
+    public ErrorConsoleView(Context context) {
+        super(context);
+    }
+
+    public ErrorConsoleView(Context context, AttributeSet attributes) {
+        super(context, attributes);
+    }
+
+    private void commonSetupIfNeeded() {
+        if (mSetupComplete) {
+            return;
+        }
+
+        LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(
+                Context.LAYOUT_INFLATER_SERVICE);
+        inflater.inflate(R.layout.error_console, this);
+
+        // Get references to each ui element.
+        mConsoleHeader = (TextView) findViewById(R.id.error_console_header_id);
+        mErrorList = (ErrorConsoleListView) findViewById(R.id.error_console_list_id);
+        mEvalJsViewGroup = (LinearLayout) findViewById(R.id.error_console_eval_view_group_id);
+        mEvalEditText = (EditText) findViewById(R.id.error_console_eval_text_id);
+        mEvalButton = (Button) findViewById(R.id.error_console_eval_button_id);
+
+        mEvalButton.setOnClickListener(new OnClickListener() {
+            public void onClick(View v) {
+                // Send the javascript to be evaluated to webkit as a javascript: url
+                // TODO: Can we expose access to webkit's JS interpreter here and evaluate it that
+                // way? Note that this is called on the UI thread so we will need to post a message
+                // to the WebCore thread to implement this.
+                if (mWebView != null) {
+                    mWebView.loadUrl("javascript:" + mEvalEditText.getText());
+                }
+
+                mEvalEditText.setText("");
+            }
+        });
+
+        // Make clicking on the console title bar min/maximse it.
+        mConsoleHeader.setOnClickListener(new OnClickListener() {
+            public void onClick(View v) {
+                if (mCurrentShowState == SHOW_MINIMIZED) {
+                    showConsole(SHOW_MAXIMIZED);
+                } else {
+                    showConsole(SHOW_MINIMIZED);
+                }
+            }
+        });
+
+        // Add any cached messages to the list now that we've assembled the view.
+        if (mErrorMessageCache != null) {
+            for (ErrorConsoleMessage msg : mErrorMessageCache) {
+                mErrorList.addErrorMessage(msg.getMessage(), msg.getSourceID(), msg.getLineNumber());
+            }
+            mErrorMessageCache.clear();
+        }
+
+        mSetupComplete = true;
+    }
+
+    /**
+     * Adds a message to the set of messages the console uses.
+     */
+    public void addErrorMessage(String msg, String sourceId, int lineNumber) {
+        if (mSetupComplete) {
+            mErrorList.addErrorMessage(msg, sourceId, lineNumber);
+        } else {
+            if (mErrorMessageCache == null) {
+                mErrorMessageCache = new Vector<ErrorConsoleMessage>();
+            }
+            mErrorMessageCache.add(new ErrorConsoleMessage(msg, sourceId, lineNumber));
+        }
+    }
+
+    /**
+     * Removes all error messages from the console.
+     */
+    public void clearErrorMessages() {
+        if (mSetupComplete) {
+            mErrorList.clearErrorMessages();
+        } else if (mErrorMessageCache != null) {
+            mErrorMessageCache.clear();
+        }
+    }
+
+    /**
+     * Returns the current number of errors displayed in the console.
+     */
+    public int numberOfErrors() {
+        if (mSetupComplete) {
+            return mErrorList.getCount();
+        } else {
+            return (mErrorMessageCache == null) ? 0 : mErrorMessageCache.size();
+        }
+    }
+
+    /**
+     * Sets the webview that this console is associated with. Currently this is used so
+     * we can call into webkit to evaluate JS expressions in the console.
+     */
+    public void setWebView(WebView webview) {
+        mWebView = webview;
+    }
+
+    /**
+     * Sets the visibility state of the console.
+     */
+    public void showConsole(int show_state) {
+        commonSetupIfNeeded();
+        switch (show_state) {
+            case SHOW_MINIMIZED:
+                mConsoleHeader.setVisibility(View.VISIBLE);
+                mConsoleHeader.setText(R.string.error_console_header_text_minimized);
+                mErrorList.setVisibility(View.GONE);
+                mEvalJsViewGroup.setVisibility(View.GONE);
+                break;
+
+            case SHOW_MAXIMIZED:
+                mConsoleHeader.setVisibility(View.VISIBLE);
+                mConsoleHeader.setText(R.string.error_console_header_text_maximized);
+                mErrorList.setVisibility(View.VISIBLE);
+                mEvalJsViewGroup.setVisibility(View.VISIBLE);
+                break;
+
+            case SHOW_NONE:
+                mConsoleHeader.setVisibility(View.GONE);
+                mErrorList.setVisibility(View.GONE);
+                mEvalJsViewGroup.setVisibility(View.GONE);
+                break;
+        }
+        mCurrentShowState = show_state;
+    }
+
+    /**
+     * Returns the current visibility state of the console.
+     */
+    public int getShowState() {
+        if (mSetupComplete) {
+            return mCurrentShowState;
+        } else {
+            return SHOW_NONE;
+        }
+    }
+
+    /**
+     * This class extends ListView to implement the View that will actually display the set of
+     * errors encountered on the current page.
+     */
+    private static class ErrorConsoleListView extends ListView {
+        // An adapter for this View that contains a list of error messages.
+        private ErrorConsoleMessageList mConsoleMessages;
+
+        public ErrorConsoleListView(Context context, AttributeSet attributes) {
+            super(context, attributes);
+            mConsoleMessages = new ErrorConsoleMessageList(context);
+            setAdapter(mConsoleMessages);
+        }
+
+        public void addErrorMessage(String msg, String sourceId, int lineNumber) {
+            mConsoleMessages.add(msg, sourceId, lineNumber);
+            setSelection(mConsoleMessages.getCount());
+        }
+
+        public void clearErrorMessages() {
+            mConsoleMessages.clear();
+        }
+
+        /**
+         * This class is an adapter for ErrorConsoleListView that contains the error console
+         * message data.
+         */
+        private class ErrorConsoleMessageList extends android.widget.BaseAdapter
+                implements android.widget.ListAdapter {
+
+            private Vector<ErrorConsoleMessage> mMessages;
+            private LayoutInflater mInflater;
+
+            public ErrorConsoleMessageList(Context context) {
+                mMessages = new Vector<ErrorConsoleMessage>();
+                mInflater = (LayoutInflater)context.getSystemService(
+                        Context.LAYOUT_INFLATER_SERVICE);
+            }
+
+            /**
+             * Add a new message to the list and update the View.
+             */
+            public void add(String msg, String sourceID, int lineNumber) {
+                mMessages.add(new ErrorConsoleMessage(msg, sourceID, lineNumber));
+                notifyDataSetChanged();
+            }
+
+            /**
+             * Remove all messages from the list and update the view.
+             */
+            public void clear() {
+                mMessages.clear();
+                notifyDataSetChanged();
+            }
+
+            @Override
+            public boolean areAllItemsEnabled() {
+                return false;
+            }
+
+            @Override
+            public boolean isEnabled(int position) {
+                return false;
+            }
+
+            public long getItemId(int position) {
+                return position;
+            }
+
+            public Object getItem(int position) {
+                return mMessages.get(position);
+            }
+
+            public int getCount() {
+                return mMessages.size();
+            }
+
+            @Override
+            public boolean hasStableIds() {
+                return true;
+            }
+
+            /**
+             * Constructs a TwoLineListItem for the error at position.
+             */
+            public View getView(int position, View convertView, ViewGroup parent) {
+                View view;
+                ErrorConsoleMessage error = mMessages.get(position);
+
+                if (error == null) {
+                    return null;
+                }
+
+                if (convertView == null) {
+                    view = mInflater.inflate(android.R.layout.two_line_list_item, parent, false);
+                } else {
+                    view = convertView;
+                }
+
+                TextView headline = (TextView) view.findViewById(android.R.id.text1);
+                TextView subText = (TextView) view.findViewById(android.R.id.text2);
+                headline.setText(error.getSourceID() + ":" + error.getLineNumber());
+                subText.setText(error.getMessage());
+                return view;
+            }
+
+        }
+    }
+
+    /**
+     * This class holds the data for a single error message in the console.
+     */
+    private static class ErrorConsoleMessage {
+        private String mMessage;
+        private String mSourceID;
+        private int mLineNumber;
+
+        public ErrorConsoleMessage(String msg, String sourceID, int lineNumber) {
+            mMessage = msg;
+            mSourceID = sourceID;
+            mLineNumber = lineNumber;
+        }
+
+        public String getMessage() {
+            return mMessage;
+        }
+
+        public String getSourceID() {
+            return mSourceID;
+        }
+
+        public int getLineNumber() {
+            return mLineNumber;
+        }
+    }
+}
diff --git a/src/com/android/browser/FakeWebView.java b/src/com/android/browser/FakeWebView.java
deleted file mode 100644
index da5ef5f..0000000
--- a/src/com/android/browser/FakeWebView.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.
- */
-
- 
-package com.android.browser;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Picture;
-import android.util.AttributeSet;
-import android.view.View;
-import android.webkit.WebView;
-import android.widget.ImageView;
-
-import android.util.Log;
-
-/**
- *  This class is used by ImageAdapter to draw a representation of each tab. It 
- *  overrides ImageView so it can be used for the new tab image as well.
- */
-public class FakeWebView extends ImageView {
-    private TabControl.PickerData mPickerData;
-    private boolean        mUsesResource;
-
-    public FakeWebView(Context context) {
-        this(context, null);
-    }
-    
-    public FakeWebView(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-    
-    public FakeWebView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    @Override
-    protected void onDraw(Canvas canvas) {
-        if (mUsesResource) {
-            super.onDraw(canvas);
-        } else {
-            // Always draw white behind the picture just in case the picture
-            // draws nothing.
-            // FIXME: We used to draw white only when the WebView was null but
-            // sometimes the picture was empty. So now we always draw white. It
-            // would be nice to know if the picture is empty so we can avoid
-            // drawing white.
-            canvas.drawColor(Color.WHITE);
-            if (mPickerData != null) {
-                final Picture p = mPickerData.mPicture;
-                if (p != null) {
-                    canvas.save();
-                    float scale = getWidth() * mPickerData.mScale
-                            / mPickerData.mWidth;
-                    // Check for NaN and infinity.
-                    if (Float.isNaN(scale) || Float.isInfinite(scale)) {
-                        scale = 1.0f;
-                    }
-                    canvas.scale(scale, scale);
-                    canvas.translate(-mPickerData.mScrollX,
-                            -mPickerData.mScrollY);
-                    canvas.drawPicture(p);
-                    canvas.restore();
-                }
-            }
-        }
-    }
-    
-    @Override
-    public void setImageResource(int resId) {
-        mUsesResource = true;
-        mPickerData = null;
-        super.setImageResource(resId);
-    }
-
-    /**
-     *  Set a WebView for this FakeWebView to represent.
-     *  @param  t The tab whose picture and other data will be used in onDraw.
-     */
-    public void setTab(TabControl.Tab t) {
-        mUsesResource = false;
-        if (mPickerData != null) {
-            // Clear the old tab's view first
-            mPickerData.mFakeWebView = null;
-        }
-        mPickerData = null;
-        if (t != null && t.getPickerData() != null) {
-            mPickerData = t.getPickerData();
-            mPickerData.mFakeWebView = this;
-        }
-    }
-}
diff --git a/src/com/android/browser/FetchUrlMimeType.java b/src/com/android/browser/FetchUrlMimeType.java
index 8578643..0081d32 100644
--- a/src/com/android/browser/FetchUrlMimeType.java
+++ b/src/com/android/browser/FetchUrlMimeType.java
@@ -58,7 +58,7 @@
         mValues = values[0];
 
         // Check to make sure we have a URI to download
-        String uri = mValues.getAsString(Downloads.URI);
+        String uri = mValues.getAsString(Downloads.COLUMN_URI);
         if (uri == null || uri.length() == 0) {
             return null;
         }
@@ -66,21 +66,20 @@
         // User agent is likely to be null, though the AndroidHttpClient
         // seems ok with that.
         AndroidHttpClient client = AndroidHttpClient.newInstance(
-                mValues.getAsString(Downloads.USER_AGENT));
+                mValues.getAsString(Downloads.COLUMN_USER_AGENT));
         HttpHead request = new HttpHead(uri);
 
-        String cookie = mValues.getAsString(Downloads.COOKIE_DATA);
+        String cookie = mValues.getAsString(Downloads.COLUMN_COOKIE_DATA);
         if (cookie != null && cookie.length() > 0) {
             request.addHeader("Cookie", cookie);
         }
 
-        String referer = mValues.getAsString(Downloads.REFERER);
+        String referer = mValues.getAsString(Downloads.COLUMN_REFERER);
         if (referer != null && referer.length() > 0) {
             request.addHeader("Referer", referer);
         }
 
         HttpResponse response;
-        Boolean succeeded = true;
         String mimeType = null;
         try {
             response = client.execute(request);
@@ -111,19 +110,19 @@
    @Override
     public void onPostExecute(String mimeType) {
        if (mimeType != null) {
-           String url = mValues.getAsString(Downloads.URI);
+           String url = mValues.getAsString(Downloads.COLUMN_URI);
            if (mimeType.equalsIgnoreCase("text/plain") ||
                    mimeType.equalsIgnoreCase("application/octet-stream")) {
                String newMimeType =
                        MimeTypeMap.getSingleton().getMimeTypeFromExtension(
                            MimeTypeMap.getFileExtensionFromUrl(url));
                if (newMimeType != null) {
-                   mValues.put(Downloads.MIMETYPE, newMimeType);
+                   mValues.put(Downloads.COLUMN_MIME_TYPE, newMimeType);
                }
            }
            String filename = URLUtil.guessFileName(url,
                    null, mimeType);
-           mValues.put(Downloads.FILENAME_HINT, filename);
+           mValues.put(Downloads.COLUMN_FILE_NAME_HINT, filename);
        }
 
        // Start the download
diff --git a/src/com/android/browser/FindDialog.java b/src/com/android/browser/FindDialog.java
index 6e9574c..df212d0 100644
--- a/src/com/android/browser/FindDialog.java
+++ b/src/com/android/browser/FindDialog.java
@@ -42,7 +42,6 @@
     private BrowserActivity mBrowserActivity;
     
     // Views with which the user can interact.
-    private View            mOk;
     private EditText        mEditText;
     private View            mNextButton;
     private View            mPrevButton;
@@ -129,7 +128,6 @@
         
         button = findViewById(R.id.done);
         button.setOnClickListener(mFindCancelListener);
-        mOk = button;
         
         mMatches = (TextView) findViewById(R.id.matches);
         mMatchesView = findViewById(R.id.matches_view);
@@ -143,23 +141,14 @@
         mBrowserActivity.closeFind();
         mWebView.clearMatches();
     }
-    
+
     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
-        int code = event.getKeyCode();
-        boolean up = event.getAction() == KeyEvent.ACTION_UP;
-        switch (code) {
-            case KeyEvent.KEYCODE_DPAD_CENTER:
-            case KeyEvent.KEYCODE_ENTER:
-                if (!mEditText.hasFocus()) {
-                    break;
-                }
-                if (up) {
-                    findNext();
-                }
-                return true;
-            default:
-                break;
+        if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER
+                && event.getAction() == KeyEvent.ACTION_UP
+                && mEditText.hasFocus()) {
+            findNext();
+            return true;
         }
         return super.dispatchKeyEvent(event);
     }
@@ -205,6 +194,8 @@
             mMatchesView.setVisibility(View.INVISIBLE);
         } else {
             mMatchesView.setVisibility(View.VISIBLE);
+            mWebView.setFindDialogHeight(
+                getWindow().getDecorView().getHeight());
             int found = mWebView.findAll(find.toString());
             setMatchesFound(found);
             if (found < 2) {
diff --git a/src/com/android/browser/GearsBaseDialog.java b/src/com/android/browser/GearsBaseDialog.java
deleted file mode 100644
index 638ba27..0000000
--- a/src/com/android/browser/GearsBaseDialog.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.os.Handler;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.style.UnderlineSpan;
-import android.util.Log;
-import android.view.InflateException;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.lang.ClassCastException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * Base dialog class for gears
- */
-class GearsBaseDialog {
-
-  private static final String TAG = "GearsNativeDialog";
-  protected Handler mHandler;
-  protected Activity mActivity;
-  protected String mDialogArguments;
-
-  private Bitmap mIcon;
-  private final int MAX_ICON_SIZE = 64;
-  protected int mChoosenIconSize;
-
-  // Dialog closing types
-  public static final int CANCEL = 0;
-  public static final int ALWAYS_DENY = 1;
-  public static final int ALLOW = 2;
-  public static final int DENY = 3;
-  public static final int NEW_ICON = 4;
-  public static final int UPDATE_ICON = 5;
-  public static final int REQUEST_ICON = 6;
-  public static final int PAUSE_REQUEST_ICON = 7;
-  public static final int CLEAR_REQUEST_ICON = 8;
-
-  protected final String LOCAL_DATA_STRING = "localData";
-  protected final String LOCAL_STORAGE_STRING = "localStorage";
-  protected final String LOCATION_DATA_STRING = "locationData";
-
-  protected String mGearsVersion = "UNDEFINED";
-  protected boolean mDebug = false;
-
-  public GearsBaseDialog(Activity activity, Handler handler, String arguments) {
-    mActivity = activity;
-    mHandler = handler;
-    mDialogArguments = arguments;
-  }
-
-  Resources getResources() {
-    return mActivity.getResources();
-  }
-
-  Object getSystemService(String name) {
-    return mActivity.getSystemService(name);
-  }
-
-  View findViewById(int id) {
-    return mActivity.findViewById(id);
-  }
-
-  private String getString(int id) {
-    return mActivity.getString(id);
-  }
-
-  public void setDebug(boolean debug) {
-    mDebug = debug;
-  }
-
-  public void setGearsVersion(String version) {
-    mGearsVersion = version;
-  }
-
-  public String closeDialog(int closingType) {
-    return null;
-  }
-
-  /*
-   * Utility methods for setting up the dialogs elements
-   */
-
-  /**
-   * Inflate a given layout in a view (which has to be
-   * a ViewGroup, e.g. LinearLayout).
-   * This is used to share the basic dialog outline among
-   * the different dialog types.
-   */
-  void inflate(int layout, int viewID) {
-    LayoutInflater inflater = (LayoutInflater) getSystemService(
-        Context.LAYOUT_INFLATER_SERVICE);
-    View view = findViewById(viewID);
-    if (view != null) {
-      try {
-        ViewGroup viewGroup = (ViewGroup) view;
-        inflater.inflate(layout, viewGroup);
-      } catch (ClassCastException e) {
-        String msg = "exception, the view (" + view + ")";
-        msg += " is not a ViewGroup";
-        Log.e(TAG, msg, e);
-      } catch (InflateException e) {
-        Log.e(TAG, "exception while inflating the layout", e);
-      }
-    } else {
-      String msg = "problem, trying to inflate a non-existent view";
-      msg += " (" + viewID + ")";
-      Log.e(TAG, msg);
-    }
-  }
-
-  /**
-   * Button setup.
-   * Set the button's text and its listener. If the text resource's id
-   * is 0, makes the button invisible.
-   */
-  void setupButton(int buttonRscID,
-                   int rscString,
-                   View.OnClickListener listener,
-                   boolean isLink,
-                   boolean requestFocus) {
-    View view = findViewById(buttonRscID);
-    if (view == null) {
-      return;
-    }
-
-    Button button = (Button) view;
-
-    if (rscString == 0) {
-      button.setVisibility(View.GONE);
-    } else {
-      CharSequence text = getString(rscString);
-      button.setText(text);
-      button.setOnClickListener(listener);
-      if (isLink) {
-        displayAsLink(button);
-      }
-      if (requestFocus) {
-        button.requestFocus();
-      }
-    }
-  }
-
-  /**
-   * Button setup: as the above method, except that 'isLink' and
-   * 'requestFocus' default to false.
-   */
-  void setupButton(int buttonRsc, int rsc,
-                   View.OnClickListener listener) {
-    setupButton(buttonRsc, rsc, listener, false, false);
-  }
-
-  /**
-   * Utility method to setup the three dialog buttons.
-   */
-  void setupButtons(int alwaysDenyRsc, int allowRsc, int denyRsc) {
-    setupButton(R.id.button_alwaysdeny, alwaysDenyRsc,
-                new Button.OnClickListener() {
-                  public void onClick(View v) {
-                    mHandler.sendEmptyMessage(ALWAYS_DENY);
-                  }
-                });
-
-    setupButton(R.id.button_allow, allowRsc,
-                new Button.OnClickListener() {
-                  public void onClick(View v) {
-                    mHandler.sendEmptyMessage(ALLOW);
-                  }
-                });
-
-    setupButton(R.id.button_deny, denyRsc,
-                new Button.OnClickListener() {
-                  public void onClick(View v) {
-                    mHandler.sendEmptyMessage(DENY);
-                  }
-                });
-  }
-
-  /**
-   * Display a button as an HTML link. Remove the background, set the
-   * text color to R.color.dialog_link and draw an underline
-   */
-  void displayAsLink(Button button) {
-    if (button == null) {
-      return;
-    }
-
-    CharSequence text = button.getText();
-    button.setBackgroundDrawable(null);
-    int color = getResources().getColor(R.color.dialog_link);
-    button.setTextColor(color);
-    SpannableString str = new SpannableString(text);
-    str.setSpan(new UnderlineSpan(), 0, str.length(),
-                Spannable.SPAN_INCLUSIVE_INCLUSIVE);
-    button.setText(str);
-    button.setFocusable(false);
-  }
-
-  /**
-   * Utility method to set elements' text indicated in
-   * the dialogs' arguments.
-   */
-  void setLabel(JSONObject json, String name, int rsc) {
-    try {
-      if (json.has(name)) {
-        String text = json.getString(name);
-        View view = findViewById(rsc);
-        if (view != null && text != null) {
-          TextView textView = (TextView) view;
-          textView.setText(text);
-          textView.setVisibility(View.VISIBLE);
-        }
-      }
-    } catch (JSONException e) {
-      Log.e(TAG, "json exception", e);
-    }
-  }
-
-  /**
-   * Utility method to hide a view.
-   */
-  void hideView(View v, int rsc) {
-    if (rsc == 0) {
-      return;
-    }
-    View view;
-    if (v == null) {
-      view = findViewById(rsc);
-    } else {
-      view = v.findViewById(rsc);
-    }
-    if (view != null) {
-      view.setVisibility(View.GONE);
-    }
-  }
-
-  /**
-   * Utility method to show a view.
-   */
-  void showView(View v, int rsc) {
-    if (rsc == 0) {
-      return;
-    }
-    View view;
-    if (v == null) {
-      view = findViewById(rsc);
-    } else {
-      view = v.findViewById(rsc);
-    }
-    if (view != null) {
-      view.setVisibility(View.VISIBLE);
-    }
-  }
-
-  /**
-   * Utility method to set a text.
-   */
-  void setText(View v, int rsc, CharSequence text) {
-    if (rsc == 0) {
-      return;
-    }
-    View view = v.findViewById(rsc);
-    if (view != null) {
-      TextView textView = (TextView) view;
-      textView.setText(text);
-      textView.setVisibility(View.VISIBLE);
-    }
-  }
-
-  /**
-   * Utility method to set a text.
-   */
-  void setText(View v, int rsc, int txtRsc) {
-    if (rsc == 0) {
-      return;
-    }
-    View view = v.findViewById(rsc);
-    if (view != null) {
-      TextView textView = (TextView) view;
-      if (txtRsc == 0) {
-        textView.setVisibility(View.GONE);
-      } else {
-        CharSequence text = getString(txtRsc);
-        textView.setText(text);
-        textView.setVisibility(View.VISIBLE);
-      }
-    }
-  }
-
-  /**
-   * Utility class to download an icon in the background.
-   * Once done ask the UI thread to update the icon.
-   */
-  class IconDownload implements Runnable {
-    private String mUrlString;
-
-    IconDownload(String url) {
-      mUrlString = url;
-    }
-
-    public void run() {
-      if (mUrlString == null) {
-        return;
-      }
-      try {
-        URL url = new URL(mUrlString);
-        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-        connection.setDoInput(true);
-        connection.connect();
-        int length = connection.getContentLength();
-        InputStream is = connection.getInputStream();
-        Bitmap customIcon = BitmapFactory.decodeStream(is);
-        if (customIcon != null) {
-          mIcon = customIcon;
-          mHandler.sendEmptyMessage(UPDATE_ICON);
-        }
-      } catch (ClassCastException e) {
-        Log.e(TAG, "Class cast exception (" + mUrlString + ")", e);
-      } catch (MalformedURLException e) {
-        Log.e(TAG, "Malformed url (" + mUrlString + ") ", e);
-      } catch (IOException e) {
-        Log.e(TAG, "Exception downloading icon (" + mUrlString + ") ", e);
-      }
-    }
-  }
-
-  /**
-   * Utility method to update the icon.
-   * Called on the UI thread.
-   */
-  public void updateIcon() {
-    if (mIcon == null) {
-      return;
-    }
-    View view = findViewById(R.id.origin_icon);
-    if (view != null) {
-      ImageView imageView = (ImageView) view;
-      imageView.setMaxHeight(MAX_ICON_SIZE);
-      imageView.setMaxWidth(MAX_ICON_SIZE);
-      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
-      imageView.setImageBitmap(mIcon);
-      imageView.setVisibility(View.VISIBLE);
-    }
-  }
-
-  /**
-   * Utility method to download an icon from a url and set
-   * it to the GUI element R.id.origin_icon.
-   * It is used both in the shortcut dialog and the
-   * permission dialog.
-   * The actual download is done in the background via
-   * IconDownload; once the icon is downlowded the UI is updated
-   * via updateIcon().
-   * The icon size is included in the layout with the choosen
-   * size, although not displayed, to limit text reflow once
-   * the icon is received.
-   */
-  void downloadIcon(String url) {
-    if (url == null) {
-      return;
-    }
-    View view = findViewById(R.id.origin_icon);
-    if (view != null) {
-      view.setMinimumWidth(mChoosenIconSize);
-      view.setMinimumHeight(mChoosenIconSize);
-      view.setVisibility(View.INVISIBLE);
-    }
-    Thread thread = new Thread(new IconDownload(url));
-    thread.start();
-  }
-
-  /**
-   * Utility method that get the dialogMessage
-   * and icon and ask the setupDialog(message,icon)
-   * method to set the values.
-   */
-  public void setupDialog() {
-    TextView dialogMessage = null;
-    ImageView icon = null;
-
-    View view = findViewById(R.id.dialog_message);
-    if (view != null) {
-      dialogMessage = (TextView) view;
-    }
-
-    View iconView = findViewById(R.id.icon);
-    if (iconView != null) {
-      icon = (ImageView) iconView;
-    }
-
-    if ((dialogMessage != null) && (icon != null)) {
-      setupDialog(dialogMessage, icon);
-      dialogMessage.setVisibility(View.VISIBLE);
-    }
-  }
-
-  /*
-   * Set the message and icon of the dialog
-   */
-  public void setupDialog(TextView message, ImageView icon) {
-    message.setText(R.string.unrecognized_dialog_message);
-    icon.setImageResource(R.drawable.ic_dialog_menu_generic);
-    message.setVisibility(View.VISIBLE);
-  }
-
-  /**
-   * Setup the dialog
-   * By default, just display a simple message.
-   */
-  public void setup() {
-    setupButtons(0, 0, R.string.default_button);
-    setupDialog();
-  }
-
-  /**
-   * Method called when the back button is pressed,
-   * allowing the dialog to intercept the default behaviour.
-   */
-  public boolean handleBackButton() {
-    return false;
-  }
-
-  /**
-   * Returns the resource string of the notification displayed
-   * after the dialog. By default, does not return one.
-   */
-  public int notification() {
-    return 0;
-  }
-
-  /**
-   * If a secondary dialog (e.g. a confirmation dialog) is created,
-   * GearsNativeDialog will call this method.
-   */
-  public Dialog onCreateDialog(int id) {
-    // This should be redefined by subclasses as needed.
-    return null;
-  }
-
-}
diff --git a/src/com/android/browser/GearsNativeDialog.java b/src/com/android/browser/GearsNativeDialog.java
deleted file mode 100644
index b44ec2a..0000000
--- a/src/com/android/browser/GearsNativeDialog.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.Window;
-import android.widget.BaseAdapter;
-import android.widget.Toast;
-
-import android.webkit.gears.NativeDialog;
-
-import com.android.browser.GearsBaseDialog;
-import com.android.browser.GearsPermissionsDialog;
-import com.android.browser.GearsSettingsDialog;
-
-/**
- * Native dialog Activity used by gears
- * TODO: rename in GearsNativeDialogActivity
- * @hide
- */
-public class GearsNativeDialog extends Activity {
-
-  private static final String TAG = "GearsNativeDialog";
-
-  private String mDialogArguments;
-
-  private String mGearsVersion = null;
-
-  private boolean mDebug = false;
-
-  private int mDialogType;
-  private final int SETTINGS_DIALOG = 1;
-  private final int PERMISSION_DIALOG = 2;
-  private final int LOCATION_DIALOG = 3;
-
-  private final String VERSION_STRING = "version";
-  private final String SETTINGS_DIALOG_STRING = "settings_dialog";
-  private final String PERMISSION_DIALOG_STRING = "permissions_dialog";
-  private final String LOCATION_DIALOG_STRING = "locations_dialog";
-
-  private boolean mDialogDismissed = false;
-
-  GearsBaseDialog dialog;
-
-  // Handler for callbacks to the UI thread
-  final Handler mHandler = new Handler() {
-    public void handleMessage(Message msg) {
-      if (msg.what == GearsBaseDialog.NEW_ICON) {
-        BaseAdapter adapter = (BaseAdapter) msg.obj;
-        adapter.notifyDataSetChanged();
-      } else if (msg.what == GearsBaseDialog.UPDATE_ICON) {
-        dialog.updateIcon();
-      } else if (msg.what == GearsBaseDialog.ALWAYS_DENY) {
-        closeDialog(GearsBaseDialog.ALWAYS_DENY);
-      } else if (msg.what == GearsBaseDialog.ALLOW) {
-        closeDialog(GearsBaseDialog.ALLOW);
-      } else if (msg.what == GearsBaseDialog.DENY) {
-        closeDialog(GearsBaseDialog.DENY);
-      }
-      super.handleMessage(msg);
-    }
-  };
-
-  @Override
-  public void onCreate(Bundle icicle) {
-    getArguments();
-    if (mDialogType == SETTINGS_DIALOG) {
-      setTheme(android.R.style.Theme);
-    }
-    super.onCreate(icicle);
-    if (mDialogType != SETTINGS_DIALOG) {
-      requestWindowFeature(Window.FEATURE_NO_TITLE);
-      setContentView(R.layout.gears_dialog);
-    }
-
-    switch (mDialogType) {
-      case SETTINGS_DIALOG:
-        dialog = new GearsSettingsDialog(this, mHandler, mDialogArguments);
-        dialog.setGearsVersion(mGearsVersion);
-        break;
-      case PERMISSION_DIALOG:
-        dialog = new GearsPermissionsDialog(this, mHandler, mDialogArguments);
-        break;
-      case LOCATION_DIALOG:
-        dialog = new GearsPermissionsDialog(this, mHandler, mDialogArguments);
-        break;
-      default:
-        dialog = new GearsBaseDialog(this, mHandler, mDialogArguments);
-    }
-    dialog.setDebug(mDebug);
-    dialog.setup();
-  }
-
-  /**
-   * Get the arguments for the dialog
-   *
-   * The dialog needs a json string as an argument, as
-   * well as a dialogType. In debug mode the arguments
-   * are mocked.
-   */
-  private void getArguments() {
-    if (mDebug) {
-      mDialogType = LOCATION_DIALOG +1;
-      mockArguments();
-
-      return;
-    }
-
-    Intent intent = getIntent();
-    mDialogArguments = intent.getStringExtra("dialogArguments");
-    String dialogTypeString = intent.getStringExtra("dialogType");
-    if (dialogTypeString == null) {
-      return;
-    }
-
-    if (Browser.LOGV_ENABLED) {
-      Log.v(TAG, "dialogtype: " + dialogTypeString);
-    }
-
-    if (dialogTypeString.equalsIgnoreCase(SETTINGS_DIALOG_STRING)) {
-      mDialogType = SETTINGS_DIALOG;
-      mGearsVersion = intent.getStringExtra(VERSION_STRING);
-    } else if (dialogTypeString.equalsIgnoreCase(PERMISSION_DIALOG_STRING)) {
-      mDialogType = PERMISSION_DIALOG;
-    } else if (dialogTypeString.equalsIgnoreCase(LOCATION_DIALOG_STRING)) {
-      mDialogType = LOCATION_DIALOG;
-    }
-  }
-
-  /**
-   * Utility method for debugging the dialog.
-   *
-   * Set mock arguments.
-   */
-  private void mockArguments() {
-
-    String argumentsPermissions = "{ locale: \"en-US\", "
-        + "origin: \"http://www.google.com\", dialogType: \"localData\","
-        + "customIcon: \"http://google-gears.googlecode.com/"
-        + "svn/trunk/gears/test/manual/shortcuts/32.png\","
-        + "customName: \"My Application\","
-        + "customMessage: \"Press the button to enable my "
-        + "application to run offline!\" };";
-
-    String argumentsPermissions2 = "{ locale: \"en-US\", "
-        + "origin: \"http://www.google.com\", dialogType: \"localData\" };";
-
-    String argumentsLocation = "{ locale: \"en-US\", "
-        + "origin: \"http://www.google.com\", dialogType: \"locationData\","
-        + "customIcon: \"http://google-gears.googlecode.com/"
-        + "svn/trunk/gears/test/manual/shortcuts/32.png\","
-        + "customName: \"My Application\","
-        + "customMessage: \"Press the button to enable my "
-        + "application to run offline!\" };";
-
-    String argumentsSettings = "{ locale: \"en-US\", permissions: [ { "
-        + "name: \"http://www.google.com\", "
-        + "localStorage: { permissionState: 0 }, "
-        + "locationData: { permissionState: 1 } }, "
-        + "{ name: \"http://www.aaronboodman.com\", "
-        + "localStorage: { permissionState: 1 }, "
-        + "locationData: { permissionState: 2 } }, "
-        + "{ name: \"http://www.evil.org\", "
-        + "localStorage: { permissionState: 2 }, "
-        + "locationData: { permissionState: 2 } } ] }";
-
-    switch (mDialogType) {
-      case PERMISSION_DIALOG:
-        mDialogArguments = argumentsPermissions;
-        break;
-      case LOCATION_DIALOG:
-        mDialogArguments = argumentsLocation;
-        break;
-      case SETTINGS_DIALOG:
-        mDialogArguments = argumentsSettings;
-        break;
-    }
-  }
-
-  /**
-   * Close the dialog and set the return string value.
-   */
-  private void closeDialog(int closingType) {
-    String ret = dialog.closeDialog(closingType);
-
-    if (mDebug) {
-      Log.v(TAG, "closeDialog ret value: " + ret);
-    }
-
-    NativeDialog.closeDialog(ret);
-    notifyEndOfDialog();
-    finish();
-
-    // If the dialog sets a notification, we display it.
-    int notification = dialog.notification();
-    if (notification != 0) {
-      Toast toast = Toast.makeText(this, notification, Toast.LENGTH_LONG);
-      toast.setGravity(Gravity.BOTTOM, 0, 0);
-      toast.show();
-    }
-  }
-
-  @Override
-  public void onDestroy() {
-    super.onDestroy();
-    // In case we reach this point without
-    // notifying NativeDialog, we do it now.
-    if (!mDialogDismissed) {
-      notifyEndOfDialog();
-    }
-  }
-
-  @Override
-  public void onPause(){
-    super.onPause();
-    if (!mDialogDismissed) {
-      closeDialog(GearsBaseDialog.CANCEL);
-    }
-  }
-
-  /**
-   * Signal to NativeDialog that we are done.
-   */
-  private void notifyEndOfDialog() {
-    NativeDialog.signalFinishedDialog();
-    mDialogDismissed = true;
-  }
-
-  /**
-   * Intercepts the back key to immediately notify
-   * NativeDialog that we are done.
-   */
-  public boolean dispatchKeyEvent(KeyEvent event) {
-    if ((event.getKeyCode() == KeyEvent.KEYCODE_BACK)
-      && (event.getAction() == KeyEvent.ACTION_DOWN)) {
-      if (!dialog.handleBackButton()) {
-        // if the dialog doesn't do anything with the back button
-        closeDialog(GearsBaseDialog.CANCEL);
-      }
-      return true; // event consumed
-    }
-    return super.dispatchKeyEvent(event);
-  }
-
-  /**
-   * If the dialog call showDialog() on ourself, we let
-   * it handle the creation of this secondary dialog.
-   * It is used in GearsSettingsDialog, to create the confirmation
-   * dialog when the user click on "Remove this site from Gears"
-   */
-  @Override
-  protected Dialog onCreateDialog(int id) {
-    return dialog.onCreateDialog(id);
-  }
-
-}
diff --git a/src/com/android/browser/GearsPermissions.java b/src/com/android/browser/GearsPermissions.java
deleted file mode 100644
index e48e045..0000000
--- a/src/com/android/browser/GearsPermissions.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.util.Log;
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * The permission mechanism works the following way:
- *
- * PermissionType allows to define a type of permission
- *   (e.g. localStorage/locationData), storing a name and a set of
- *   resource ids corresponding to the GUI resources.
- *
- * Permission defines an actual permission instance, with a type and a value.
- *
- * OriginPermissions holds an origin with a set of Permission objects
- */
-class GearsPermissions {
-
-  private static final String TAG = "GearsPermissions";
-
-  /**
-   * Defines a type of permission
-   *
-   * Store the permission's name (used in the json result)
-   * Graphically, each permission is a label followed by two radio buttons.
-   * We store the resources ids here.
-   */
-  public static class PermissionType {
-    public static final int PERMISSION_NOT_SET = 0;
-    public static final int PERMISSION_ALLOWED = 1;
-    public static final int PERMISSION_DENIED = 2;
-
-    String mName;
-    int mTitleRsc;
-    int mSubtitleOnRsc;
-    int mSubtitleOffRsc;
-
-    PermissionType(String name) {
-      mName = name;
-    }
-
-    public void setResources(int titleRsc,
-        int subtitleOnRsc, int subtitleOffRsc) {
-      mTitleRsc = titleRsc;
-      mSubtitleOnRsc = subtitleOnRsc;
-      mSubtitleOffRsc = subtitleOffRsc;
-    }
-
-    public String getName() {
-      return mName;
-    }
-
-    public int getTitleRsc() {
-      return mTitleRsc;
-    }
-
-    public int getSubtitleOnRsc() {
-      return mSubtitleOnRsc;
-    }
-
-    public int getSubtitleOffRsc() {
-      return mSubtitleOffRsc;
-    }
-
-  }
-
-  /**
-   * Simple class to store an instance of a permission
-   *
-   * i.e. a permission type and a value
-   * Value can be either PERMISSION_NOT_SET,
-   * PERMISSION_ALLOWED or PERMISSION_DENIED
-   * (defined in PermissionType).
-   */
-  public static class Permission {
-    PermissionType mType;
-    int mValue;
-
-    Permission(PermissionType type, int value) {
-      mType = type;
-      mValue = value;
-    }
-
-    Permission(PermissionType type) {
-      mType = type;
-      mValue = 0;
-    }
-
-    public PermissionType getType() {
-      return mType;
-    }
-
-    public void setValue(int value) {
-      mValue = value;
-    }
-
-    public int getValue() {
-      return mValue;
-    }
-  }
-
-  /**
-   * Interface used by the GearsNativeDialog implementation
-   * to listen to changes in the permissions.
-   */
-  public interface PermissionsChangesListener {
-    public boolean setPermission(PermissionType type, int perm);
-  }
-
-  /**
-   * Holds the model for an origin -- each origin has a set of
-   * permissions.
-   */
-  public static class OriginPermissions {
-    HashMap<PermissionType, Permission> mPermissions;
-    String mOrigin;
-    public static PermissionsChangesListener mListener;
-
-    public static void setListener(PermissionsChangesListener listener) {
-      mListener = listener;
-    }
-
-    OriginPermissions(String anOrigin) {
-      mOrigin = anOrigin;
-      mPermissions = new HashMap<PermissionType, Permission>();
-    }
-
-    OriginPermissions(OriginPermissions perms) {
-      mOrigin = perms.getOrigin();
-      mPermissions = new HashMap<PermissionType, Permission>();
-      HashMap<PermissionType, Permission> permissions = perms.getPermissions();
-      Iterator<PermissionType> iterator = permissions.keySet().iterator();
-      while (iterator.hasNext()) {
-        Permission permission = permissions.get(iterator.next());
-        int value = permission.getValue();
-        setPermission(permission.getType(), value);
-      }
-    }
-
-    public String getOrigin() {
-      return mOrigin;
-    }
-
-    public HashMap<PermissionType, Permission> getPermissions() {
-      return mPermissions;
-    }
-
-    public int getPermission(PermissionType type) {
-      return mPermissions.get(type).getValue();
-    }
-
-    public void setPermission(PermissionType type, int perm) {
-      if (mPermissions.get(type) == null) {
-        Permission permission = new Permission(type, perm);
-        mPermissions.put(type, permission);
-        return;
-      }
-
-      if (mListener != null) {
-        mListener.setPermission(type, perm);
-      }
-
-      mPermissions.get(type).setValue(perm);
-    }
-
-    public void print() {
-      Log.v(TAG, "Permissions for " + mOrigin);
-      Iterator<PermissionType> iterator = mPermissions.keySet().iterator();
-      while (iterator.hasNext()) {
-        Permission permission = mPermissions.get(iterator.next());
-        String name = permission.getType().getName();
-        int value = permission.getValue();
-        Log.v(TAG, "  " + name + ": " + value);
-      }
-    }
-  }
-
-}
diff --git a/src/com/android/browser/GearsPermissionsDialog.java b/src/com/android/browser/GearsPermissionsDialog.java
deleted file mode 100644
index dbec363..0000000
--- a/src/com/android/browser/GearsPermissionsDialog.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.Activity;
-import android.os.Handler;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * Gears permission dialog
- */
-class GearsPermissionsDialog extends GearsBaseDialog {
-
-  private static final String TAG = "GearsPermissionsDialog";
-
-  private String mDialogType;
-  private int mNotification = 0;
-
-  public GearsPermissionsDialog(Activity activity,
-                                Handler handler,
-                                String arguments) {
-    super (activity, handler, arguments);
-  }
-
-  public void setup() {
-    inflate(R.layout.gears_dialog_permission, R.id.panel_content);
-    setupButtons(R.string.permission_button_alwaysdeny,
-                 R.string.permission_button_allow,
-                 R.string.permission_button_deny);
-
-    try {
-      JSONObject json = new JSONObject(mDialogArguments);
-
-      if (json.has("dialogType")) {
-        mDialogType = json.getString("dialogType");
-        setupDialog();
-      }
-
-      if (!json.has("customName")) {
-        setLabel(json, "origin", R.id.origin_title);
-        View titleView = findViewById(R.id.origin_title);
-        if (titleView != null) {
-          TextView title = (TextView) titleView;
-          title.setGravity(Gravity.CENTER);
-        }
-      } else {
-        setLabel(json, "customName", R.id.origin_title);
-        setLabel(json, "origin", R.id.origin_subtitle);
-        setLabel(json, "customMessage", R.id.origin_message);
-      }
-
-      if (json.has("customIcon")) {
-        String iconUrl = json.getString("customIcon");
-        mChoosenIconSize = 32;
-        downloadIcon(iconUrl);
-      }
-
-      View msg = findViewById(R.id.permission_dialog_message);
-      if (msg != null) {
-        TextView dialogMessage = (TextView) msg;
-        if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
-          dialogMessage.setText(R.string.query_data_message);
-        } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
-          dialogMessage.setText(R.string.location_message);
-        }
-      }
-
-    } catch (JSONException e) {
-      Log.e(TAG, "JSON exception ", e);
-    }
-  }
-
-  public void setupDialog(TextView message, ImageView icon) {
-    if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
-      message.setText(R.string.query_data_prompt);
-      icon.setImageResource(android.R.drawable.ic_popup_disk_full);
-    } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
-      message.setText(R.string.location_prompt);
-      icon.setImageResource(R.drawable.ic_dialog_menu_generic);
-    }
-  }
-
-  public String closeDialog(int closingType) {
-    String ret = null;
-    switch (closingType) {
-      case ALWAYS_DENY:
-        ret = "{\"allow\": false, \"permanently\": true }";
-        if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
-          mNotification = R.string.storage_notification_alwaysdeny;
-        } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
-          mNotification = R.string.location_notification_alwaysdeny;
-        }
-        break;
-      case ALLOW:
-        ret = "{\"allow\": true, \"permanently\": true }";
-        if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
-          mNotification = R.string.storage_notification;
-        } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
-          mNotification = R.string.location_notification;
-        }
-        break;
-      case DENY:
-        ret = "{\"allow\": false, \"permanently\": false }";
-        break;
-    }
-    return ret;
-  }
-
-  public int notification() {
-    return mNotification;
-  }
-}
diff --git a/src/com/android/browser/GearsSettingsDialog.java b/src/com/android/browser/GearsSettingsDialog.java
deleted file mode 100644
index 5ea2342..0000000
--- a/src/com/android/browser/GearsSettingsDialog.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.os.Handler;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.BaseAdapter;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.ImageView;
-import android.widget.ListAdapter;
-import android.widget.ListView;
-import android.widget.RadioButton;
-import android.widget.TextView;
-
-import com.android.browser.GearsPermissions.OriginPermissions;
-import com.android.browser.GearsPermissions.Permission;
-import com.android.browser.GearsPermissions.PermissionsChangesListener;
-import com.android.browser.GearsPermissions.PermissionType;
-
-import java.util.Vector;
-import java.util.List;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-/**
- * Gears Settings dialog
- */
-class GearsSettingsDialog extends GearsBaseDialog
-    implements PermissionsChangesListener {
-
-  private static final String TAG = "GearsPermissionsDialog";
-  private Vector<OriginPermissions> mSitesPermissions = null;
-  private Vector<OriginPermissions> mOriginalPermissions = null;
-  private Vector<OriginPermissions> mCurrentPermissions = null;
-
-  private Vector<PermissionType> mPermissions;
-  private static final int CONFIRMATION_REMOVE_DIALOG = 1;
-
-  // We declare the permissions globally to simplify the code
-  private final PermissionType LOCAL_STORAGE =
-      new PermissionType(LOCAL_STORAGE_STRING);
-  private final PermissionType LOCATION_DATA =
-      new PermissionType(LOCATION_DATA_STRING);
-
-  private boolean mChanges = false;
-
-  SettingsAdapter mListAdapter;
-
-  public GearsSettingsDialog(Activity activity,
-                             Handler handler,
-                             String arguments) {
-    super (activity, handler, arguments);
-    activity.setContentView(R.layout.gears_settings);
-  }
-
-  public void setup() {
-    // First let's add the permissions' resources
-    LOCAL_STORAGE.setResources(R.string.settings_storage_title,
-                               R.string.settings_storage_subtitle_on,
-                               R.string.settings_storage_subtitle_off);
-    LOCATION_DATA.setResources(R.string.settings_location_title,
-                               R.string.settings_location_subtitle_on,
-                               R.string.settings_location_subtitle_off);
-    // add the permissions to the list of permissions.
-    mPermissions = new Vector<PermissionType>();
-    mPermissions.add(LOCAL_STORAGE);
-    mPermissions.add(LOCATION_DATA);
-    OriginPermissions.setListener(this);
-
-
-    setupDialog();
-
-    // We manage the permissions using three vectors, mSitesPermissions,
-    // mOriginalPermissions and mCurrentPermissions.
-    // The dialog's arguments are parsed and a list of permissions is
-    // generated and stored in those three vectors.
-    // mOriginalPermissions is a separate copy and will not be modified;
-    // mSitesPermissions contains the current permissions _only_ --
-    // if an origin is removed, it is also removed from mSitesPermissions.
-    // Finally, mCurrentPermissions contains the current permissions and
-    // is a clone of mSitesPermissions, but removed sites aren't removed,
-    // their permissions are simply set to PERMISSION_NOT_SET. This
-    // allows us to easily generate the final difference between the
-    // original permissions and the final permissions, while directly
-    // using mSitesPermissions for the listView adapter (SettingsAdapter).
-
-    mSitesPermissions = new Vector<OriginPermissions>();
-    mOriginalPermissions = new Vector<OriginPermissions>();
-
-    try {
-      JSONObject json = new JSONObject(mDialogArguments);
-      if (json.has("permissions")) {
-        JSONArray jsonArray = json.getJSONArray("permissions");
-        for (int i = 0; i < jsonArray.length(); i++) {
-          JSONObject infos = jsonArray.getJSONObject(i);
-          String name = null;
-          int localStorage = PermissionType.PERMISSION_NOT_SET;
-          int locationData = PermissionType.PERMISSION_NOT_SET;
-          if (infos.has("name")) {
-            name = infos.getString("name");
-          }
-          if (infos.has(LOCAL_STORAGE_STRING)) {
-            JSONObject perm = infos.getJSONObject(LOCAL_STORAGE_STRING);
-            if (perm.has("permissionState")) {
-              localStorage = perm.getInt("permissionState");
-            }
-          }
-          if (infos.has(LOCATION_DATA_STRING)) {
-            JSONObject perm = infos.getJSONObject(LOCATION_DATA_STRING);
-            if (perm.has("permissionState")) {
-              locationData = perm.getInt("permissionState");
-            }
-          }
-          OriginPermissions perms = new OriginPermissions(name);
-          perms.setPermission(LOCAL_STORAGE, localStorage);
-          perms.setPermission(LOCATION_DATA, locationData);
-
-          mSitesPermissions.add(perms);
-          mOriginalPermissions.add(new OriginPermissions(perms));
-        }
-      }
-    } catch (JSONException e) {
-      Log.e(TAG, "JSON exception ", e);
-    }
-    mCurrentPermissions = (Vector<OriginPermissions>)mSitesPermissions.clone();
-
-    View listView = findViewById(R.id.sites_list);
-    if (listView != null) {
-      ListView list = (ListView) listView;
-      mListAdapter = new SettingsAdapter(mActivity, mSitesPermissions);
-      list.setAdapter(mListAdapter);
-      list.setScrollBarStyle(android.view.View.SCROLLBARS_OUTSIDE_INSET);
-      list.setOnItemClickListener(mListAdapter);
-    }
-    if (mDebug) {
-      printPermissions();
-    }
-  }
-
-  private void setMainTitle() {
-    String windowTitle = mActivity.getString(R.string.pref_extras_gears_settings);
-    mActivity.setTitle(windowTitle);
-  }
-
-  public void setupDialog() {
-    setMainTitle();
-  }
-
-  /**
-   * GearsPermissions.PermissionsChangesListener delegate
-   */
-  public boolean setPermission(PermissionType type, int perm) {
-    if (mChanges == false) {
-      mChanges = true;
-    }
-    return mChanges;
-  }
-
-  public boolean handleBackButton() {
-    return mListAdapter.backButtonPressed();
-  }
-
-  /**
-   * We use this to create a confirmation dialog when the user
-   * clicks on "remove this site from gears"
-   */
-  public Dialog onCreateDialog(int id) {
-    return new AlertDialog.Builder(mActivity)
-        .setTitle(R.string.settings_confirmation_remove_title)
-        .setMessage(R.string.settings_confirmation_remove)
-        .setPositiveButton(android.R.string.ok,
-                           new AlertDialog.OnClickListener() {
-          public void onClick(DialogInterface dlg, int which) {
-            mListAdapter.removeCurrentSite();
-          }
-        })
-        .setNegativeButton(android.R.string.cancel, null)
-        .setIcon(android.R.drawable.ic_dialog_alert)
-        .create();
-  }
-
-  /**
-   * Adapter class for the list view in the settings dialog
-   *
-   * We first display a list of all the origins (sites), or
-   * a message saying that no permission is set if the list is empty.
-   * When the user click on one of the origin, we then display
-   * the list of the permissions existing for that origin.
-   * Each permission can be either allowed or denied by clicking
-   * on the checkbox.
-   * The last row is a special case, allowing to remove the entire origin.
-   */
-  class SettingsAdapter extends BaseAdapter
-      implements AdapterView.OnItemClickListener {
-    private Activity mContext;
-    private List mItems;
-    private OriginPermissions mCurrentSite;
-    private Vector mCurrentPermissions;
-    private int MAX_ROW_HEIGHT = 64;
-
-    SettingsAdapter(Activity context, List items) {
-      mContext = context;
-      mItems = items;
-      mCurrentSite = null;
-    }
-
-    public int getCount() {
-      if (mCurrentSite == null) {
-        int size = mItems.size();
-        if (size == 0) {
-          return 1;
-        } else {
-          return size;
-        }
-      }
-      return mCurrentPermissions.size() + 1;
-    }
-
-    public long getItemId(int position) {
-      return position;
-    }
-
-    private String shortName(String url) {
-        // We remove the http and https prefix
-        if (url.startsWith("http://")) {
-          return url.substring(7);
-        }
-        if (url.startsWith("https://")) {
-          return url.substring(8);
-        }
-        return url;
-    }
-
-    public Object getItem(int position) {
-      if (mCurrentSite == null) {
-        if (mItems.size() == 0) {
-          return null;
-        } else {
-          return mItems.get(position);
-        }
-      }
-      return mCurrentPermissions.get(position);
-    }
-
-    public View getView(int position, View convertView, ViewGroup parent) {
-      View row = convertView;
-      if (row == null) { // no cached view, we create one
-        LayoutInflater inflater = (LayoutInflater) getSystemService(
-            Context.LAYOUT_INFLATER_SERVICE);
-        row = inflater.inflate(R.layout.gears_settings_row, null);
-      }
-      row.setMinimumHeight(MAX_ROW_HEIGHT);
-
-      if (mCurrentSite == null) {
-        if (mItems.size() == 0) {
-          hideView(row, R.id.title);
-          hideView(row, R.id.subtitle);
-          hideView(row, R.id.checkbox);
-          hideView(row, R.id.icon);
-          setText(row, R.id.info, R.string.settings_empty);
-        } else {
-          hideView(row, R.id.subtitle);
-          hideView(row, R.id.info);
-          hideView(row, R.id.checkbox);
-          OriginPermissions perms = (OriginPermissions) mItems.get(position);
-          setText(row, R.id.title, shortName(perms.getOrigin()));
-          showView(row, R.id.icon);
-        }
-      } else {
-        if (position == getCount() - 1) {
-          // last position: "remove this site from gears"
-          hideView(row, R.id.subtitle);
-          hideView(row, R.id.info);
-          hideView(row, R.id.checkbox);
-          hideView(row, R.id.icon);
-          setText(row, R.id.title, R.string.settings_remove_site);
-        } else {
-          hideView(row, R.id.info);
-          hideView(row, R.id.icon);
-          showView(row, R.id.checkbox);
-
-          PermissionType type =
-              (PermissionType) mCurrentPermissions.get(position);
-          setText(row, R.id.title, type.getTitleRsc());
-
-          View checkboxView = row.findViewById(R.id.checkbox);
-          if (checkboxView != null) {
-            CheckBox checkbox = (CheckBox) checkboxView;
-            int perm = mCurrentSite.getPermission(type);
-            if (perm == PermissionType.PERMISSION_DENIED) {
-              setText(row, R.id.subtitle, type.getSubtitleOffRsc());
-              checkbox.setChecked(false);
-            } else {
-              setText(row, R.id.subtitle, type.getSubtitleOnRsc());
-              checkbox.setChecked(true);
-            }
-          }
-        }
-      }
-      return row;
-    }
-
-    public void removeCurrentSite() {
-      mCurrentSite.setPermission(LOCAL_STORAGE,
-                                 PermissionType.PERMISSION_NOT_SET);
-      mCurrentSite.setPermission(LOCATION_DATA,
-                                 PermissionType.PERMISSION_NOT_SET);
-      mSitesPermissions.remove(mCurrentSite);
-      mCurrentSite = null;
-      setMainTitle();
-      notifyDataSetChanged();
-    }
-
-    public void onItemClick(AdapterView<?> parent,
-                            View view,
-                            int position,
-                            long id) {
-      if (mItems.size() == 0) {
-        return;
-      }
-      if (mCurrentSite == null) {
-         mCurrentSite = (OriginPermissions) mItems.get(position);
-         mCurrentPermissions = new Vector();
-         for (int i = 0; i < mPermissions.size(); i++) {
-           PermissionType type = mPermissions.get(i);
-           int perm = mCurrentSite.getPermission(type);
-           if (perm != PermissionType.PERMISSION_NOT_SET) {
-             mCurrentPermissions.add(type);
-           }
-         }
-         mContext.setTitle(shortName(mCurrentSite.getOrigin()));
-      } else {
-        if (position == getCount() - 1) { // last item (remove site)
-          // Ask the user to confirm
-          // If yes, removeCurrentSite() will be called via the dialog callback.
-          mActivity.showDialog(CONFIRMATION_REMOVE_DIALOG);
-        } else {
-          PermissionType type =
-              (PermissionType) mCurrentPermissions.get(position);
-          if (mCurrentSite.getPermission(type) ==
-              PermissionType.PERMISSION_ALLOWED) {
-            mCurrentSite.setPermission(type, PermissionType.PERMISSION_DENIED);
-          } else {
-            mCurrentSite.setPermission(type, PermissionType.PERMISSION_ALLOWED);
-          }
-        }
-      }
-      notifyDataSetChanged();
-    }
-
-    public boolean backButtonPressed() {
-      if (mCurrentSite != null) { // we intercept the back button
-        mCurrentSite = null;
-        setMainTitle();
-        notifyDataSetChanged();
-        return true;
-      }
-      return false;
-    }
-
-  }
-
-  /**
-   * Utility method used in debug mode to print the list of
-   * permissions (original values and current values).
-   */
-  public void printPermissions() {
-    Log.v(TAG, "Original Permissions: ");
-    for (int i = 0; i < mOriginalPermissions.size(); i++) {
-      OriginPermissions p = mOriginalPermissions.get(i);
-      p.print();
-    }
-    Log.v(TAG, "Current Permissions: ");
-    for (int i = 0; i < mSitesPermissions.size(); i++) {
-      OriginPermissions p = mSitesPermissions.get(i);
-      p.print();
-    }
-  }
-
-  /**
-   * Computes the difference between the original permissions and the
-   * current ones. Returns a json-formatted string.
-   * It is used by the Settings dialog.
-   */
-  public String computeDiff(boolean modif) {
-    String ret = null;
-    try {
-      JSONObject results = new JSONObject();
-      JSONArray permissions = new JSONArray();
-
-      for (int i = 0; modif && i < mOriginalPermissions.size(); i++) {
-        OriginPermissions original = mOriginalPermissions.get(i);
-        OriginPermissions current = mCurrentPermissions.get(i);
-        JSONObject permission = new JSONObject();
-        boolean modifications = false;
-
-        for (int j = 0; j < mPermissions.size(); j++) {
-          PermissionType type = mPermissions.get(j);
-
-          if (current.getPermission(type) != original.getPermission(type)) {
-            JSONObject state = new JSONObject();
-            state.put("permissionState", current.getPermission(type));
-            permission.put(type.getName(), state);
-            modifications = true;
-          }
-        }
-
-        if (modifications) {
-          permission.put("name", current.getOrigin());
-          permissions.put(permission);
-        }
-      }
-      results.put("modifiedOrigins", permissions);
-      ret = results.toString();
-    } catch (JSONException e) {
-      Log.e(TAG, "JSON exception ", e);
-    }
-    return ret;
-  }
-
-  public String closeDialog(int closingType) {
-    String ret = computeDiff(mChanges);
-
-    if (mDebug) {
-      printPermissions();
-    }
-
-    return ret;
-  }
-
-}
diff --git a/src/com/android/browser/GeolocationPermissionsPrompt.java b/src/com/android/browser/GeolocationPermissionsPrompt.java
new file mode 100755
index 0000000..a21bc3e
--- /dev/null
+++ b/src/com/android/browser/GeolocationPermissionsPrompt.java
@@ -0,0 +1,120 @@
+/*
+ * 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.content.Context;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.webkit.WebView;
+import android.webkit.GeolocationPermissions;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+public class GeolocationPermissionsPrompt extends LinearLayout {
+    private LinearLayout mInner;
+    private TextView mMessage;
+    private Button mShareButton;
+    private Button mDontShareButton;
+    private CheckBox mRemember;
+    private GeolocationPermissions.Callback mCallback;
+    private String mOrigin;
+
+    public GeolocationPermissionsPrompt(Context context) {
+        this(context, null);
+    }
+
+    public GeolocationPermissionsPrompt(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        LayoutInflater factory = LayoutInflater.from(context);
+        factory.inflate(R.layout.geolocation_permissions_prompt, this);
+
+        mInner = (LinearLayout) findViewById(R.id.inner);
+        mMessage = (TextView) findViewById(R.id.message);
+        mShareButton = (Button) findViewById(R.id.share_button);
+        mDontShareButton = (Button) findViewById(R.id.dont_share_button);
+        mRemember = (CheckBox) findViewById(R.id.remember);
+        setButtonClickListeners();
+    }
+
+    /**
+     * Shows the prompt for the given origin. When the user clicks on one of
+     * the buttons, the supplied callback is be called.
+     */
+    public void show(String origin, GeolocationPermissions.Callback callback) {
+        mOrigin = origin;
+        mCallback = callback;
+        Uri uri = Uri.parse(mOrigin);
+        setMessage("http".equals(uri.getScheme()) ?  mOrigin.substring(7) : mOrigin);
+        // The checkbox should always be intially checked.
+        mRemember.setChecked(true);
+        showDialog(true);
+    }
+
+    /**
+     * Hides the prompt.
+     */
+    public void hide() {
+        showDialog(false);
+    }
+
+    /**
+     * Sets the on click listeners for the buttons.
+     */
+    private void setButtonClickListeners() {
+        final GeolocationPermissionsPrompt me = this;
+        mShareButton.setOnClickListener(new View.OnClickListener() {
+            public void onClick(View v) {
+                me.handleButtonClick(true);
+            }
+        });
+        mDontShareButton.setOnClickListener(new View.OnClickListener() {
+            public void onClick(View v) {
+                me.handleButtonClick(false);
+            }
+        });
+    }
+
+    /**
+     * Handles a click on one the buttons by invoking the callback.
+     */
+    private void handleButtonClick(boolean allow) {
+        boolean remember = mRemember.isChecked();
+        showDialog(false);
+        mCallback.invoke(mOrigin, allow, remember);
+    }
+
+    /**
+     * Sets the prompt's message.
+     */
+    private void setMessage(CharSequence origin) {
+        mMessage.setText(String.format(
+            getResources().getString(R.string.geolocation_permissions_prompt_message),
+            origin));
+    }
+
+    /**
+     * Shows or hides the prompt.
+     */
+    private void showDialog(boolean shown) {
+        mInner.setVisibility(shown ? View.VISIBLE : View.GONE);
+    }
+}
diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java
index 55e43f0..51cb026 100644
--- a/src/com/android/browser/HistoryItem.java
+++ b/src/com/android/browser/HistoryItem.java
@@ -17,23 +17,13 @@
  
 package com.android.browser;
 
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
 import android.content.Context;
-import android.database.Cursor;
 import android.graphics.Bitmap;
-import android.net.Uri;
 import android.provider.Browser;
-import android.util.Log;
 import android.view.View;
-import android.webkit.WebIconDatabase;
 import android.widget.CompoundButton;
 import android.widget.ImageView;
 import android.widget.TextView;
-import android.widget.Toast;
-
-import java.util.Date;
 
 /**
  *  Layout representing a history item in the classic history viewer.
@@ -54,61 +44,18 @@
         mListener = new CompoundButton.OnCheckedChangeListener() {
             public void onCheckedChanged(CompoundButton buttonView,
                     boolean isChecked) {
-                ContentResolver cr = mContext.getContentResolver();
-                Cursor cursor = cr.query(
-                        Browser.BOOKMARKS_URI,
-                        Browser.HISTORY_PROJECTION,
-                        "url = ?",
-                        new String[] { mUrl },
-                        null);
-                boolean first = cursor.moveToFirst();
-                // Should be in the database no matter what
-                if (!first) {
-                    throw new AssertionError("URL is not in the database!");
-                }
                 if (isChecked) {
-                    // Add to bookmarks
-                    // FIXME: Share code with AddBookmarkPage.java
-                    ContentValues map = new ContentValues();
-                    map.put(Browser.BookmarkColumns.CREATED,
-                            new Date().getTime());
-                    map.put(Browser.BookmarkColumns.TITLE, getName());
-                    map.put(Browser.BookmarkColumns.BOOKMARK, 1);
-                    try {
-                        cr.update(Browser.BOOKMARKS_URI, map, 
-                                "_id = " + cursor.getInt(0), null);
-                    } catch (IllegalStateException e) {
-                        Log.e("HistoryItem", "no database!");
-                    }
-                    WebIconDatabase.getInstance().retainIconForPageUrl(mUrl);
-                    // catch IllegalStateException?
-                    Toast.makeText(mContext, R.string.added_to_bookmarks,
-                            Toast.LENGTH_LONG).show();
+                    Bookmarks.addBookmark(mContext,
+                            mContext.getContentResolver(), mUrl, getName(), null, true);
                 } else {
-                    // Remove from bookmarks
-                    // FIXME: This code should be shared with
-                    // BrowserBookmarksAdapter.java
-                    WebIconDatabase.getInstance().releaseIconForPageUrl(mUrl);
-                    Uri uri = ContentUris.withAppendedId(Browser.BOOKMARKS_URI,
-                            cursor.getInt(Browser.HISTORY_PROJECTION_ID_INDEX));
-                    // It is no longer a bookmark, but it is still a visited
-                    // site.
-                    ContentValues values = new ContentValues();
-                    values.put(Browser.BookmarkColumns.BOOKMARK, 0);
-                    try {
-                        cr.update(uri, values, null, null);
-                    } catch (IllegalStateException e) {
-                        Log.e("HistoryItem", "no database!");
-                    }
-                    Toast.makeText(mContext, R.string.removed_from_bookmarks,
-                            Toast.LENGTH_LONG).show();
+                    Bookmarks.removeFromBookmarks(mContext,
+                            mContext.getContentResolver(), mUrl, getName());
                 }
-                cursor.deactivate();
             }
         };
     }
     
-    void copyTo(HistoryItem item) {
+    /* package */ void copyTo(HistoryItem item) {
         item.mTextView.setText(mTextView.getText());
         item.mUrlText.setText(mUrlText.getText());
         item.setIsBookmark(mStar.isChecked());
@@ -116,10 +63,17 @@
     }
 
     /**
+     * Whether or not this item represents a bookmarked site
+     */
+    /* package */ boolean isBookmark() {
+        return mStar.isChecked();
+    }
+
+    /**
      *  Set whether or not this represents a bookmark, and make sure the star
      *  behaves appropriately.
      */
-    void setIsBookmark(boolean isBookmark) {
+    /* package */ void setIsBookmark(boolean isBookmark) {
         mStar.setOnCheckedChangeListener(null);
         mStar.setChecked(isBookmark);
         mStar.setOnCheckedChangeListener(mListener);
diff --git a/src/com/android/browser/ImageAdapter.java b/src/com/android/browser/ImageAdapter.java
deleted file mode 100644
index f95753a..0000000
--- a/src/com/android/browser/ImageAdapter.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.database.DataSetObserver;
-import android.graphics.Color;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.LayoutInflater;
-import android.widget.ImageView;
-import android.widget.ListAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-
-/**
- * Adapter used by ImageGrid.
- */
-public class ImageAdapter implements ListAdapter {
-    
-    ArrayList<TabControl.Tab> mItems;  // Items shown in the grid
-    private ArrayList<DataSetObserver> mDataObservers; // Data change listeners
-    private Context mContext;  // Context to use to inflate views
-    private boolean mMaxedOut;
-    private ImageGrid mImageGrid;
-    private boolean mIsLive;
-    private int mTabHeight;
-
-    ImageAdapter(Context context, ImageGrid grid, boolean live) {
-        mContext = context;
-        mIsLive = live;
-        mItems = new ArrayList<TabControl.Tab>();
-        mImageGrid = grid;
-        mDataObservers = new ArrayList<DataSetObserver>();
-    }
-
-    void heightChanged(int newHeight) {
-        mTabHeight = newHeight;
-    }
-
-    /**
-     *  Whether the adapter is at its limit, determined by TabControl.MAX_TABS
-     *
-     *  @return True if the number of Tabs represented in this Adapter is at its
-     *          maximum.
-     */
-    public boolean maxedOut() {
-        return mMaxedOut;
-    }
-
-    /**
-     * Clear the internal WebViews and remove their picture listeners.
-     */
-    public void clear() {
-        mItems.clear();
-        notifyObservers();
-    }
-
-    /**
-     * Add a new window web page to the grid
-     * 
-     * @param t The tab to display
-     */
-    public void add(TabControl.Tab t) {
-        if (mMaxedOut) {
-            return;
-        }
-        mItems.add(t);
-        notifyObservers();
-        if (mItems.size() == TabControl.MAX_TABS) {
-            mMaxedOut = true;
-        }
-    }
-    
-    /**
-     * Remove a window from the list. At this point, the window
-     * has already gone. It just needs to be removed from the screen
-     * 
-     * @param index window to remove
-     */
-    public void remove(int index) {
-        if (index >= 0 && index < mItems.size()) {
-            mItems.remove(index);
-            notifyObservers();
-            mMaxedOut = false;
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.ListAdapter#areAllItemsSelectable()
-     */
-    public boolean areAllItemsEnabled() {
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.ListAdapter#isSelectable(int)
-     */
-    public boolean isEnabled(int position) {
-        if (position >= 0 && position <= mItems.size()) {
-            return true;
-        }
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#getCount()
-     */
-    public int getCount() {
-        // Include the New Window button if we have not reached the tab limit
-        if (!mMaxedOut) {
-            return mItems.size()+1;
-        }
-        return mItems.size();
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#getItem(int)
-     */
-    public Object getItem(int position) {
-        if (!mMaxedOut) {
-            if (0 == position) {
-                return null;
-            }
-            return mItems.get(position);
-        }
-        return mItems.get(position);
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#getItemId(int)
-     */
-    public long getItemId(int position) {
-        return position;
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#getView(int, android.view.View, 
-     * android.view.ViewGroup)
-     */
-    public View getView(int position, View convertView, ViewGroup parent) {
-        View v = null;
-        if (convertView != null) {
-            v = convertView;
-        } else {
-            LayoutInflater factory = LayoutInflater.from(mContext);
-            v = factory.inflate(R.layout.tabitem, null);
-        }
-        FakeWebView img = (FakeWebView) v.findViewById(R.id.icon);
-        ImageView close = (ImageView) v.findViewById(R.id.close);
-        TextView tv = (TextView) v.findViewById(R.id.label);
-
-        // position needs to be in the range of Tab indices.
-        if (!mMaxedOut) {
-            position--;
-        }
-
-        // Create the View for actual tabs
-        if (position != ImageGrid.NEW_TAB) {
-            TabControl.Tab t = mItems.get(position);
-            img.setTab(t);
-            tv.setText(t.getTitle());
-            // Do not put the 'X' if the tab picker isn't "live" (meaning the
-            // user cannot click on a tab)
-            if (!mIsLive) {
-                close.setVisibility(View.GONE);
-            } else {
-                close.setVisibility(View.VISIBLE);
-                final int pos = position;
-                close.setOnClickListener(new View.OnClickListener() {
-                        public void onClick(View v) {
-                            ImageAdapter.this.confirmClose(pos);
-                        }
-                    });
-            }
-        } else {
-            img.setBackgroundColor(Color.BLACK);
-            img.setImageResource(R.drawable.ic_new_window);
-            img.setScaleType(ImageView.ScaleType.CENTER);
-            img.setPadding(0, 0, 0, 34);
-            tv.setText(R.string.new_window);
-            close.setVisibility(View.GONE);
-        }
-        ViewGroup.LayoutParams lp = img.getLayoutParams();
-        if (lp.height != mTabHeight) {
-            lp.height = mTabHeight;
-            img.requestLayout();
-        }
-        return v;
-    }
-
-    /*
-     * Pop a confirmation dialog to the user asking if they want to close this
-     * tab.
-     */
-    private void confirmClose(final int position) {
-        final ImageGrid.Listener l = mImageGrid.getListener();
-        if (l == null) {
-            return;
-        }
-        l.remove(position);
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#registerDataSetObserver(android.database.DataSetObserver)
-     */
-    public void registerDataSetObserver(DataSetObserver observer) {
-        mDataObservers.add(observer);
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#hasStableIds()
-     */
-    public boolean hasStableIds() {
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.Adapter#unregisterDataSetObserver(android.database.DataSetObserver)
-     */
-    public void unregisterDataSetObserver(DataSetObserver observer) {
-        mDataObservers.remove(observer);
-    }
-
-    /**
-     * Notify all the observers that a change has happened.
-     */
-    void notifyObservers() {
-        for (DataSetObserver observer : mDataObservers) {
-            observer.onChanged();
-        }
-    }
-
-    public int getItemViewType(int position) {
-        return 0;
-    }
-
-    public int getViewTypeCount() {
-        return 1;
-    }
-
-    public boolean isEmpty() {
-        return getCount() == 0;
-    }
-}
diff --git a/src/com/android/browser/ImageGrid.java b/src/com/android/browser/ImageGrid.java
deleted file mode 100644
index 9967f36..0000000
--- a/src/com/android/browser/ImageGrid.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.browser;
-
-import android.content.Context;
-import android.view.ContextMenu;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.KeyEvent;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnCreateContextMenuListener;
-import android.webkit.WebView;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.GridView;
-
-/**
- * This class implements a Grid layout of Views for the Tab picker.
- */
-class ImageGrid extends GridView implements OnItemClickListener, 
-        OnCreateContextMenuListener  {
-    
-    private Listener     mListener;
-    private ImageAdapter mAdapter;
-    private boolean      mIsLive;
-    private static final int SPACING = 10;
-    public static final int CANCEL  = -99;
-    public static final int NEW_TAB = -1;
-
-    /**
-     * Constructor
-     * @param context Context to use when inflating resources.
-     * @param live  TRUE if the view can accept touch or click
-     * @param l     Listener to respond to clicks etc.
-     */
-    public ImageGrid(Context context, boolean live, Listener l) {
-        super(context);
-
-        mIsLive = live;
-        if (live) {
-            setFocusable(true);
-            setFocusableInTouchMode(true);
-            setOnItemClickListener(this);
-            setOnCreateContextMenuListener(this);
-        }
-        mListener = l;
-
-        mAdapter = new ImageAdapter(context, this, live);
-        setAdapter(mAdapter);
-
-        setBackgroundColor(0xFF000000);
-
-        setVerticalSpacing(SPACING);
-        setHorizontalSpacing(SPACING);
-        setNumColumns(2);
-        setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
-        setSelector(android.R.drawable.gallery_thumb);
-    }
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        // We always consume the BACK key even if mListener is null or the
-        // ImageGrid is not "live." This prevents crashes during tab animations
-        // if the user presses BACK.
-        if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
-                (event.getKeyCode() == KeyEvent.KEYCODE_BACK)) {
-            if (mListener != null && mIsLive) {
-                mListener.onClick(CANCEL);
-                invalidate();
-            }
-            return true;
-        }
-        return super.dispatchKeyEvent(event);
-    }
-    
-    /**
-     * Called by BrowserActivity to add a new window to the tab picker.
-     * This does not happen dynamically, this only happens during view
-     * setup.
-     * 
-     * @param v Webview of the tab to add
-     * @param name Web page title
-     * @param url URL of the webpage
-     */
-    public void add(TabControl.Tab t) {
-        mAdapter.add(t);
-    }
-
-    /**
-     * Called by BrowserActivity when a window has been removed from the
-     * tab list.
-     * 
-     * @param index Window to remove, from 0 to MAX_TABS-1
-     */
-    public void remove(int index) {
-        if (Browser.DEBUG && (index < 0 || index >= TabControl.MAX_TABS)) {
-            throw new AssertionError();
-        }
-        mAdapter.remove(index);
-    }
-
-    /**
-     * Request focus to initially set to a particular tab. 
-     *
-     * @param startingIndex This is a Tab index from 0 - MAX_TABS-1 and does not
-     *                      include the "New Tab" cell.
-     */
-    public void setCurrentIndex(int startingIndex) {
-        if (!mAdapter.maxedOut()) {
-            startingIndex++;
-        }
-        setSelection(startingIndex);
-    }
-
-    public Listener getListener() {
-        return mListener;
-    }
-
-    public void setListener(Listener l) {
-        mListener = l;
-    }
-
-    /**
-     * Return true if the ImageGrid is live. This means that tabs can be chosen
-     * and the menu can be invoked.
-     */
-    public boolean isLive() {
-        return mIsLive;
-    }
-
-    /**
-     * Do some internal cleanup of the ImageGrid's adapter.
-     */
-    public void clear() {
-        mAdapter.clear();
-    }
-
-    /* (non-Javadoc)
-     * @see android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget.AdapterView, android.view.View, int, long)
-     */
-    public void onItemClick(AdapterView parent, View v, int position, long id) {
-        if (!mAdapter.maxedOut()) {
-            position--;
-        }
-        // Position will be -1 for the "New Tab" cell.
-        if (mListener != null) {
-            mListener.onClick(position);
-        }
-    }
-    
-    /* (non-Javadoc)
-     * @see android.view.View.OnCreateContextMenuListener#onCreateContextMenu(android.view.ContextMenu, android.view.View, java.lang.Object)
-     */
-    public void onCreateContextMenu(ContextMenu menu, View v, 
-            ContextMenuInfo menuInfo) {
-        // Do not create the context menu if there is no listener or the Tab
-        // overview is not "live."
-        if (mListener == null || !mIsLive) {
-            return;
-        }
-        AdapterView.AdapterContextMenuInfo info = 
-                (AdapterView.AdapterContextMenuInfo) menuInfo;
-        boolean maxed = mAdapter.maxedOut();
-        if (info.position > 0 || maxed) {
-            MenuInflater inflater = new MenuInflater(mContext);
-            inflater.inflate(R.menu.tabscontext, menu);
-            int position = info.position;
-            if (!maxed) {
-                position--;
-            }
-            menu.setHeaderTitle(mAdapter.mItems.get(position).getTitle());
-        }
-    }
-
-    // convert a context menu position to an actual tab position. Since context
-    // menus are not created for the "New Tab" cell, this will always return a
-    // valid tab position.
-    public int getContextMenuPosition(MenuItem menu) {
-        AdapterView.AdapterContextMenuInfo info =
-                (AdapterView.AdapterContextMenuInfo) menu.getMenuInfo();
-        int pos = info.position;
-        if (!mAdapter.maxedOut()) {
-            pos--;
-        }
-        return pos;
-    }
-    
-    @Override
-    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
-        // Called when our orientation changes. Tell the adapter about the new
-        // size. Compute the individual tab height by taking the grid height
-        // and subtracting the SPACING. Then subtract the list padding twice
-        // (once for each tab on screen) and divide the remaining height by 2.
-        int tabHeight = (h - SPACING
-                - 2 * (getListPaddingTop() + getListPaddingBottom())) / 2;
-        mAdapter.heightChanged(tabHeight);
-        super.onSizeChanged(w, h, oldw, oldh);
-    }
-
-    /**
-     * Listener to be notified by behavior of ImageGrid.
-     */
-    public interface Listener {
-        /**
-         * Called when enter is pressed on the list.
-         * @param position  The index of the selected image when
-         *                  enter is pressed.
-         */
-        void onClick(int position);
-
-        /**
-         * Called when remove is called on the grid.
-         */
-        void remove(int position);
-    }
-
-}
diff --git a/src/com/android/browser/KeyTracker.java b/src/com/android/browser/KeyTracker.java
deleted file mode 100644
index 344e4f8..0000000
--- a/src/com/android/browser/KeyTracker.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2006 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.view.KeyEvent;
-import android.view.ViewConfiguration;
-
-class KeyTracker {
-
-    public enum Stage {
-        DOWN,           //!< the key has just been pressed
-        SHORT_REPEAT,   //!< repeated key, but duration is under the long-press threshold
-        LONG_REPEAT,    //!< repeated key, but duration is over the long-press threshold
-        UP              //!< the key is being released
-    }
-    
-    public enum State {
-        KEEP_TRACKING,  //!< return this to continue to track the key
-        DONE_TRACKING,  //!< return this if you handled the key, but need not track it anymore
-        NOT_TRACKING    //!< return this if you will not handle this key
-    }
-    
-    public interface OnKeyTracker {
-
-        /** Called whenever there is a key event [down, short/long repeat, up]
-            @param keyCode  The current keyCode (see KeyEvent class)
-            @param msg      The message associated with the keyCode
-            @maram stage    The state the key press is in [down, short/long repeat, up]
-            @param duration The number of milliseconds since this key was initially pressed
-            @return your state after seeing the key. If you return DONE_TRACKING or NOT_TRACKING,
-                    you will not be called again for the lifetime of this key event.
-        */
-        public State onKeyTracker(int keyCode, KeyEvent event, Stage stage, int duration);
-    }
-    
-    public KeyTracker(OnKeyTracker tracker) {
-        mTracker = tracker;
-    }
-    
-    public boolean doKeyDown(int keyCode, KeyEvent event) {
-        long now = System.currentTimeMillis();
-        Stage stage = null;
-
-        // check if its a new/different key
-        if (mKeyCode != keyCode || event.getRepeatCount() == 0) {
-            mKeyCode = keyCode;
-            mStartMS = now;
-            stage = Stage.DOWN;
-        }
-        else if (mState == State.KEEP_TRACKING) {
-            stage = (now - mStartMS) >= LONG_PRESS_DURATION_MS ? Stage.LONG_REPEAT : Stage.SHORT_REPEAT;
-        }
-
-        if (stage != null) {
-            mEvent = event;        
-            callTracker(stage, now);
-        }
-
-        return mState != State.NOT_TRACKING;
-    }
-    
-    public boolean doKeyUp(int keyCode, KeyEvent event) {
-        boolean handled = false;
-
-        if (mState == State.KEEP_TRACKING && mKeyCode == keyCode) {
-            mEvent = event;
-            callTracker(Stage.UP, System.currentTimeMillis());
-            handled = mState != State.NOT_TRACKING;
-        }
-        mKeyCode = NOT_A_KEYCODE;
-        return handled;
-    }
-    
-    private void callTracker(Stage stage, long now) {
-        mState = mTracker.onKeyTracker(mKeyCode, mEvent, stage, (int)(now - mStartMS));
-    }
-    
-    private void dump() {
-        System.out.println(" key=" + mKeyCode + " dur=" + (System.currentTimeMillis() - mStartMS) +
-                            " state=" + mState);
-    }
-
-    private int             mKeyCode = NOT_A_KEYCODE;
-    private KeyEvent        mEvent;
-    private long            mStartMS;
-    private State           mState;
-    private OnKeyTracker    mTracker;
-
-    private static final int LONG_PRESS_DURATION_MS = 
-            ViewConfiguration.getLongPressTimeout();
-    private static final int NOT_A_KEYCODE = -123456;
-}
-
diff --git a/src/com/android/browser/MostVisitedActivity.java b/src/com/android/browser/MostVisitedActivity.java
index 83342a1..d03c7a3 100644
--- a/src/com/android/browser/MostVisitedActivity.java
+++ b/src/com/android/browser/MostVisitedActivity.java
@@ -23,6 +23,7 @@
 import android.database.Cursor;
 import android.database.DataSetObserver;
 import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.os.Bundle;
 import android.os.Handler;
 import android.provider.Browser;
@@ -35,6 +36,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
+import android.view.ViewStub;
 
 import java.util.Vector;
 
@@ -49,12 +51,11 @@
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         mAdapter = new MyAdapter();
-        CombinedBookmarkHistoryActivity.getIconListenerSet(getContentResolver())
+        CombinedBookmarkHistoryActivity.getIconListenerSet()
                 .addListener(mIconReceiver);
         setListAdapter(mAdapter);
         ListView list = getListView();
-        LayoutInflater factory = LayoutInflater.from(this);
-        View v = factory.inflate(R.layout.empty_history, null);
+        View v = new ViewStub(this, R.layout.empty_history);
         addContentView(v, new LayoutParams(LayoutParams.FILL_PARENT,
                 LayoutParams.FILL_PARENT));
         list.setEmptyView(v);
@@ -63,7 +64,7 @@
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        CombinedBookmarkHistoryActivity.getIconListenerSet(getContentResolver())
+        CombinedBookmarkHistoryActivity.getIconListenerSet()
                .removeListener(mIconReceiver);
     }
 
@@ -94,16 +95,18 @@
         private Vector<DataSetObserver> mObservers;
         private Cursor mCursor;
         // These correspond with projection below.
-        private final int mUrlIndex = 0;
-        private final int mTitleIndex = 1;
-        private final int mBookmarkIndex = 2;
+        private static final int mUrlIndex = 0;
+        private static final int mTitleIndex = 1;
+        private static final int mBookmarkIndex = 2;
+        private static final int mFaviconIndex = 3;
 
         MyAdapter() {
             mObservers = new Vector<DataSetObserver>();
             String[] projection = new String[] {
                     Browser.BookmarkColumns.URL,
                     Browser.BookmarkColumns.TITLE,
-                    Browser.BookmarkColumns.BOOKMARK };
+                    Browser.BookmarkColumns.BOOKMARK,
+                    Browser.BookmarkColumns.FAVICON };
             String whereClause = Browser.BookmarkColumns.VISITS + " != 0";
             String orderBy = Browser.BookmarkColumns.VISITS + " DESC";
             mCursor = managedQuery(Browser.BOOKMARKS_URI, projection,
@@ -145,8 +148,14 @@
             item.setName(mCursor.getString(mTitleIndex));
             String url = mCursor.getString(mUrlIndex);
             item.setUrl(url);
-            item.setFavicon(CombinedBookmarkHistoryActivity.getIconListenerSet(
-                    getContentResolver()).getFavicon(url));
+            byte[] data = mCursor.getBlob(mFaviconIndex);
+            if (data != null) {
+                item.setFavicon(BitmapFactory.decodeByteArray(data, 0,
+                        data.length));
+            } else {
+                item.setFavicon(CombinedBookmarkHistoryActivity
+                        .getIconListenerSet().getFavicon(url));
+            }
             item.setIsBookmark(1 == mCursor.getInt(mBookmarkIndex));
             return item;
         }
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 575be8d..2f15a9c 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -17,6 +17,7 @@
 package com.android.browser;
 
 import android.content.Context;
+import android.graphics.Bitmap;
 import android.graphics.Picture;
 import android.net.http.SslError;
 import android.os.Bundle;
@@ -38,6 +39,7 @@
 import android.webkit.WebViewClient;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
+import android.widget.LinearLayout;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -68,7 +70,7 @@
     private final LayoutInflater mInflateService;
     // Subclass of WebViewClient used in subwindows to notify the main
     // WebViewClient of certain WebView activities.
-    private class SubWindowClient extends WebViewClient {
+    private static class SubWindowClient extends WebViewClient {
         // The main WebViewClient.
         private final WebViewClient mClient;
 
@@ -104,6 +106,16 @@
                 String description, String failingUrl) {
             mClient.onReceivedError(view, errorCode, description, failingUrl);
         }
+        @Override
+        public boolean shouldOverrideKeyEvent(WebView view,
+                android.view.KeyEvent event) {
+            return mClient.shouldOverrideKeyEvent(view, event);
+        }
+        @Override
+        public void onUnhandledKeyEvent(WebView view,
+                android.view.KeyEvent event) {
+            mClient.onUnhandledKeyEvent(view, event);
+        }
     }
     // Subclass of WebChromeClient to display javascript dialogs.
     private class SubWindowChromeClient extends WebChromeClient {
@@ -139,7 +151,7 @@
         public void onRequestFocus(WebView view) {
             Tab t = getTabFromView(view);
             if (t != getCurrentTab()) {
-                mActivity.showTab(t);
+                mActivity.switchToTab(getTabIndex(t));
             }
         }
     }
@@ -148,20 +160,19 @@
     public static class PickerData {
         String  mUrl;
         String  mTitle;
+        Bitmap  mFavicon;
         float   mScale;
         int     mScrollX;
         int     mScrollY;
-        int     mWidth;
-        Picture mPicture;
-        // This can be null. When a new picture comes in, this view should be
-        // invalidated to show the new picture.
-        FakeWebView mFakeWebView;
     }
 
     /**
      * Private class for maintaining Tabs with a main WebView and a subwindow.
      */
-    public class Tab implements WebView.PictureListener {
+    public class Tab {
+        // The Geolocation permissions prompt
+        private GeolocationPermissionsPrompt mGeolocationPermissionsPrompt;
+        private View mContainer;
         // Main WebView
         private WebView mMainView;
         // Subwindow WebView
@@ -195,12 +206,103 @@
         // url has not changed.
         private String mOriginalUrl;
 
+        private ErrorConsoleView mErrorConsole;
+        // the lock icon type and previous lock icon type for the tab
+        private int mSavedLockIconType;
+        private int mSavedPrevLockIconType;
+
         // Construct a new tab
-        private Tab(WebView w, boolean closeOnExit, String appId, String url) {
-            mMainView = w;
+        private Tab(WebView w, boolean closeOnExit, String appId, String url, Context context) {
             mCloseOnExit = closeOnExit;
             mAppId = appId;
             mOriginalUrl = url;
+            mSavedLockIconType = BrowserActivity.LOCK_ICON_UNSECURE;
+            mSavedPrevLockIconType = BrowserActivity.LOCK_ICON_UNSECURE;
+
+            // The tab consists of a container view, which contains the main
+            // WebView, as well as any other UI elements associated with the tab.
+            LayoutInflater factory = LayoutInflater.from(context);
+            mContainer = factory.inflate(R.layout.tab, null);
+
+            mGeolocationPermissionsPrompt =
+                (GeolocationPermissionsPrompt) mContainer.findViewById(
+                    R.id.geolocation_permissions_prompt);
+
+            setWebView(w);
+        }
+
+        /**
+         * Sets the WebView for this tab, correctly removing the old WebView
+         * from the container view.
+         */
+        public void setWebView(WebView w) {
+            if (mMainView == w) {
+                return;
+            }
+            // If the WebView is changing, the page will be reloaded, so any ongoing Geolocation
+            // permission requests are void.
+            mGeolocationPermissionsPrompt.hide();
+
+            // Just remove the old one.
+            FrameLayout wrapper =
+                    (FrameLayout) mContainer.findViewById(R.id.webview_wrapper);
+            wrapper.removeView(mMainView);
+            mMainView = w;
+        }
+
+        /**
+         * This method attaches both the WebView and any sub window to the
+         * given content view.
+         */
+        public void attachTabToContentView(ViewGroup content) {
+            if (mMainView == null) {
+                return;
+            }
+
+            // Attach the WebView to the container and then attach the
+            // container to the content view.
+            FrameLayout wrapper =
+                    (FrameLayout) mContainer.findViewById(R.id.webview_wrapper);
+            wrapper.addView(mMainView);
+            content.addView(mContainer, BrowserActivity.COVER_SCREEN_PARAMS);
+            attachSubWindow(content);
+        }
+
+        /**
+         * Remove the WebView and any sub window from the given content view.
+         */
+        public void removeTabFromContentView(ViewGroup content) {
+            if (mMainView == null) {
+                return;
+            }
+
+            // Remove the container from the content and then remove the
+            // WebView from the container. This will trigger a focus change
+            // needed by WebView.
+            FrameLayout wrapper =
+                    (FrameLayout) mContainer.findViewById(R.id.webview_wrapper);
+            wrapper.removeView(mMainView);
+            content.removeView(mContainer);
+            removeSubWindow(content);
+        }
+
+        /**
+         * Attach the sub window to the content view.
+         */
+        public void attachSubWindow(ViewGroup content) {
+            if (mSubView != null) {
+                content.addView(mSubViewContainer,
+                        BrowserActivity.COVER_SCREEN_PARAMS);
+            }
+        }
+
+        /**
+         * Remove the sub window from the content view.
+         */
+        public void removeSubWindow(ViewGroup content) {
+            if (mSubView != null) {
+                content.removeView(mSubViewContainer);
+            }
         }
 
         /**
@@ -226,6 +328,13 @@
         }
 
         /**
+         * @return The geolocation permissions prompt for this tab.
+         */
+        public GeolocationPermissionsPrompt getGeolocationPermissionsPrompt() {
+            return mGeolocationPermissionsPrompt;
+        }
+
+        /**
          * Return the subwindow of this tab or null if there is no subwindow.
          * @return The subwindow of this tab or null.
          */
@@ -234,15 +343,6 @@
         }
 
         /**
-         * Return the subwindow container of this tab or null if there is no
-         * subwindow.
-         * @return The subwindow's container View.
-         */
-        public View getSubWebViewContainer() {
-            return mSubViewContainer;
-        }
-
-        /**
          * Get the url of this tab.  Valid after calling populatePickerData, but
          * before calling wipePickerData, or if the webview has been destroyed.
          * 
@@ -269,11 +369,11 @@
             return null;
         }
 
-        /**
-         * Returns the picker data.
-         */
-        public PickerData getPickerData() {
-            return mPickerData;
+        public Bitmap getFavicon() {
+            if (mPickerData != null) {
+                return mPickerData.mFavicon;
+            }
+            return null;
         }
 
         private void setParentTab(Tab parent) {
@@ -336,16 +436,20 @@
             return mCloseOnExit;
         }
 
-        public void onNewPicture(WebView view, Picture p) {
-            if (mPickerData == null) {
-                return;
-            }
+        void setLockIconType(int type) {
+            mSavedLockIconType = type;
+        }
 
-            mPickerData.mPicture = p;
-            // Tell the FakeWebView to redraw.
-            if (mPickerData.mFakeWebView != null) {
-                mPickerData.mFakeWebView.invalidate();
-            }
+        int getLockIconType() {
+            return mSavedLockIconType;
+        }
+
+        void setPrevLockIconType(int type) {
+            mSavedPrevLockIconType = type;
+        }
+
+        int getPrevLockIconType() {
+            return mSavedPrevLockIconType;
         }
     };
 
@@ -388,6 +492,28 @@
     }
 
     /**
+     * Return the current tab's error console. Creates the console if createIfNEcessary
+     * is true and we haven't already created the console.
+     * @param createIfNecessary Flag to indicate if the console should be created if it has
+     *                          not been already.
+     * @return The current tab's error console, or null if one has not been created and
+     *         createIfNecessary is false.
+     */
+    ErrorConsoleView getCurrentErrorConsole(boolean createIfNecessary) {
+        Tab t = getTab(mCurrentTab);
+        if (t == null) {
+            return null;
+        }
+
+        if (createIfNecessary && t.mErrorConsole == null) {
+            t.mErrorConsole = new ErrorConsoleView(mActivity);
+            t.mErrorConsole.setWebView(t.mMainView);
+        }
+
+        return t.mErrorConsole;
+    }
+
+    /**
      * Return the current tab's top-level WebView. This can return a subwindow
      * if one exists.
      * @return The top-level WebView of the current tab.
@@ -446,6 +572,9 @@
      * @return index of Tab or -1 if not found
      */
     int getTabIndex(Tab tab) {
+        if (tab == null) {
+            return -1;
+        }
         return mTabs.indexOf(tab);
     }
 
@@ -461,8 +590,9 @@
             return null;
         }
         final WebView w = createNewWebView();
+
         // Create a new tab and add it to the tab list
-        Tab t = new Tab(w, closeOnExit, appId, url);
+        Tab t = new Tab(w, closeOnExit, appId, url, mActivity);
         mTabs.add(t);
         // Initially put the tab in the background.
         putTabInBackground(t);
@@ -499,9 +629,10 @@
             // observers.
             BrowserSettings.getInstance().deleteObserver(
                     t.mMainView.getSettings());
-            // Destroy the main view and subview
-            t.mMainView.destroy();
-            t.mMainView = null;
+            WebView w = t.mMainView;
+            t.setWebView(null);
+            // Destroy the main view
+            w.destroy();
         }
         // clear it's references to parent and children
         t.removeFromTree();
@@ -561,8 +692,9 @@
             if (t.mMainView != null) {
                 dismissSubWindow(t);
                 s.deleteObserver(t.mMainView.getSettings());
-                t.mMainView.destroy();
-                t.mMainView = null;
+                WebView w = t.mMainView;
+                t.setWebView(null);
+                w.destroy();
             }
         }
         mTabs.clear();
@@ -583,7 +715,6 @@
     private static final String CURRTAB = "currentTab";
     private static final String CURRURL = "currentUrl";
     private static final String CURRTITLE = "currentTitle";
-    private static final String CURRWIDTH = "currentWidth";
     private static final String CURRPICTURE = "currentPicture";
     private static final String CLOSEONEXIT = "closeonexit";
     private static final String PARENTTAB = "parentTab";
@@ -634,7 +765,7 @@
                 } else {
                     // Create a new tab and don't restore the state yet, add it
                     // to the tab list
-                    Tab t = new Tab(null, false, null, null);
+                    Tab t = new Tab(null, false, null, null, mActivity);
                     t.mSavedState = inState.getBundle(WEBVIEW + i);
                     if (t.mSavedState != null) {
                         populatePickerDataFromSavedState(t);
@@ -671,8 +802,10 @@
      * WebView cache;
      */
     void freeMemory() {
+        if (getTabCount() == 0) return;
+
         // free the least frequently used background tab
-        Tab t = getLeastUsedTab();
+        Tab t = getLeastUsedTab(getCurrentTab());
         if (t != null) {
             Log.w(LOGTAG, "Free a tab in the browser");
             freeTab(t);
@@ -681,19 +814,20 @@
             return;
         }
 
-        // free the WebView cache
-        Log.w(LOGTAG, "Free WebView cache");
+        // free the WebView's unused memory (this includes the cache)
+        Log.w(LOGTAG, "Free WebView's unused memory and cache");
         WebView view = getCurrentWebView();
         if (view != null) {
-            view.clearCache(false);
+            view.freeMemory();
         }
         // force a gc
         System.gc();
     }
 
-    private Tab getLeastUsedTab() {
-        // Don't do anything if we only have 1 tab.
-        if (getTabCount() == 1) {
+    private Tab getLeastUsedTab(Tab current) {
+        // Don't do anything if we only have 1 tab or if the current tab is
+        // null.
+        if (getTabCount() == 1 || current == null) {
             return null;
         }
 
@@ -707,11 +841,13 @@
         }
         do {
             t = mTabQueue.get(i++);
-        } while (i < queueSize && t != null && t.mMainView == null);
+        } while (i < queueSize
+                && ((t != null && t.mMainView == null)
+                    || t == current.mParentTab));
 
         // Don't do anything if the last remaining tab is the current one or if
         // the last tab has been freed already.
-        if (t == getCurrentTab() || t.mMainView == null) {
+        if (t == current || t.mMainView == null) {
             return null;
         }
 
@@ -727,8 +863,9 @@
         // Remove the WebView's settings from the BrowserSettings list of
         // observers.
         BrowserSettings.getInstance().deleteObserver(t.mMainView.getSettings());
-        t.mMainView.destroy();
-        t.mMainView = null;
+        WebView w = t.mMainView;
+        t.setWebView(null);
+        w.destroy();
     }
 
     /**
@@ -801,6 +938,45 @@
         return null;
     }
 
+    // This method checks if a non-app tab (one created within the browser)
+    // matches the given url.
+    private boolean tabMatchesUrl(Tab t, String url) {
+        if (t.mAppId != null) {
+            return false;
+        } else if (t.mMainView == null) {
+            return false;
+        } else if (url.equals(t.mMainView.getUrl()) ||
+                url.equals(t.mMainView.getOriginalUrl())) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Return the tab that has no app id associated with it and the url of the
+     * tab matches the given url.
+     * @param url The url to search for.
+     */
+    Tab findUnusedTabWithUrl(String url) {
+        if (url == null) {
+            return null;
+        }
+        // Check the current tab first.
+        Tab t = getCurrentTab();
+        if (t != null && tabMatchesUrl(t, url)) {
+            return t;
+        }
+        // Now check all the rest.
+        final int size = getTabCount();
+        for (int i = 0; i < size; i++) {
+            t = getTab(i);
+            if (tabMatchesUrl(t, url)) {
+                return t;
+            }
+        }
+        return null;
+    }
+
     /**
      * Recreate the main WebView of the given tab. Returns true if the WebView
      * was deleted.
@@ -827,7 +1003,7 @@
         }
         // Create a new WebView. If this tab is the current tab, we need to put
         // back all the clients so force it to be the current tab.
-        t.mMainView = createNewWebView();
+        t.setWebView(createNewWebView());
         if (getCurrentTab() == t) {
             setCurrentTab(t, true);
         }
@@ -846,6 +1022,8 @@
     private WebView createNewWebView() {
         // Create a new WebView
         WebView w = new WebView(mActivity);
+        w.setScrollbarFadingEnabled(true);
+        w.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
         w.setMapTrackballToArrowKeys(false); // use trackball directly
         // Enable the built-in zoom
         w.getSettings().setBuiltInZoomControls(true);
@@ -865,6 +1043,48 @@
         return setCurrentTab(newTab, false);
     }
 
+    /*package*/ void pauseCurrentTab() {
+        Tab t = getCurrentTab();
+        if (t != null) {
+            t.mMainView.onPause();
+            if (t.mSubView != null) {
+                t.mSubView.onPause();
+            }
+        }
+    }
+
+    /*package*/ void resumeCurrentTab() {
+        Tab t = getCurrentTab();
+        if (t != null) {
+            t.mMainView.onResume();
+            if (t.mSubView != null) {
+                t.mSubView.onResume();
+            }
+        }
+    }
+
+    private void putViewInForeground(WebView v, WebViewClient vc,
+                                     WebChromeClient cc) {
+        v.setWebViewClient(vc);
+        v.setWebChromeClient(cc);
+        v.setOnCreateContextMenuListener(mActivity);
+        v.setDownloadListener(mActivity);
+        v.onResume();
+    }
+
+    private void putViewInBackground(WebView v) {
+        // Set an empty callback so that default actions are not triggered.
+        v.setWebViewClient(mEmptyClient);
+        v.setWebChromeClient(mBackgroundChromeClient);
+        v.setOnCreateContextMenuListener(null);
+        // Leave the DownloadManager attached so that downloads can start in
+        // a non-active window. This can happen when going to a site that does
+        // a redirect after a period of time. The user could have switched to
+        // another tab while waiting for the download to start.
+        v.setDownloadListener(mActivity);
+        v.onPause();
+    }
+
     /**
      * If force is true, this method skips the check for newTab == current.
      */
@@ -890,7 +1110,6 @@
         mTabQueue.add(newTab);
 
         WebView mainView;
-        WebView subView;
 
         // Display the new current tab
         mCurrentTab = mTabs.indexOf(newTab);
@@ -898,19 +1117,15 @@
         boolean needRestore = (mainView == null);
         if (needRestore) {
             // Same work as in createNewTab() except don't do new Tab()
-            newTab.mMainView = mainView = createNewWebView();
+            mainView = createNewWebView();
+            newTab.setWebView(mainView);
         }
-        mainView.setWebViewClient(mActivity.getWebViewClient());
-        mainView.setWebChromeClient(mActivity.getWebChromeClient());
-        mainView.setOnCreateContextMenuListener(mActivity);
-        mainView.setDownloadListener(mActivity);
+        putViewInForeground(mainView, mActivity.getWebViewClient(),
+                            mActivity.getWebChromeClient());
         // Add the subwindow if it exists
         if (newTab.mSubViewContainer != null) {
-            subView = newTab.mSubView;
-            subView.setWebViewClient(newTab.mSubViewClient);
-            subView.setWebChromeClient(newTab.mSubViewChromeClient);
-            subView.setOnCreateContextMenuListener(mActivity);
-            subView.setDownloadListener(mActivity);
+            putViewInForeground(newTab.mSubView, newTab.mSubViewClient,
+                                newTab.mSubViewChromeClient);
         }
         if (needRestore) {
             // Have to finish setCurrentTab work before calling restoreState
@@ -925,23 +1140,9 @@
      * Put the tab in the background using all the empty/background clients.
      */
     private void putTabInBackground(Tab t) {
-        WebView mainView = t.mMainView;
-        // Set an empty callback so that default actions are not triggered.
-        mainView.setWebViewClient(mEmptyClient);
-        mainView.setWebChromeClient(mBackgroundChromeClient);
-        mainView.setOnCreateContextMenuListener(null);
-        // Leave the DownloadManager attached so that downloads can start in
-        // a non-active window. This can happen when going to a site that does
-        // a redirect after a period of time. The user could have switched to
-        // another tab while waiting for the download to start.
-        mainView.setDownloadListener(mActivity);
-        WebView subView = t.mSubView;
-        if (subView != null) {
-            // Set an empty callback so that default actions are not triggered.
-            subView.setWebViewClient(mEmptyClient);
-            subView.setWebChromeClient(mBackgroundChromeClient);
-            subView.setOnCreateContextMenuListener(null);
-            subView.setDownloadListener(mActivity);
+        putViewInBackground(t.mMainView);
+        if (t.mSubView != null) {
+            putViewInBackground(t.mSubView);
         }
     }
 
@@ -979,15 +1180,6 @@
         final WebHistoryItem item =
                 list != null ? list.getCurrentItem() : null;
         populatePickerData(t, item);
-
-        // This method is only called during the tab picker creation. At this
-        // point we need to listen for new pictures since the WebView is still
-        // active.
-        final WebView w = t.getTopWindow();
-        w.setPictureListener(t);
-        // Capture the picture here instead of populatePickerData since it can
-        // be called when saving the state of a tab.
-        t.mPickerData.mPicture = w.capturePicture();
     }
 
     // Create the PickerData and populate it using the saved state of the tab.
@@ -1000,25 +1192,12 @@
         final Bundle state = t.mSavedState;
         data.mUrl = state.getString(CURRURL);
         data.mTitle = state.getString(CURRTITLE);
-        data.mWidth = state.getInt(CURRWIDTH, 0);
         // XXX: These keys are from WebView.savePicture so if they change, this
         // will break.
         data.mScale = state.getFloat("scale", 1.0f);
         data.mScrollX = state.getInt("scrollX", 0);
         data.mScrollY = state.getInt("scrollY", 0);
 
-        if (state.containsKey(CURRPICTURE)) {
-            final File f = new File(t.mSavedState.getString(CURRPICTURE));
-            try {
-                final FileInputStream in = new FileInputStream(f);
-                data.mPicture = Picture.createFromStream(in);
-                in.close();
-            } catch (Exception ex) {
-                // Ignore any problems with inflating the picture. We just
-                // won't draw anything.
-            }
-        }
-
         // Set the tab's picker data.
         t.mPickerData = data;
     }
@@ -1030,6 +1209,7 @@
         if (item != null) {
             data.mUrl = item.getUrl();
             data.mTitle = item.getTitle();
+            data.mFavicon = item.getFavicon();
             if (data.mTitle == null) {
                 data.mTitle = data.mUrl;
             }
@@ -1037,10 +1217,10 @@
         // We want to display the top window in the tab picker but use the url
         // and title of the main window.
         final WebView w = t.getTopWindow();
-        data.mWidth = w.getWidth();
         data.mScale = w.getScale();
         data.mScrollX = w.getScrollX();
         data.mScrollY = w.getScrollY();
+
         t.mPickerData = data;
     }
     
@@ -1054,13 +1234,6 @@
             if (t != null && t.mSavedState == null) {
                 t.mPickerData = null;
             }
-            if (t.mMainView != null) {
-                // Clear the picture listeners.
-                t.mMainView.setPictureListener(null);
-                if (t.mSubView != null) {
-                    t.mSubView.setPictureListener(null);
-                }
-            }
         }
     }
 
@@ -1099,7 +1272,6 @@
             if (data.mTitle != null) {
                 b.putString(CURRTITLE, data.mTitle);
             }
-            b.putInt(CURRWIDTH, data.mWidth);
             b.putBoolean(CLOSEONEXIT, t.mCloseOnExit);
             if (t.mAppId != null) {
                 b.putString(APPID, t.mAppId);
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
new file mode 100644
index 0000000..23b1ed5
--- /dev/null
+++ b/src/com/android/browser/TitleBar.java
@@ -0,0 +1,269 @@
+/*
+ * 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.content.Context;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Color;
+import android.graphics.Rect;
+import android.graphics.drawable.Animatable;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.PaintDrawable;
+import android.os.Handler;
+import android.os.Message;
+import android.util.TypedValue;
+import android.view.ContextMenu;
+import android.view.LayoutInflater;
+import android.view.MenuInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+/**
+ * This class represents a title bar for a particular "tab" or "window" in the
+ * browser.
+ */
+public class TitleBar extends LinearLayout {
+    private TextView        mTitle;
+    private Drawable        mCloseDrawable;
+    private ImageView       mRtButton;
+    private Drawable        mCircularProgress;
+    private ProgressBar     mHorizontalProgress;
+    private ImageView       mFavicon;
+    private ImageView       mLockIcon;
+    private Drawable        mStopDrawable;
+    private Drawable        mBookmarkDrawable;
+    private boolean         mInLoad;
+    private BrowserActivity mBrowserActivity;
+    private Drawable        mGenericFavicon;
+    private int             mIconDimension;
+    private View            mTitleBg;
+    private MyHandler       mHandler;
+
+    private static int LONG_PRESS = 1;
+
+    public TitleBar(BrowserActivity context) {
+        super(context, null);
+        mHandler = new MyHandler();
+        LayoutInflater factory = LayoutInflater.from(context);
+        factory.inflate(R.layout.title_bar, this);
+        mBrowserActivity = context;
+
+        mTitle = (TextView) findViewById(R.id.title);
+        mTitle.setCompoundDrawablePadding(5);
+
+        mTitleBg = findViewById(R.id.title_bg);
+        mLockIcon = (ImageView) findViewById(R.id.lock);
+        mFavicon = (ImageView) findViewById(R.id.favicon);
+
+        mRtButton = (ImageView) findViewById(R.id.rt_btn);
+        Resources resources = context.getResources();
+        mCircularProgress = (Drawable) resources.getDrawable(
+                com.android.internal.R.drawable.search_spinner);
+        mIconDimension = (int) TypedValue.applyDimension(
+                TypedValue.COMPLEX_UNIT_DIP, 20f,
+                resources.getDisplayMetrics());
+        mCircularProgress.setBounds(0, 0, mIconDimension, mIconDimension);
+        mHorizontalProgress = (ProgressBar) findViewById(
+                R.id.progress_horizontal);
+        mGenericFavicon = context.getResources().getDrawable(
+                R.drawable.app_web_browser_sm);
+    }
+
+    private class MyHandler extends Handler {
+        public void handleMessage(Message msg) {
+            if (msg.what == LONG_PRESS) {
+                // Prevent the normal action from happening by setting the title
+                // bar's state to false.
+                mTitleBg.setPressed(false);
+                // Need to call a special method on BrowserActivity for when the
+                // fake title bar is up, because its ViewGroup does not show a
+                // context menu.
+                mBrowserActivity.showTitleBarContextMenu();
+            }
+        }
+    };
+
+    @Override
+    protected void onCreateContextMenu(ContextMenu menu) {
+        MenuInflater inflater = mBrowserActivity.getMenuInflater();
+        inflater.inflate(R.menu.title_context, menu);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        switch (event.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                // Make all touches hit either the textfield or the button,
+                // depending on which side of the right edge of the textfield
+                // they hit.
+                if ((int) event.getX() > mTitleBg.getRight()) {
+                    mRtButton.setPressed(true);
+                } else {
+                    mTitleBg.setPressed(true);
+                    mHandler.sendMessageDelayed(mHandler.obtainMessage(
+                            LONG_PRESS),
+                            ViewConfiguration.getLongPressTimeout());
+                }
+                break;
+            case MotionEvent.ACTION_MOVE:
+                int slop = ViewConfiguration.get(mBrowserActivity)
+                        .getScaledTouchSlop();
+                if ((int) event.getY() > getHeight() + slop) {
+                    // We only trigger the actions in ACTION_UP if one or the
+                    // other is pressed.  Since the user moved off the title
+                    // bar, mark both as not pressed.
+                    mTitleBg.setPressed(false);
+                    mRtButton.setPressed(false);
+                    mHandler.removeMessages(LONG_PRESS);
+                    break;
+                }
+                int x = (int) event.getX();
+                int titleRight = mTitleBg.getRight();
+                if (mTitleBg.isPressed() && x > titleRight + slop) {
+                    mTitleBg.setPressed(false);
+                    mHandler.removeMessages(LONG_PRESS);
+                } else if (mRtButton.isPressed() && x < titleRight - slop) {
+                    mRtButton.setPressed(false);
+                }
+                break;
+            case MotionEvent.ACTION_CANCEL:
+                mRtButton.setPressed(false);
+                mTitleBg.setPressed(false);
+                mHandler.removeMessages(LONG_PRESS);
+                break;
+            case MotionEvent.ACTION_UP:
+                if (mRtButton.isPressed()) {
+                    if (mInLoad) {
+                        mBrowserActivity.stopLoading();
+                    } else {
+                        mBrowserActivity.bookmarksOrHistoryPicker(false);
+                    }
+                    mRtButton.setPressed(false);
+                } else if (mTitleBg.isPressed()) {
+                    mHandler.removeMessages(LONG_PRESS);
+                    mBrowserActivity.onSearchRequested();
+                    mTitleBg.setPressed(false);
+                }
+                break;
+            default:
+                break;
+        }
+        return true;
+    }
+
+    /**
+     * Return whether the associated WebView is currently loading.  Needed to
+     * determine whether a click should stop the load or close the tab.
+     */
+    /* package */ boolean isInLoad() {
+        return mInLoad;
+    }
+
+    /**
+     * Set a new Bitmap for the Favicon.
+     */
+    /* package */ void setFavicon(Bitmap icon) {
+        Drawable[] array = new Drawable[3];
+        array[0] = new PaintDrawable(Color.BLACK);
+        PaintDrawable p = new PaintDrawable(Color.WHITE);
+        array[1] = p;
+        if (icon == null) {
+            array[2] = mGenericFavicon;
+        } else {
+            array[2] = new BitmapDrawable(icon);
+        }
+        LayerDrawable d = new LayerDrawable(array);
+        d.setLayerInset(1, 1, 1, 1, 1);
+        d.setLayerInset(2, 2, 2, 2, 2);
+        mFavicon.setImageDrawable(d);
+    }
+
+    /**
+     * Set the Drawable for the lock icon, or null to hide it.
+     */
+    /* package */ void setLock(Drawable d) {
+        if (null == d) {
+            mLockIcon.setVisibility(View.GONE);
+        } else {
+            mLockIcon.setImageDrawable(d);
+            mLockIcon.setVisibility(View.VISIBLE);
+        }
+    }
+
+    /**
+     * Update the progress, from 0 to 100.
+     */
+    /* package */ void setProgress(int newProgress) {
+        if (newProgress >= mHorizontalProgress.getMax()) {
+            mTitle.setCompoundDrawables(null, null, null, null);
+            ((Animatable) mCircularProgress).stop();
+            mHorizontalProgress.setVisibility(View.INVISIBLE);
+            if (mBookmarkDrawable != null) {
+                mRtButton.setImageDrawable(mBookmarkDrawable);
+            }
+            mInLoad = false;
+        } else {
+            mHorizontalProgress.setProgress(newProgress);
+            if (!mInLoad && getWindowToken() != null) {
+                // checking the window token lets us be sure that we
+                // are attached to a window before starting the animation,
+                // preventing a potential race condition
+                // (fix for bug http://b/2115736)
+                mTitle.setCompoundDrawables(null, null, mCircularProgress,
+                        null);
+                ((Animatable) mCircularProgress).start();
+                mHorizontalProgress.setVisibility(View.VISIBLE);
+                if (mBookmarkDrawable == null) {
+                    mBookmarkDrawable = mRtButton.getDrawable();
+                }
+                if (mStopDrawable == null) {
+                    mRtButton.setImageResource(R.drawable.ic_btn_stop_v2);
+                    mStopDrawable = mRtButton.getDrawable();
+                } else {
+                    mRtButton.setImageDrawable(mStopDrawable);
+                }
+                mInLoad = true;
+            }
+        }
+    }
+
+    /**
+     * Update the title and url.
+     */
+    /* package */ void setTitleAndUrl(CharSequence title, CharSequence url) {
+        if (url == null) {
+            mTitle.setText(R.string.title_bar_loading);
+        } else {
+            mTitle.setText(url.toString());
+        }
+    }
+
+    /* package */ void setToTabPicker() {
+        mTitle.setText(R.string.tab_picker_title);
+        setFavicon(null);
+        setLock(null);
+        mHorizontalProgress.setVisibility(View.GONE);
+    }
+}
diff --git a/src/com/android/browser/WebStorageSizeManager.java b/src/com/android/browser/WebStorageSizeManager.java
new file mode 100644
index 0000000..3afcadc
--- /dev/null
+++ b/src/com/android/browser/WebStorageSizeManager.java
@@ -0,0 +1,406 @@
+/*
+ * 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.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.os.StatFs;
+import android.util.Log;
+import android.webkit.WebStorage;
+
+import java.io.File;
+import java.util.Set;
+
+
+/**
+ * Package level class for managing the disk size consumed by the WebDatabase
+ * and ApplicationCaches APIs (henceforth called Web storage).
+ *
+ * Currently, the situation on the WebKit side is as follows:
+ *  - WebDatabase enforces a quota for each origin.
+ *  - Session/LocalStorage do not enforce any disk limits.
+ *  - ApplicationCaches enforces a maximum size for all origins.
+ *
+ * The WebStorageSizeManager maintains a global limit for the disk space
+ * consumed by the WebDatabase and ApplicationCaches. As soon as WebKit will
+ * have a limit for Session/LocalStorage, this class will manage the space used
+ * by those APIs as well.
+ *
+ * The global limit is computed as a function of the size of the partition where
+ * these APIs store their data (they must store it on the same partition for
+ * this to work) and the size of the available space on that partition.
+ * The global limit is not subject to user configuration but we do provide
+ * a debug-only setting.
+ * TODO(andreip): implement the debug setting.
+ *
+ * The size of the disk space used for Web storage is initially divided between
+ * WebDatabase and ApplicationCaches as follows:
+ *
+ * 75% for WebDatabase
+ * 25% for ApplicationCaches
+ *
+ * When an origin's database usage reaches its current quota, WebKit invokes
+ * the following callback function:
+ * - exceededDatabaseQuota(Frame* frame, const String& database_name);
+ * Note that the default quota for a new origin is 0, so we will receive the
+ * 'exceededDatabaseQuota' callback before a new origin gets the chance to
+ * create its first database.
+ *
+ * When the total ApplicationCaches usage reaches its current quota, WebKit
+ * invokes the following callback function:
+ * - void reachedMaxAppCacheSize(int64_t spaceNeeded);
+ *
+ * The WebStorageSizeManager's main job is to respond to the above two callbacks
+ * by inspecting the amount of unused Web storage quota (i.e. global limit -
+ * sum of all other origins' quota) and deciding if a quota increase for the
+ * out-of-space origin is allowed or not.
+ *
+ * The default quota for an origin is its estimated size. If we cannot satisfy
+ * the estimated size, then WebCore will not create the database.
+ * Quota increases are done in steps, where the increase step is
+ * min(QUOTA_INCREASE_STEP, unused_quota).
+ *
+ * When all the Web storage space is used, the WebStorageSizeManager creates
+ * a system notification that will guide the user to the WebSettings UI. There,
+ * the user can free some of the Web storage space by deleting all the data used
+ * by an origin.
+ */
+class WebStorageSizeManager {
+    // Logging flags.
+    private final static boolean LOGV_ENABLED = com.android.browser.Browser.LOGV_ENABLED;
+    private final static boolean LOGD_ENABLED = com.android.browser.Browser.LOGD_ENABLED;
+    private final static String LOGTAG = "browser";
+    // The default quota value for an origin.
+    public final static long ORIGIN_DEFAULT_QUOTA = 3 * 1024 * 1024;  // 3MB
+    // The default value for quota increases.
+    public final static long QUOTA_INCREASE_STEP = 1 * 1024 * 1024;  // 1MB
+    // Extra padding space for appcache maximum size increases. This is needed
+    // because WebKit sends us an estimate of the amount of space needed
+    // but this estimate may, currently, be slightly less than what is actually
+    // needed. We therefore add some 'padding'.
+    // TODO(andreip): fix this in WebKit.
+    public final static long APPCACHE_MAXSIZE_PADDING = 512 * 1024; // 512KB
+    // The system status bar notification id.
+    private final static int OUT_OF_SPACE_ID = 1;
+    // The time of the last out of space notification
+    private static long mLastOutOfSpaceNotificationTime = -1;
+    // Delay between two notification in ms
+    private final static long NOTIFICATION_INTERVAL = 5 * 60 * 1000;
+    // Delay in ms used when resetting the notification time
+    private final static long RESET_NOTIFICATION_INTERVAL = 3 * 1000;
+    // The application context.
+    private final Context mContext;
+    // The global Web storage limit.
+    private final long mGlobalLimit;
+    // The maximum size of the application cache file.
+    private long mAppCacheMaxSize;
+
+    /**
+     * Interface used by the WebStorageSizeManager to obtain information
+     * about the underlying file system. This functionality is separated
+     * into its own interface mainly for testing purposes.
+     */
+    public interface DiskInfo {
+        /**
+         * @return the size of the free space in the file system.
+         */
+        public long getFreeSpaceSizeBytes();
+
+        /**
+         * @return the total size of the file system.
+         */
+        public long getTotalSizeBytes();
+    };
+
+    private DiskInfo mDiskInfo;
+    // For convenience, we provide a DiskInfo implementation that uses StatFs.
+    public static class StatFsDiskInfo implements DiskInfo {
+        private StatFs mFs;
+
+        public StatFsDiskInfo(String path) {
+            mFs = new StatFs(path);
+        }
+
+        public long getFreeSpaceSizeBytes() {
+            return mFs.getAvailableBlocks() * mFs.getBlockSize();
+        }
+
+        public long getTotalSizeBytes() {
+            return mFs.getBlockCount() * mFs.getBlockSize();
+        }
+    };
+
+    /**
+     * Interface used by the WebStorageSizeManager to obtain information
+     * about the appcache file. This functionality is separated into its own
+     * interface mainly for testing purposes.
+     */
+    public interface AppCacheInfo {
+        /**
+         * @return the current size of the appcache file.
+         */
+        public long getAppCacheSizeBytes();
+    };
+
+    // For convenience, we provide an AppCacheInfo implementation.
+    public static class WebKitAppCacheInfo implements AppCacheInfo {
+        // The name of the application cache file. Keep in sync with
+        // WebCore/loader/appcache/ApplicationCacheStorage.cpp
+        private final static String APPCACHE_FILE = "ApplicationCache.db";
+        private String mAppCachePath;
+
+        public WebKitAppCacheInfo(String path) {
+            mAppCachePath = path;
+        }
+
+        public long getAppCacheSizeBytes() {
+            File file = new File(mAppCachePath
+                    + File.separator
+                    + APPCACHE_FILE);
+            return file.length();
+        }
+    };
+
+    /**
+     * Public ctor
+     * @param ctx is the application context
+     * @param diskInfo is the DiskInfo instance used to query the file system.
+     * @param appCacheInfo is the AppCacheInfo used to query info about the
+     * appcache file.
+     */
+    public WebStorageSizeManager(Context ctx, DiskInfo diskInfo,
+            AppCacheInfo appCacheInfo) {
+        mContext = ctx;
+        mDiskInfo = diskInfo;
+        mGlobalLimit = getGlobalLimit();
+        // The initial max size of the app cache is either 25% of the global
+        // limit or the current size of the app cache file, whichever is bigger.
+        mAppCacheMaxSize = Math.max(mGlobalLimit / 4,
+                appCacheInfo.getAppCacheSizeBytes());
+    }
+
+    /**
+     * Returns the maximum size of the application cache.
+     */
+    public long getAppCacheMaxSize() {
+        return mAppCacheMaxSize;
+    }
+
+    /**
+     * The origin has exceeded its database quota.
+     * @param url the URL that exceeded the quota
+     * @param databaseIdentifier the identifier of the database on
+     *     which the transaction that caused the quota overflow was run
+     * @param currentQuota the current quota for the origin.
+     * @param totalUsedQuota is the sum of all origins' quota.
+     * @param quotaUpdater The callback to run when a decision to allow or
+     *     deny quota has been made. Don't forget to call this!
+     */
+    public void onExceededDatabaseQuota(String url,
+        String databaseIdentifier, long currentQuota, long estimatedSize,
+        long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
+        if(LOGV_ENABLED) {
+            Log.v(LOGTAG,
+                  "Received onExceededDatabaseQuota for "
+                  + url
+                  + ":"
+                  + databaseIdentifier
+                  + "(current quota: "
+                  + currentQuota
+                  + ", total used quota: "
+                  + totalUsedQuota
+                  + ")");
+        }
+        long totalUnusedQuota = mGlobalLimit - totalUsedQuota - mAppCacheMaxSize;
+
+        if (totalUnusedQuota <= 0) {
+            // There definitely isn't any more space. Fire notifications
+            // if needed and exit.
+            if (totalUsedQuota > 0) {
+                // We only fire the notification if there are some other websites
+                // using some of the quota. This avoids the degenerate case where
+                // the first ever website to use Web storage tries to use more
+                // data than it is actually available. In such a case, showing
+                // the notification would not help at all since there is nothing
+                // the user can do.
+                scheduleOutOfSpaceNotification();
+            }
+            quotaUpdater.updateQuota(currentQuota);
+            if(LOGV_ENABLED) {
+                Log.v(LOGTAG, "onExceededDatabaseQuota: out of space.");
+            }
+            return;
+        }
+        // We have enough space inside mGlobalLimit.
+        long newOriginQuota = currentQuota;
+        if (newOriginQuota == 0) {
+            // This is a new origin, give it the size it asked for if possible.
+            // If we cannot satisfy the estimatedSize, we should return 0 as
+            // returning a value less that what the site requested will lead
+            // to webcore not creating the database.
+            if (totalUnusedQuota >= estimatedSize) {
+                newOriginQuota = estimatedSize;
+            } else {
+                if (LOGV_ENABLED) {
+                    Log.v(LOGTAG,
+                          "onExceededDatabaseQuota: Unable to satisfy" +
+                          " estimatedSize for the new database " +
+                          " (estimatedSize: " + estimatedSize +
+                          ", unused quota: " + totalUnusedQuota);
+                }
+                newOriginQuota = 0;
+            }
+        } else {
+            // This is an origin we have seen before. It wants a quota
+            // increase.
+            newOriginQuota +=
+                Math.min(QUOTA_INCREASE_STEP, totalUnusedQuota);
+        }
+        quotaUpdater.updateQuota(newOriginQuota);
+
+        if(LOGV_ENABLED) {
+            Log.v(LOGTAG, "onExceededDatabaseQuota set new quota to "
+                    + newOriginQuota);
+        }
+    }
+
+    /**
+     * The Application Cache has exceeded its max size.
+     * @param spaceNeeded is the amount of disk space that would be needed
+     * in order for the last appcache operation to succeed.
+     * @param totalUsedQuota is the sum of all origins' quota.
+     * @param quotaUpdater A callback to inform the WebCore thread that a new
+     * app cache size is available. This callback must always be executed at
+     * some point to ensure that the sleeping WebCore thread is woken up.
+     */
+    public void onReachedMaxAppCacheSize(long spaceNeeded, long totalUsedQuota,
+            WebStorage.QuotaUpdater quotaUpdater) {
+        if(LOGV_ENABLED) {
+            Log.v(LOGTAG, "Received onReachedMaxAppCacheSize with spaceNeeded "
+                  + spaceNeeded + " bytes.");
+        }
+
+        long totalUnusedQuota = mGlobalLimit - totalUsedQuota - mAppCacheMaxSize;
+
+        if (totalUnusedQuota < spaceNeeded + APPCACHE_MAXSIZE_PADDING) {
+            // There definitely isn't any more space. Fire notifications
+            // if needed and exit.
+            if (totalUsedQuota > 0) {
+                // We only fire the notification if there are some other websites
+                // using some of the quota. This avoids the degenerate case where
+                // the first ever website to use Web storage tries to use more
+                // data than it is actually available. In such a case, showing
+                // the notification would not help at all since there is nothing
+                // the user can do.
+                scheduleOutOfSpaceNotification();
+            }
+            quotaUpdater.updateQuota(0);
+            if(LOGV_ENABLED) {
+                Log.v(LOGTAG, "onReachedMaxAppCacheSize: out of space.");
+            }
+            return;
+        }
+        // There is enough space to accommodate spaceNeeded bytes.
+        mAppCacheMaxSize += spaceNeeded + APPCACHE_MAXSIZE_PADDING;
+        quotaUpdater.updateQuota(mAppCacheMaxSize);
+
+        if(LOGV_ENABLED) {
+            Log.v(LOGTAG, "onReachedMaxAppCacheSize set new max size to "
+                    + mAppCacheMaxSize);
+        }
+    }
+
+    // Reset the notification time; we use this iff the user
+    // use clear all; we reset it to some time in the future instead
+    // of just setting it to -1, as the clear all method is asynchronous
+    static void resetLastOutOfSpaceNotificationTime() {
+        mLastOutOfSpaceNotificationTime = System.currentTimeMillis() -
+            NOTIFICATION_INTERVAL + RESET_NOTIFICATION_INTERVAL;
+    }
+
+    // Computes the global limit as a function of the size of the data
+    // partition and the amount of free space on that partition.
+    private long getGlobalLimit() {
+        long freeSpace = mDiskInfo.getFreeSpaceSizeBytes();
+        long fileSystemSize = mDiskInfo.getTotalSizeBytes();
+        return calculateGlobalLimit(fileSystemSize, freeSpace);
+    }
+
+    /*package*/ static long calculateGlobalLimit(long fileSystemSizeBytes,
+            long freeSpaceBytes) {
+        if (fileSystemSizeBytes <= 0
+                || freeSpaceBytes <= 0
+                || freeSpaceBytes > fileSystemSizeBytes) {
+            return 0;
+        }
+
+        long fileSystemSizeRatio =
+            2 << ((int) Math.floor(Math.log10(
+                    fileSystemSizeBytes / (1024 * 1024))));
+        long maxSizeBytes = (long) Math.min(Math.floor(
+                fileSystemSizeBytes / fileSystemSizeRatio),
+                Math.floor(freeSpaceBytes / 2));
+        // Round maxSizeBytes up to a multiple of 1024KB (but only if
+        // maxSizeBytes > 1MB).
+        long maxSizeStepBytes = 1024 * 1024;
+        if (maxSizeBytes < maxSizeStepBytes) {
+            return 0;
+        }
+        long roundingExtra = maxSizeBytes % maxSizeStepBytes == 0 ? 0 : 1;
+        return (maxSizeStepBytes
+                * ((maxSizeBytes / maxSizeStepBytes) + roundingExtra));
+    }
+
+    // Schedules a system notification that takes the user to the WebSettings
+    // activity when clicked.
+    private void scheduleOutOfSpaceNotification() {
+        if(LOGV_ENABLED) {
+            Log.v(LOGTAG, "scheduleOutOfSpaceNotification called.");
+        }
+        if (mContext == null) {
+            // mContext can be null if we're running unit tests.
+            return;
+        }
+        if ((mLastOutOfSpaceNotificationTime == -1) ||
+            (System.currentTimeMillis() - mLastOutOfSpaceNotificationTime > NOTIFICATION_INTERVAL)) {
+            // setup the notification boilerplate.
+            int icon = android.R.drawable.stat_sys_warning;
+            CharSequence title = mContext.getString(
+                    R.string.webstorage_outofspace_notification_title);
+            CharSequence text = mContext.getString(
+                    R.string.webstorage_outofspace_notification_text);
+            long when = System.currentTimeMillis();
+            Intent intent = new Intent(mContext, WebsiteSettingsActivity.class);
+            PendingIntent contentIntent =
+                PendingIntent.getActivity(mContext, 0, intent, 0);
+            Notification notification = new Notification(icon, title, when);
+            notification.setLatestEventInfo(mContext, title, text, contentIntent);
+            notification.flags |= Notification.FLAG_AUTO_CANCEL;
+            // Fire away.
+            String ns = Context.NOTIFICATION_SERVICE;
+            NotificationManager mgr =
+                (NotificationManager) mContext.getSystemService(ns);
+            if (mgr != null) {
+                mLastOutOfSpaceNotificationTime = System.currentTimeMillis();
+                mgr.notify(OUT_OF_SPACE_ID, notification);
+            }
+        }
+    }
+}
diff --git a/src/com/android/browser/WebsiteSettingsActivity.java b/src/com/android/browser/WebsiteSettingsActivity.java
new file mode 100644
index 0000000..645e084
--- /dev/null
+++ b/src/com/android/browser/WebsiteSettingsActivity.java
@@ -0,0 +1,579 @@
+/*
+ * 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.AlertDialog;
+import android.app.ListActivity;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.Browser;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
+import android.webkit.WebIconDatabase;
+import android.webkit.WebStorage;
+import android.widget.ArrayAdapter;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+/**
+ * Manage the settings for an origin.
+ * We use it to keep track of the 'HTML5' settings, i.e. database (webstorage)
+ * and Geolocation.
+ */
+public class WebsiteSettingsActivity extends ListActivity {
+
+    private String LOGTAG = "WebsiteSettingsActivity";
+    private static String sMBStored = null;
+    private SiteAdapter mAdapter = null;
+
+    class Site {
+        private String mOrigin;
+        private String mTitle;
+        private Bitmap mIcon;
+        private int mFeatures;
+
+        // These constants provide the set of features that a site may support
+        // They must be consecutive. To add a new feature, add a new FEATURE_XXX
+        // variable with value equal to the current value of FEATURE_COUNT, then
+        // increment FEATURE_COUNT.
+        private final static int FEATURE_WEB_STORAGE = 0;
+        private final static int FEATURE_GEOLOCATION = 1;
+        // The number of features available.
+        private final static int FEATURE_COUNT = 2;
+
+        public Site(String origin) {
+            mOrigin = origin;
+            mTitle = null;
+            mIcon = null;
+            mFeatures = 0;
+        }
+
+        public void addFeature(int feature) {
+            mFeatures |= (1 << feature);
+        }
+
+        public boolean hasFeature(int feature) {
+            return (mFeatures & (1 << feature)) != 0;
+        }
+
+        /**
+         * Gets the number of features supported by this site.
+         */
+        public int getFeatureCount() {
+            int count = 0;
+            for (int i = 0; i < FEATURE_COUNT; ++i) {
+                count += hasFeature(i) ? 1 : 0;
+            }
+            return count;
+        }
+
+        /**
+         * Gets the ID of the nth (zero-based) feature supported by this site.
+         * The return value is a feature ID - one of the FEATURE_XXX values.
+         * This is required to determine which feature is displayed at a given
+         * position in the list of features for this site. This is used both
+         * when populating the view and when responding to clicks on the list.
+         */
+        public int getFeatureByIndex(int n) {
+            int j = -1;
+            for (int i = 0; i < FEATURE_COUNT; ++i) {
+                j += hasFeature(i) ? 1 : 0;
+                if (j == n) {
+                    return i;
+                }
+            }
+            return -1;
+        }
+
+        public String getOrigin() {
+            return mOrigin;
+        }
+
+        public void setTitle(String title) {
+            mTitle = title;
+        }
+
+        public void setIcon(Bitmap icon) {
+            mIcon = icon;
+        }
+
+        public Bitmap getIcon() {
+            return mIcon;
+        }
+
+        public String getPrettyOrigin() {
+            return mTitle == null ? null : hideHttp(mOrigin);
+        }
+
+        public String getPrettyTitle() {
+            return mTitle == null ? hideHttp(mOrigin) : mTitle;
+        }
+
+        private String hideHttp(String str) {
+            Uri uri = Uri.parse(str);
+            return "http".equals(uri.getScheme()) ?  str.substring(7) : str;
+        }
+    }
+
+    class SiteAdapter extends ArrayAdapter<Site>
+            implements AdapterView.OnItemClickListener {
+        private int mResource;
+        private LayoutInflater mInflater;
+        private Bitmap mDefaultIcon;
+        private Bitmap mUsageEmptyIcon;
+        private Bitmap mUsageLowIcon;
+        private Bitmap mUsageHighIcon;
+        private Bitmap mLocationAllowedIcon;
+        private Bitmap mLocationDisallowedIcon;
+        private Site mCurrentSite;
+
+        public SiteAdapter(Context context, int rsc) {
+            super(context, rsc);
+            mResource = rsc;
+            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            mDefaultIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_launcher_shortcut_browser_bookmark);
+            mUsageEmptyIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_list_data_off);
+            mUsageLowIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_list_data_small);
+            mUsageHighIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_list_data_large);
+            mLocationAllowedIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_list_gps_on);
+            mLocationDisallowedIcon = BitmapFactory.decodeResource(getResources(),
+                    R.drawable.ic_list_gps_denied);
+            askForOrigins();
+        }
+
+        /**
+         * Adds the specified feature to the site corresponding to supplied
+         * origin in the map. Creates the site if it does not already exist.
+         */
+        private void addFeatureToSite(Map sites, String origin, int feature) {
+            Site site = null;
+            if (sites.containsKey(origin)) {
+                site = (Site) sites.get(origin);
+            } else {
+                site = new Site(origin);
+                sites.put(origin, site);
+            }
+            site.addFeature(feature);
+        }
+
+        public void askForOrigins() {
+            // Get the list of origins we want to display.
+            // All 'HTML 5 modules' (Database, Geolocation etc) form these
+            // origin strings using WebCore::SecurityOrigin::toString(), so it's
+            // safe to group origins here. Note that WebCore::SecurityOrigin
+            // uses 0 (which is not printed) for the port if the port is the
+            // default for the protocol. Eg http://www.google.com and
+            // http://www.google.com:80 both record a port of 0 and hence
+            // toString() == 'http://www.google.com' for both.
+
+            WebStorage.getInstance().getOrigins(new ValueCallback<Map>() {
+                public void onReceiveValue(Map origins) {
+                    Map sites = new HashMap<String, Site>();
+                    if (origins != null) {
+                        Iterator<String> iter = origins.keySet().iterator();
+                        while (iter.hasNext()) {
+                            addFeatureToSite(sites, iter.next(), Site.FEATURE_WEB_STORAGE);
+                        }
+                    }
+                    askForGeolocation(sites);
+                }
+            });
+        }
+
+        public void askForGeolocation(final Map sites) {
+            GeolocationPermissions.getInstance().getOrigins(new ValueCallback<Set>() {
+                public void onReceiveValue(Set origins) {
+                    if (origins != null) {
+                        Iterator<String> iter = origins.iterator();
+                        while (iter.hasNext()) {
+                            addFeatureToSite(sites, iter.next(), Site.FEATURE_GEOLOCATION);
+                        }
+                    }
+                    populateIcons(sites);
+                    populateOrigins(sites);
+                }
+            });
+        }
+
+        public void populateIcons(Map sites) {
+            // Create a map from host to origin. This is used to add metadata
+            // (title, icon) for this origin from the bookmarks DB.
+            HashMap hosts = new HashMap<String, Set<Site> >();
+            Set keys = sites.keySet();
+            Iterator<String> originIter = keys.iterator();
+            while (originIter.hasNext()) {
+                String origin = originIter.next();
+                Site site = (Site) sites.get(origin);
+                String host = Uri.parse(origin).getHost();
+                Set hostSites = null;
+                if (hosts.containsKey(host)) {
+                    hostSites = (Set) hosts.get(host);
+                } else {
+                    hostSites = new HashSet<Site>();
+                    hosts.put(host, hostSites);
+                }
+                hostSites.add(site);
+            }
+
+            // Check the bookmark DB. If we have data for a host used by any of
+            // our origins, use it to set their title and favicon
+            Cursor c = getContext().getContentResolver().query(Browser.BOOKMARKS_URI,
+                    new String[] { Browser.BookmarkColumns.URL, Browser.BookmarkColumns.TITLE,
+                    Browser.BookmarkColumns.FAVICON }, "bookmark = 1", null, null);
+
+            if ((c != null) && c.moveToFirst()) {
+                int urlIndex = c.getColumnIndex(Browser.BookmarkColumns.URL);
+                int titleIndex = c.getColumnIndex(Browser.BookmarkColumns.TITLE);
+                int faviconIndex = c.getColumnIndex(Browser.BookmarkColumns.FAVICON);
+                do {
+                    String url = c.getString(urlIndex);
+                    String host = Uri.parse(url).getHost();
+                    if (hosts.containsKey(host)) {
+                        String title = c.getString(titleIndex);
+                        Bitmap bmp = null;
+                        byte[] data = c.getBlob(faviconIndex);
+                        if (data != null) {
+                            bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
+                        }
+                        Set matchingSites = (Set) hosts.get(host);
+                        Iterator<Site> sitesIter = matchingSites.iterator();
+                        while (sitesIter.hasNext()) {
+                            Site site = sitesIter.next();
+                            site.setTitle(title);
+                            if (bmp != null) {
+                                site.setIcon(bmp);
+                            }
+                        }
+                    }
+                } while (c.moveToNext());
+            }
+
+            c.close();
+        }
+
+
+        public void populateOrigins(Map sites) {
+            clear();
+
+            // We can now simply populate our array with Site instances
+            Set keys = sites.keySet();
+            Iterator<String> originIter = keys.iterator();
+            while (originIter.hasNext()) {
+                String origin = originIter.next();
+                Site site = (Site) sites.get(origin);
+                add(site);
+            }
+
+            notifyDataSetChanged();
+
+            if (getCount() == 0) {
+                finish(); // we close the screen
+            }
+        }
+
+        public int getCount() {
+            if (mCurrentSite == null) {
+                return super.getCount();
+            }
+            return mCurrentSite.getFeatureCount();
+        }
+
+        public String sizeValueToString(long bytes) {
+            // We display the size in MB, to 1dp, rounding up to the next 0.1MB.
+            // bytes should always be greater than zero.
+            if (bytes <= 0) {
+                Log.e(LOGTAG, "sizeValueToString called with non-positive value");
+                return "0";
+            }
+            float megabytes = (float) bytes / (1024.0F * 1024.0F);
+            int truncated = (int) Math.ceil(megabytes * 10.0F);
+            float result = (float) (truncated / 10.0F);
+            return String.valueOf(result);
+        }
+
+        /*
+         * If we receive the back event and are displaying
+         * site's settings, we want to go back to the main
+         * list view. If not, we just do nothing (see
+         * dispatchKeyEvent() below).
+         */
+        public boolean backKeyPressed() {
+            if (mCurrentSite != null) {
+                mCurrentSite = null;
+                askForOrigins();
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * @hide
+         * Utility function
+         * Set the icon according to the usage
+         */
+        public void setIconForUsage(ImageView usageIcon, long usageInBytes) {
+            float usageInMegabytes = (float) usageInBytes / (1024.0F * 1024.0F);
+            usageIcon.setVisibility(View.VISIBLE);
+
+            // We set the correct icon:
+            // 0 < empty < 0.1MB
+            // 0.1MB < low < 5MB
+            // 5MB < high
+            if (usageInMegabytes <= 0.1) {
+                usageIcon.setImageBitmap(mUsageEmptyIcon);
+            } else if (usageInMegabytes > 0.1 && usageInMegabytes <= 5) {
+                usageIcon.setImageBitmap(mUsageLowIcon);
+            } else if (usageInMegabytes > 5) {
+                usageIcon.setImageBitmap(mUsageHighIcon);
+            }
+        }
+
+        public View getView(int position, View convertView, ViewGroup parent) {
+            View view;
+            final TextView title;
+            final TextView subtitle;
+            ImageView icon;
+            final ImageView usageIcon;
+            final ImageView locationIcon;
+
+            if (convertView == null) {
+                view = mInflater.inflate(mResource, parent, false);
+            } else {
+                view = convertView;
+            }
+
+            title = (TextView) view.findViewById(R.id.title);
+            subtitle = (TextView) view.findViewById(R.id.subtitle);
+            icon = (ImageView) view.findViewById(R.id.icon);
+            usageIcon = (ImageView) view.findViewById(R.id.usage_icon);
+            locationIcon = (ImageView) view.findViewById(R.id.location_icon);
+            usageIcon.setVisibility(View.GONE);
+            locationIcon.setVisibility(View.GONE);
+
+            if (mCurrentSite == null) {
+                setTitle(getString(R.string.pref_extras_website_settings));
+
+                Site site = getItem(position);
+                title.setText(site.getPrettyTitle());
+                subtitle.setText(site.getPrettyOrigin());
+                icon.setVisibility(View.VISIBLE);
+                usageIcon.setVisibility(View.INVISIBLE);
+                locationIcon.setVisibility(View.INVISIBLE);
+                Bitmap bmp = site.getIcon();
+                if (bmp == null) {
+                    bmp = mDefaultIcon;
+                }
+                icon.setImageBitmap(bmp);
+                // We set the site as the view's tag,
+                // so that we can get it in onItemClick()
+                view.setTag(site);
+
+                String origin = site.getOrigin();
+                if (site.hasFeature(Site.FEATURE_WEB_STORAGE)) {
+                    WebStorage.getInstance().getUsageForOrigin(origin, new ValueCallback<Long>() {
+                        public void onReceiveValue(Long value) {
+                            if (value != null) {
+                                setIconForUsage(usageIcon, value.longValue());
+                            }
+                        }
+                    });
+                }
+
+                if (site.hasFeature(Site.FEATURE_GEOLOCATION)) {
+                    locationIcon.setVisibility(View.VISIBLE);
+                    GeolocationPermissions.getInstance().getAllowed(origin, new ValueCallback<Boolean>() {
+                        public void onReceiveValue(Boolean allowed) {
+                            if (allowed != null) {
+                                if (allowed.booleanValue()) {
+                                    locationIcon.setImageBitmap(mLocationAllowedIcon);
+                                } else {
+                                    locationIcon.setImageBitmap(mLocationDisallowedIcon);
+                                }
+                            }
+                        }
+                    });
+                }
+            } else {
+                setTitle(mCurrentSite.getPrettyTitle());
+                icon.setVisibility(View.GONE);
+                String origin = mCurrentSite.getOrigin();
+                switch (mCurrentSite.getFeatureByIndex(position)) {
+                    case Site.FEATURE_WEB_STORAGE:
+                        WebStorage.getInstance().getUsageForOrigin(origin, new ValueCallback<Long>() {
+                            public void onReceiveValue(Long value) {
+                                if (value != null) {
+                                    String usage = sizeValueToString(value.longValue()) + " " + sMBStored;
+                                    title.setText(R.string.webstorage_clear_data_title);
+                                    subtitle.setText(usage);
+                                }
+                            }
+                        });
+                        break;
+                    case Site.FEATURE_GEOLOCATION:
+                        title.setText(R.string.geolocation_settings_page_title);
+                        GeolocationPermissions.getInstance().getAllowed(origin, new ValueCallback<Boolean>() {
+                            public void onReceiveValue(Boolean allowed) {
+                                if (allowed != null) {
+                                    if (allowed.booleanValue()) {
+                                        subtitle.setText(R.string.geolocation_settings_page_summary_allowed);
+                                    } else {
+                                        subtitle.setText(R.string.geolocation_settings_page_summary_not_allowed);
+                                    }
+                                }
+                            }
+                        });
+                        break;
+                }
+            }
+
+            return view;
+        }
+
+        public void onItemClick(AdapterView<?> parent,
+                                View view,
+                                int position,
+                                long id) {
+            if (mCurrentSite != null) {
+                switch (mCurrentSite.getFeatureByIndex(position)) {
+                    case Site.FEATURE_WEB_STORAGE:
+                        new AlertDialog.Builder(getContext())
+                            .setTitle(R.string.webstorage_clear_data_dialog_title)
+                            .setMessage(R.string.webstorage_clear_data_dialog_message)
+                            .setPositiveButton(R.string.webstorage_clear_data_dialog_ok_button,
+                                               new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dlg, int which) {
+                                    WebStorage.getInstance().deleteOrigin(mCurrentSite.getOrigin());
+                                    mCurrentSite = null;
+                                    askForOrigins();
+                                }})
+                            .setNegativeButton(R.string.webstorage_clear_data_dialog_cancel_button, null)
+                            .setIcon(android.R.drawable.ic_dialog_alert)
+                            .show();
+                        break;
+                    case Site.FEATURE_GEOLOCATION:
+                        new AlertDialog.Builder(getContext())
+                            .setTitle(R.string.geolocation_settings_page_dialog_title)
+                            .setMessage(R.string.geolocation_settings_page_dialog_message)
+                            .setPositiveButton(R.string.geolocation_settings_page_dialog_ok_button,
+                                               new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dlg, int which) {
+                                    GeolocationPermissions.getInstance().clear(mCurrentSite.getOrigin());
+                                    mCurrentSite = null;
+                                    askForOrigins();
+                                }})
+                            .setNegativeButton(R.string.geolocation_settings_page_dialog_cancel_button, null)
+                            .setIcon(android.R.drawable.ic_dialog_alert)
+                            .show();
+                        break;
+                }
+            } else {
+                mCurrentSite = (Site) view.getTag();
+                notifyDataSetChanged();
+            }
+        }
+    }
+
+    /**
+     * Intercepts the back key to immediately notify
+     * NativeDialog that we are done.
+     */
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if ((event.getKeyCode() == KeyEvent.KEYCODE_BACK)
+            && (event.getAction() == KeyEvent.ACTION_DOWN)) {
+            if ((mAdapter != null) && (mAdapter.backKeyPressed())){
+                return true; // event consumed
+            }
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        if (sMBStored == null) {
+            sMBStored = getString(R.string.webstorage_origin_summary_mb_stored);
+        }
+        mAdapter = new SiteAdapter(this, R.layout.website_settings_row);
+        setListAdapter(mAdapter);
+        getListView().setOnItemClickListener(mAdapter);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        MenuInflater inflater = getMenuInflater();
+        inflater.inflate(R.menu.websitesettings, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        // If we aren't listing any sites hide the clear all button (and hence the menu).
+        return mAdapter.getCount() > 0;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.website_settings_menu_clear_all:
+                // Show the prompt to clear all origins of their data and geolocation permissions.
+                new AlertDialog.Builder(this)
+                        .setTitle(R.string.website_settings_clear_all_dialog_title)
+                        .setMessage(R.string.website_settings_clear_all_dialog_message)
+                        .setPositiveButton(R.string.website_settings_clear_all_dialog_ok_button,
+                                new AlertDialog.OnClickListener() {
+                                    public void onClick(DialogInterface dlg, int which) {
+                                        WebStorage.getInstance().deleteAllData();
+                                        GeolocationPermissions.getInstance().clearAll();
+                                        WebStorageSizeManager.resetLastOutOfSpaceNotificationTime();
+                                        mAdapter.askForOrigins();
+                                        finish();
+                                    }})
+                        .setNegativeButton(R.string.website_settings_clear_all_dialog_cancel_button, null)
+                        .setIcon(android.R.drawable.ic_dialog_alert)
+                        .show();
+                return true;
+        }
+        return false;
+    }
+}
diff --git a/tests/Android.mk b/tests/Android.mk
new file mode 100644
index 0000000..f86942d
--- /dev/null
+++ b/tests/Android.mk
@@ -0,0 +1,37 @@
+# Copyright 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.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_JAVA_LIBRARIES := android.test.runner
+
+# Include all test java files.
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+# Notice that we don't have to include the src files of Browser because, by
+# running the tests using an instrumentation targeting Browser, we
+# automatically get all of its classes loaded into our environment.
+
+LOCAL_PACKAGE_NAME := BrowserTests
+
+LOCAL_INSTRUMENTATION_FOR := Browser
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_PACKAGE)
+
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
new file mode 100644
index 0000000..51715a9
--- /dev/null
+++ b/tests/AndroidManifest.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.
+-->
+
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.browser.tests">
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    This declares that this app uses the instrumentation test runner targeting
+    the package of com.android.email.  To run the tests use the command:
+    "adb shell am instrument -w com.android.browser.tests/android.test.InstrumentationTestRunner"
+    -->
+    <instrumentation android:name="android.test.InstrumentationTestRunner"
+                     android:targetPackage="com.android.browser"
+                     android:label="Tests for Browser."/>
+
+</manifest>
diff --git a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
new file mode 100644
index 0000000..b7956d7
--- /dev/null
+++ b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
@@ -0,0 +1,231 @@
+/*
+ * 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.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+import android.webkit.WebStorage;
+
+/**
+ * This is a series of unit tests for the WebStorageSizeManager class.
+ *
+ */
+@MediumTest
+public class WebStorageSizeManagerUnitTests extends AndroidTestCase {
+    // Used for testing the out-of-space callbacks.
+    private long mNewQuota;
+    // Callback functor that sets a new quota in case of out-of-space scenarios.
+    private class MockQuotaUpdater implements WebStorage.QuotaUpdater {
+        public void updateQuota(long newQuota) {
+            mNewQuota = newQuota;
+        }
+    }
+
+    // Mock the DiskInfo.
+    private class MockDiskInfo implements WebStorageSizeManager.DiskInfo {
+        private long mFreeSize;
+        private long mTotalSize;
+
+        public long getFreeSpaceSizeBytes() {
+            return mFreeSize;
+        }
+
+        public long getTotalSizeBytes() {
+            return mTotalSize;
+        }
+
+        public void setFreeSpaceSizeBytes(long freeSize) {
+            mFreeSize = freeSize;
+        }
+
+        public void setTotalSizeBytes(long totalSize) {
+            mTotalSize = totalSize;
+        }
+    }
+
+    // Mock the AppCacheInfo
+    public class MockAppCacheInfo implements WebStorageSizeManager.AppCacheInfo {
+        private long mAppCacheSize;
+
+        public long getAppCacheSizeBytes() {
+            return mAppCacheSize;
+        }
+
+        public void setAppCacheSizeBytes(long appCacheSize) {
+            mAppCacheSize = appCacheSize;
+        }
+    }
+
+    private MockQuotaUpdater mQuotaUpdater = new MockQuotaUpdater();
+    private final MockDiskInfo mDiskInfo = new MockDiskInfo();
+    private final MockAppCacheInfo mAppCacheInfo = new MockAppCacheInfo();
+    // Utility for making size computations easier to read.
+    private long bytes(double megabytes) {
+        return (new Double(megabytes * 1024 * 1024)).longValue();
+    }
+    /**
+     * Test the onExceededDatabaseQuota and onReachedMaxAppCacheSize callbacks
+     */
+    public void testCallbacks() {
+        long totalUsedQuota = 0;
+        final long quotaIncrease = WebStorageSizeManager.QUOTA_INCREASE_STEP;  // 1MB
+
+        // We have 75 MB total, 24MB free so the global limit will be 12 MB.
+        mDiskInfo.setTotalSizeBytes(bytes(75));
+        mDiskInfo.setFreeSpaceSizeBytes(bytes(24));
+        // We have an appcache file size of 0 MB.
+        mAppCacheInfo.setAppCacheSizeBytes(0);
+        // Create the manager.
+        WebStorageSizeManager manager = new WebStorageSizeManager(null, mDiskInfo, mAppCacheInfo);
+        // We add origin 1.
+        long origin1Quota = 0;
+        long origin1EstimatedSize = bytes(3.5);
+        manager.onExceededDatabaseQuota("1", "1", origin1Quota, origin1EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin1EstimatedSize, mNewQuota);
+        origin1Quota = mNewQuota;
+        totalUsedQuota += origin1Quota;
+
+        // We add origin 2.
+        long origin2Quota = 0;
+        long origin2EstimatedSize = bytes(2.5);
+        manager.onExceededDatabaseQuota("2", "2", origin2Quota, origin2EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin2EstimatedSize, mNewQuota);
+        origin2Quota = mNewQuota;
+        totalUsedQuota += origin2Quota;
+
+        // Origin 1 runs out of space.
+        manager.onExceededDatabaseQuota("1", "1", origin1Quota, origin1EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin1EstimatedSize + quotaIncrease, mNewQuota);
+        totalUsedQuota -= origin1Quota;
+        origin1Quota = mNewQuota;
+        totalUsedQuota += origin1Quota;
+
+        // Origin 2 runs out of space.
+        manager.onExceededDatabaseQuota("2", "2", origin2Quota, origin2EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin2EstimatedSize + quotaIncrease, mNewQuota);
+        totalUsedQuota -= origin2Quota;
+        origin2Quota = mNewQuota;
+        totalUsedQuota += origin2Quota;
+
+        // We add origin 3. TotalUsedQuota is 8 (3.5 + 2.5 + 1 + 1). AppCacheMaxSize is 3 (12 / 4).
+        // So we have 1 MB free.
+        long origin3Quota = 0;
+        long origin3EstimatedSize = bytes(5);
+        manager.onExceededDatabaseQuota("3", "3", origin3Quota, origin3EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(0, mNewQuota);  // We cannot satisfy the estimatedSize
+        origin3Quota = mNewQuota;
+        totalUsedQuota += origin3Quota;
+
+        // Origin 1 runs out of space again. It should increase it's quota to take the last 1MB.
+        manager.onExceededDatabaseQuota("1", "1", origin1Quota, origin1EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin1Quota + quotaIncrease, mNewQuota);
+        totalUsedQuota -= origin1Quota;
+        origin1Quota = mNewQuota;
+        totalUsedQuota += origin1Quota;
+
+        // Origin 1 runs out of space again. It should inow fail to increase in size.
+        manager.onExceededDatabaseQuota("1", "1", origin1Quota, origin1EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(origin1Quota, mNewQuota);
+
+        // We try adding a new origin. Which will fail.
+        manager.onExceededDatabaseQuota("4", "4", 0, bytes(1), totalUsedQuota, mQuotaUpdater);
+        assertEquals(0, mNewQuota);
+
+        // AppCache size increases to 2MB...
+        mAppCacheInfo.setAppCacheSizeBytes(bytes(2));
+        // ... and wants 2MB more. Fail.
+        manager.onReachedMaxAppCacheSize(bytes(2), totalUsedQuota, mQuotaUpdater);
+        assertEquals(0, mNewQuota);
+
+        // The user nukes origin 2
+        totalUsedQuota -= origin2Quota;
+        origin2Quota = 0;
+        // TotalUsedQuota is 5.5 (9 - 3.5). AppCacheMaxSize is 3. AppCacheSize is 2.
+        // AppCache wants 1.5MB more
+        manager.onReachedMaxAppCacheSize(bytes(1.5), totalUsedQuota, mQuotaUpdater);
+        mAppCacheInfo.setAppCacheSizeBytes(mAppCacheInfo.getAppCacheSizeBytes() + bytes(2.5));
+        assertEquals(mAppCacheInfo.getAppCacheSizeBytes(), mNewQuota - WebStorageSizeManager.APPCACHE_MAXSIZE_PADDING);
+
+        // We try adding a new origin. This time we succeed.
+        // TotalUsedQuota is 5.5. AppCacheMaxSize is 5.0. So we have 12 - 10.5 = 1.5 available.
+        long origin4Quota = 0;
+        long origin4EstimatedSize = bytes(1.5);
+        manager.onExceededDatabaseQuota("4", "4", origin4Quota, origin4EstimatedSize, totalUsedQuota, mQuotaUpdater);
+        assertEquals(bytes(1.5), mNewQuota);
+        origin4Quota = mNewQuota;
+        totalUsedQuota += origin4Quota;
+    }
+    /**
+     * Test the application caches max size calculator.
+     */
+    public void testCalculateGlobalLimit() {
+        long fileSystemSize = 78643200;  // 75 MB
+        long freeSpaceSize = 25165824;  // 24 MB
+        long maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(12582912, maxSize);  // 12MB
+
+        fileSystemSize = 78643200;  // 75 MB
+        freeSpaceSize = 60 * 1024 * 1024;  // 60MB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(19922944, maxSize);  // 19MB
+
+        fileSystemSize = 8589934592L;  // 8 GB
+        freeSpaceSize = 4294967296L;  // 4 GB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(536870912L, maxSize);  // 512 MB
+
+        fileSystemSize = -14;
+        freeSpaceSize = 21;
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(0, maxSize);
+
+        fileSystemSize = 100;
+        freeSpaceSize = 101;
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(0, maxSize);
+
+        fileSystemSize = 3774873; // ~4.2 MB
+        freeSpaceSize = 2560000;  // ~2.4 MB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(2097152, maxSize);  // 2 MB
+
+        fileSystemSize = 4404019; // ~4.2 MB
+        freeSpaceSize = 3774873;  // ~3.6 MB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(2097152, maxSize);  // 2 MB
+
+        fileSystemSize = 4404019; // ~4.2 MB
+        freeSpaceSize = 4404019;  // ~4.2 MB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(3145728, maxSize);  // 3 MB
+
+        fileSystemSize = 1048576; // 1 MB
+        freeSpaceSize = 1048575;  // 1 MB - 1 byte
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(0, maxSize);
+
+        fileSystemSize = 3774873; // ~3.6 MB
+        freeSpaceSize = 2097151;  // 2 MB - 1 byte
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(0, maxSize);
+
+        fileSystemSize = 3774873; // ~3.6 MB
+        freeSpaceSize = 2097151;  // 2 MB
+        maxSize = WebStorageSizeManager.calculateGlobalLimit(fileSystemSize, freeSpaceSize);
+        assertEquals(0, maxSize);
+    }
+}