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

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

Issue 2651673010: 🍝🏠 Refactor MostVisited UI management, extract it for reuse in Home. (Closed)
Patch Set: Rebase. Created 3 years, 10 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
Index: chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
index 8dd46dd761567430452e1486c6a80d391c7d619d..3c4c706c015df59358a52fc4b6b38cd139f27143 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
@@ -1,4 +1,4 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,6 +33,7 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
private final ContextMenuManager mContextMenuManager;
private final SuggestionsUiDelegateImpl mSuggestionsManager;
private final SnippetsBridge mSnippetsBridge;
+ private final TileGroup.Delegate mTileGroupDelegate;
public SuggestionsBottomSheetContent(
final ChromeActivity activity, Tab tab, TabModelSelector tabModelSelector) {
@@ -58,8 +59,12 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
}
});
- NewTabPageAdapter adapter = new NewTabPageAdapter(mSuggestionsManager, null, uiConfig,
- OfflinePageBridge.getForProfile(profile), mContextMenuManager);
+ mTileGroupDelegate =
+ new TileGroupDelegateImpl(activity, tab, tabModelSelector, navigationDelegate);
+
+ NewTabPageAdapter adapter = new NewTabPageAdapter(mSuggestionsManager,
+ /* aboveTheFoldView = */ null, uiConfig, OfflinePageBridge.getForProfile(profile),
+ mContextMenuManager, mTileGroupDelegate);
mRecyclerView.setAdapter(adapter);
mRecyclerView.setUpSwipeToDismiss();
}
@@ -81,5 +86,6 @@ public class SuggestionsBottomSheetContent implements BottomSheet.BottomSheetCon
public void destroy() {
mSnippetsBridge.destroy();
mSuggestionsManager.onDestroy();
+ mTileGroupDelegate.destroy();
}
}

Powered by Google App Engine
This is Rietveld 408576698