| Index: chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
|
| index 74b4d4fd871b804d06f7adab573edfd7175f3bd2..274089e93a45e509196a5a70ac6f3e648fa65305 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
|
| @@ -9,7 +9,6 @@ import android.app.ActivityManager;
|
| import android.content.ComponentName;
|
| import android.content.Context;
|
| import android.content.Intent;
|
| -import android.graphics.Rect;
|
| import android.net.Uri;
|
| import android.provider.Browser;
|
| import android.support.annotation.VisibleForTesting;
|
| @@ -23,7 +22,6 @@ import android.view.MenuItem;
|
| import android.view.ViewGroup;
|
| import android.widget.TextView;
|
|
|
| -import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.base.ContextUtils;
|
| import org.chromium.base.metrics.RecordHistogram;
|
| import org.chromium.base.metrics.RecordUserAction;
|
| @@ -61,8 +59,6 @@ public class HistoryManager implements OnMenuItemClickListener, SignInStateObser
|
|
|
| private static HistoryProvider sProviderForTests;
|
|
|
| - private final int mListItemLateralShadowSizePx;
|
| -
|
| private final Activity mActivity;
|
| private final boolean mIsSeparateActivity;
|
| private final SelectableListLayout<HistoryItem> mSelectableListLayout;
|
| @@ -107,24 +103,12 @@ public class HistoryManager implements OnMenuItemClickListener, SignInStateObser
|
| mToolbar = (HistoryManagerToolbar) mSelectableListLayout.initializeToolbar(
|
| R.layout.history_toolbar, mSelectionDelegate, R.string.menu_history, null,
|
| R.id.normal_menu_group, R.id.selection_mode_menu_group,
|
| - R.color.default_primary_color, false, this);
|
| + R.color.default_primary_color, this);
|
| mToolbar.setManager(this);
|
| mToolbar.initializeSearchView(this, R.string.history_manager_search, R.id.search_menu_id);
|
|
|
| - // 4. Configure values for HorizontalDisplayStyle.WIDE and HorizontalDisplayStyle.REGULAR.
|
| - // The list item shadow is part of the drawable nine-patch used as the list item background.
|
| - // Use the dimensions of the shadow (from the drawable's padding) to calculate the margins
|
| - // to use in the regular and wide display styles.
|
| - Rect listItemShadow = new Rect();
|
| - ApiCompatibilityUtils.getDrawable(
|
| - mActivity.getResources(), R.drawable.card_middle).getPadding(listItemShadow);
|
| -
|
| - assert listItemShadow.left == listItemShadow.right;
|
| - // The list item shadow size is used in HorizontalDisplayStyle.WIDE to visually align other
|
| - // elements with the edge of the list items.
|
| - mListItemLateralShadowSizePx = listItemShadow.left;
|
| -
|
| - mSelectableListLayout.setHasWideDisplayStyle(mListItemLateralShadowSizePx);
|
| + // 4. Width constrain the SelectableListLayout.
|
| + mSelectableListLayout.setHasWideDisplayStyle();
|
|
|
| // 5. Initialize empty view.
|
| mEmptyView = mSelectableListLayout.initializeEmptyView(
|
| @@ -227,7 +211,7 @@ public class HistoryManager implements OnMenuItemClickListener, SignInStateObser
|
| /**
|
| * See {@link SelectableListLayout#detachToolbarView()}.
|
| */
|
| - public SelectableListToolbar detachToolbarView() {
|
| + public SelectableListToolbar<HistoryItem> detachToolbarView() {
|
| return mSelectableListLayout.detachToolbarView();
|
| }
|
|
|
| @@ -340,16 +324,6 @@ public class HistoryManager implements OnMenuItemClickListener, SignInStateObser
|
| return mSelectableListLayout;
|
| }
|
|
|
| - /**
|
| - * @return The px size of the lateral shadow in the 9-patch used for the list item background.
|
| - * This value should be used in the regular horizontal display style to visually align
|
| - * elements with the edge of the list items.
|
| - * @see org.chromium.chrome.browser.widget.displaystyle.HorizontalDisplayStyle#REGULAR
|
| - */
|
| - public int getListItemLateralShadowSizePx() {
|
| - return mListItemLateralShadowSizePx;
|
| - }
|
| -
|
| private void openItemsInNewTabs(List<HistoryItem> items, boolean isIncognito) {
|
| recordSelectionCountHistorgram("Open");
|
| recordUserActionWithOptionalSearch("OpenSelected" + (isIncognito ? "Incognito" : ""));
|
|
|