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

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: Minor cleanups. Comments, order of members. Created 3 years, 11 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 07dfcb11ae925884c1a1b619f8013f9681cb6788..dcf1ba5a57ad6bc892af17e7983064f30dec2122 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.
@@ -30,6 +30,7 @@ public class SuggestionsBottomSheetContent {
private final ContextMenuManager mContextMenuManager;
private final SuggestionsUiDelegateImpl mSuggestionsManager;
private final SnippetsBridge mSnippetsBridge;
+ private final TileGroup.Delegate mTileGroupDelegate;
public SuggestionsBottomSheetContent(
ChromeActivity activity, Tab tab, TabModelSelector tabModelSelector) {
@@ -46,9 +47,12 @@ public class SuggestionsBottomSheetContent {
mSuggestionsManager = new SuggestionsUiDelegateImpl(
mSnippetsBridge, mSnippetsBridge, navigationDelegate, profile, tab);
mContextMenuManager = new ContextMenuManager(activity, navigationDelegate, mRecyclerView);
+ mTileGroupDelegate =
+ new TileGroupDelegateImpl(activity, tab, tabModelSelector, navigationDelegate);
- NewTabPageAdapter adapter = new NewTabPageAdapter(mSuggestionsManager, null, uiConfig,
- OfflinePageBridge.getForProfile(profile), mContextMenuManager);
+ NewTabPageAdapter adapter = new NewTabPageAdapter(mSuggestionsManager,
+ /* aboveTheFoldView = */ null, uiConfig, OfflinePageBridge.getForProfile(profile),
+ mContextMenuManager, mTileGroupDelegate);
mRecyclerView.setAdapter(adapter);
mRecyclerView.setUpSwipeToDismiss();
}
@@ -64,5 +68,6 @@ public class SuggestionsBottomSheetContent {
public void destroy() {
mSnippetsBridge.destroy();
mSuggestionsManager.onDestroy();
+ mTileGroupDelegate.destroy();
}
}

Powered by Google App Engine
This is Rietveld 408576698