Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3793)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java

Issue 12578027: Removed 'show full history' from navigation popup. Cleaned up associated dead code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-show-full-history-from-menu-222282
Patch Set: Removed broken test (checking click on show full history which we removed) Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java
index ba955616515535e0b97a58f903db19307037da8b..86266c4e990beb13b71fad7dc15a75b5da0d12d5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/NavigationPopup.java
@@ -48,11 +48,9 @@ public class NavigationPopup extends ListPopupWindow implements AdapterView.OnIt
private static final int MAXIMUM_HISTORY_ITEMS = 8;
private final Context mContext;
- private final NavigationPopupDelegate mDelegate;
private final NavigationClient mNavigationClient;
private final NavigationHistory mHistory;
private final NavigationAdapter mAdapter;
- private final TextView mShowHistoryView;
private final int mListItemHeight;
private final int mFaviconSize;
@@ -61,29 +59,16 @@ public class NavigationPopup extends ListPopupWindow implements AdapterView.OnIt
private int mNativeNavigationPopup;
/**
- * Delegate functionality required to operate on the history.
- */
- public interface NavigationPopupDelegate {
- /** Open the complete browser history page */
- void openHistory();
- }
-
- /**
* Constructs a new popup with the given history information.
*
* @param context The context used for building the popup.
- * @param delegate The delegate that handles history actions outside of the given
- * {@link ContentViewCore}.
* @param navigationClient The owner of the history being displayed.
* @param isForward Whether to request forward navigation entries.
*/
public NavigationPopup(
- Context context, NavigationPopupDelegate delegate,
- NavigationClient navigationClient, boolean isForward) {
+ Context context, NavigationClient navigationClient, boolean isForward) {
super(context, null, android.R.attr.popupMenuStyle);
mContext = context;
- assert delegate != null : "NavigationPopup requires non-null delegate.";
- mDelegate = delegate;
mNavigationClient = navigationClient;
mHistory = mNavigationClient.getDirectedNavigationHistory(
isForward, MAXIMUM_HISTORY_ITEMS);
@@ -99,21 +84,7 @@ public class NavigationPopup extends ListPopupWindow implements AdapterView.OnIt
setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
setOnItemClickListener(this);
- FixedViewInfo footerInfo = new ListView(context).new FixedViewInfo();
- mShowHistoryView = createListItem();
- mShowHistoryView.setText(R.string.show_history_label);
- footerInfo.isSelectable = true;
- footerInfo.view = mShowHistoryView;
- ArrayList<FixedViewInfo> footerInfoList = new ArrayList<FixedViewInfo>(1);
- footerInfoList.add(footerInfo);
- setAdapter(new HeaderViewListAdapter(null, footerInfoList, mAdapter));
- }
-
- /**
- * @return The URL of the page for managing history.
- */
- public static String getHistoryUrl() {
- return nativeGetHistoryUrl();
+ setAdapter(new HeaderViewListAdapter(null, null, mAdapter));
}
/**
@@ -161,20 +132,13 @@ public class NavigationPopup extends ListPopupWindow implements AdapterView.OnIt
NavigationEntry entry = mHistory.getEntryAtIndex(i);
if (TextUtils.equals(url, entry.getUrl())) entry.updateFavicon((Bitmap) favicon);
}
- if (TextUtils.equals(url, nativeGetHistoryUrl())) {
- updateBitmapForTextView(mShowHistoryView, (Bitmap) favicon);
- }
mAdapter.notifyDataSetChanged();
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- if (position == mHistory.getEntryCount()) {
- mDelegate.openHistory();
- } else {
- NavigationEntry entry = (NavigationEntry) parent.getItemAtPosition(position);
- mNavigationClient.goToNavigationIndex(entry.getIndex());
- }
+ NavigationEntry entry = (NavigationEntry) parent.getItemAtPosition(position);
+ mNavigationClient.goToNavigationIndex(entry.getIndex());
dismiss();
}
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/NavigationPopupTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698