Merge "Omnibox tweaks" into honeycomb
diff --git a/res/drawable-hdpi/appwidget_bg.9.png b/res/drawable-hdpi/appwidget_bg.9.png
deleted file mode 100644
index 3b29eae..0000000
--- a/res/drawable-hdpi/appwidget_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/frame_bookmark_thumb_pressed.9.png b/res/drawable-hdpi/frame_bookmark_thumb_pressed.9.png
deleted file mode 100644
index a1190d9..0000000
--- a/res/drawable-hdpi/frame_bookmark_thumb_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/header_bg_bookmark_widget_holo.png b/res/drawable-hdpi/header_bg_bookmark_widget_holo.png
deleted file mode 100644
index e709698..0000000
--- a/res/drawable-hdpi/header_bg_bookmark_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png b/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png
deleted file mode 100644
index b3406fd..0000000
--- a/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png b/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png
deleted file mode 100644
index b6cfc4c..0000000
--- a/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/header_row_press_bookmark_widget_holo.9.png b/res/drawable-hdpi/suggest_item_press_holo.9.png
similarity index 100%
rename from res/drawable-hdpi/header_row_press_bookmark_widget_holo.9.png
rename to res/drawable-hdpi/suggest_item_press_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appwidget_bg.9.png b/res/drawable-mdpi/appwidget_bg.9.png
deleted file mode 100644
index afe41b6..0000000
--- a/res/drawable-mdpi/appwidget_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/frame_bookmark_thumb_pressed.9.png b/res/drawable-mdpi/frame_bookmark_thumb_pressed.9.png
deleted file mode 100755
index 8bae932..0000000
--- a/res/drawable-mdpi/frame_bookmark_thumb_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png b/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png
deleted file mode 100644
index b745159..0000000
--- a/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png b/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png
deleted file mode 100644
index ed8760f..0000000
--- a/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/header_row_press_bookmark_widget_holo.9.png b/res/drawable-mdpi/suggest_item_press_holo.9.png
similarity index 100%
rename from res/drawable-mdpi/header_row_press_bookmark_widget_holo.9.png
rename to res/drawable-mdpi/suggest_item_press_holo.9.png
Binary files differ
diff --git a/res/drawable/suggest_item_selector.xml b/res/drawable/suggest_item_selector.xml
index 777a8fb..1184e5b 100644
--- a/res/drawable/suggest_item_selector.xml
+++ b/res/drawable/suggest_item_selector.xml
@@ -17,6 +17,6 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android"
         android:exitFadeDuration="@android:integer/config_mediumAnimTime">
     <item android:state_pressed="true"
-        android:drawable="@drawable/header_row_press_bookmark_widget_holo" />
+        android:drawable="@drawable/suggest_item_press_holo" />
     <item android:state_pressed="false" android:drawable="@drawable/clear" />
 </selector>
diff --git a/res/drawable/widget_background.xml b/res/drawable/widget_background.xml
deleted file mode 100644
index 4c59d60..0000000
--- a/res/drawable/widget_background.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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
-        android:drawable="@drawable/bg_bookmark_widget_holo">
-    </item>
-
-</layer-list>
diff --git a/res/drawable/widget_header_selector.xml b/res/drawable/widget_header_selector.xml
deleted file mode 100644
index 0e6bc47..0000000
--- a/res/drawable/widget_header_selector.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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"
-        android:exitFadeDuration="@android:integer/config_mediumAnimTime">
-    <item
-        android:state_window_focused="false"
-        android:drawable="@android:color/transparent" />
-    <item
-        android:state_focused="true"
-        android:state_pressed="true"
-        android:drawable="@drawable/header_row_press_bookmark_widget_holo" />
-    <item
-        android:state_focused="false"
-        android:state_pressed="true"
-        android:drawable="@drawable/header_row_press_bookmark_widget_holo" />
-    <item
-        android:state_focused="true"
-        android:drawable="@drawable/header_row_focused_bookmark_widget_holo" />
-</selector>
diff --git a/res/layout/bookmarkwidget.xml b/res/layout/bookmarkwidget.xml
deleted file mode 100644
index c7c2a90..0000000
--- a/res/layout/bookmarkwidget.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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="match_parent"
-    android:layout_height="match_parent"
-    android:padding="8dip"
-    android:orientation="vertical"
-    android:background="@drawable/appwidget_bg" >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal" >
-
-        <ImageView
-            android:id="@+id/previous"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:padding="10dip"
-            android:src="@*android:drawable/ic_btn_find_prev" />
-
-        <TextView
-            android:id="@+id/title"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:layout_gravity="center"
-            android:text="@string/title_bar_loading"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary" />
-
-        <ImageView
-            android:id="@+id/next"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:padding="10dip"
-            android:src="@*android:drawable/ic_btn_find_next" />
-
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/image"
-        android:visibility="gone"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:scaleType="fitXY"
-        android:padding="5dip"
-        android:gravity="center" />
-
-    <RelativeLayout
-        android:id="@+id/progress"
-        android:visibility="visible"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:gravity="center" >
-
-        <ProgressBar
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:indeterminateOnly="true" />
-
-    </RelativeLayout>
-
-</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 05042db..02f94ce 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -254,6 +254,9 @@
     <!-- Context Menu item to save the webpage referred to by this link to the
             SD card (external storage) -->
     <string name="contextmenu_savelink">Save link</string>
+    <!-- Context Menu item to send the url of the selected link to someone else,
+            via Gmail or another app [CHAR LIMIT=50] -->
+    <string name="contextmenu_sharelink">Share link</string>
     <!-- Context Menu item -->
     <string name="contextmenu_copy">Copy</string>
     <!-- Context Menu item to copy the url of the selected link to the
diff --git a/res/xml/bookmarkwidget.xml b/res/xml/bookmarkwidget.xml
deleted file mode 100644
index adbe5f2..0000000
--- a/res/xml/bookmarkwidget.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-
-<!-- 4x4 Widget displaying the user's bookmarks as thumbnails. -->
-<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
-    android:minWidth="294dip"
-    android:minHeight="294dip"
-    android:updatePeriodMillis="3600000"
-    android:initialLayout="@layout/bookmarkwidget"
-    >
-</appwidget-provider>
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 5ccfdda..98fc349 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -430,7 +430,9 @@
                         CombinedBookmarkHistoryView.FRAGMENT_ID_HISTORY
                         : CombinedBookmarkHistoryView.FRAGMENT_ID_BOOKMARKS,
                 extras);
-        getEmbeddedTitleBar().setVisibility(View.GONE);
+        FrameLayout wrapper =
+            (FrameLayout) mContentView.findViewById(R.id.webview_wrapper);
+        wrapper.setVisibility(View.GONE);
         hideFakeTitleBar();
         dismissIME();
         if (mActiveTab != null) {
@@ -447,7 +449,9 @@
     public void hideComboView() {
         if (mComboView != null) {
             mContentView.removeView(mComboView);
-            getEmbeddedTitleBar().setVisibility(View.VISIBLE);
+            FrameLayout wrapper =
+                (FrameLayout) mContentView.findViewById(R.id.webview_wrapper);
+            wrapper.setVisibility(View.VISIBLE);
             mComboView = null;
         }
         if (mActiveTab != null) {