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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AboveTheFoldItem.java

Issue 2860463002: [Suggestions] Remove TreeNode.getSuggestionAt() in favor of a visitor. (Closed)
Patch Set: review Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.ntp.cards; 5 package org.chromium.chrome.browser.ntp.cards;
6 6
7 /** 7 /**
8 * Item in the RecyclerView that will hold the above the fold contents for the N TP, i.e. the 8 * Item in the RecyclerView that will hold the above the fold contents for the N TP, i.e. the
9 * logo, tiles and search bar that are initially visible when opening the NTP. 9 * logo, tiles and search bar that are initially visible when opening the NTP.
10 * 10 *
11 * When using the new NTP UI, that is based on a RecyclerView, the view containi ng the entire 11 * When using the new NTP UI, that is based on a RecyclerView, the view containi ng the entire
12 * content of the old UI is put in the AboveTheFoldItem, and inserted in the Rec yclerView. 12 * content of the old UI is put in the AboveTheFoldItem, and inserted in the Rec yclerView.
13 * Other elements coming after it and initially off-screen are just added to the RecyclerView after 13 * Other elements coming after it and initially off-screen are just added to the RecyclerView after
14 * that. 14 * that.
15 */ 15 */
16 class AboveTheFoldItem extends Leaf { 16 class AboveTheFoldItem extends Leaf {
17 @Override 17 @Override
18 @ItemViewType 18 @ItemViewType
19 protected int getItemViewType() { 19 protected int getItemViewType() {
20 return ItemViewType.ABOVE_THE_FOLD; 20 return ItemViewType.ABOVE_THE_FOLD;
21 } 21 }
22 22
23 @Override 23 @Override
24 protected void onBindViewHolder(NewTabPageViewHolder holder) { 24 protected void onBindViewHolder(NewTabPageViewHolder holder) {
25 // Nothing to do. 25 // Nothing to do.
26 } 26 }
27
28 @Override
29 public void visitItems(NodeVisitor visitor) {
30 visitor.visitAboveTheFoldItem();
31 }
27 } 32 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698