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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SpacingItem.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
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 import android.content.Context; 7 import android.content.Context;
8 import android.view.View; 8 import android.view.View;
9 import android.view.ViewGroup; 9 import android.view.ViewGroup;
10 10
(...skipping 24 matching lines...) Expand all
35 @ItemViewType 35 @ItemViewType
36 protected int getItemViewType() { 36 protected int getItemViewType() {
37 return ItemViewType.SPACING; 37 return ItemViewType.SPACING;
38 } 38 }
39 39
40 @Override 40 @Override
41 protected void onBindViewHolder(NewTabPageViewHolder holder) { 41 protected void onBindViewHolder(NewTabPageViewHolder holder) {
42 // Nothing to do. 42 // Nothing to do.
43 } 43 }
44 44
45 @Override
46 public void visitItems(NodeVisitor visitor) {
47 visitor.visitSpacingItem();
48 }
49
45 /** Schedules a recalculation of the space occupied by the item. */ 50 /** Schedules a recalculation of the space occupied by the item. */
46 public void refresh() { 51 public void refresh() {
47 notifyItemChanged(0); 52 notifyItemChanged(0);
48 } 53 }
49 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698