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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NodeVisitor.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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.ntp.cards;
6
7 import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
8 import org.chromium.chrome.browser.suggestions.ContentSuggestionsAdditionalActio n;
9
10 /**
11 * Allows implementing a visitor pattern to iterate over all items under a (sub- )tree.
12 */
13 public class NodeVisitor {
14 /**
15 * Visits the above-the-fold item.
16 */
17 public void visitAboveTheFoldItem() {}
18
19 /**
20 * Visits an action item.
21 * @param currentAction The action enum value for the item.
22 */
23 public void visitActionItem(@ContentSuggestionsAdditionalAction int currentA ction) {}
24
25 /**
26 * Visits the "all dimissed" item.
27 */
28 public void visitAllDismissedItem() {}
29
30 /**
31 * Visits the footer.
32 */
33 public void visitFooter() {}
34
35 /**
36 * Visits a progress item.
37 */
38 public void visitProgressItem() {}
39
40 /**
41 * Visits a sign-in promo.
42 */
43 public void visitSignInPromo() {}
44
45 /**
46 * Visits a spacing item.
47 */
48 public void visitSpacingItem() {}
49
50 /**
51 * Visits a "no suggestions" item.
52 */
53 public void visitNoSuggestionsItem() {}
54
55 /**
56 * Visits a suggestion.
57 * @param suggestion The {@link SnippetArticle} represented by the item.
58 */
59 public void visitSuggestion(SnippetArticle suggestion) {}
60
61 /**
62 * Visits a header.
63 */
64 public void visitHeader() {}
65
66 /**
67 * Visits the tile grid.
68 */
69 public void visitTileGrid() {}
70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698