OLD | NEW |
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 org.chromium.chrome.browser.ntp.snippets.CategoryInt; | 7 import org.chromium.chrome.browser.ntp.snippets.CategoryInt; |
8 import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsCardLayout; | 8 import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsCardLayout; |
9 import org.chromium.chrome.browser.ntp.snippets.SnippetArticle; | 9 import org.chromium.chrome.browser.ntp.snippets.SnippetArticle; |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 return suggestions; | 26 return suggestions; |
27 } | 27 } |
28 | 28 |
29 public static SuggestionsCategoryInfo createInfo( | 29 public static SuggestionsCategoryInfo createInfo( |
30 @CategoryInt int category, boolean moreButton, boolean showIfEmpty)
{ | 30 @CategoryInt int category, boolean moreButton, boolean showIfEmpty)
{ |
31 return new SuggestionsCategoryInfo( | 31 return new SuggestionsCategoryInfo( |
32 category, "", ContentSuggestionsCardLayout.FULL_CARD, moreButton
, showIfEmpty); | 32 category, "", ContentSuggestionsCardLayout.FULL_CARD, moreButton
, showIfEmpty); |
33 } | 33 } |
34 | 34 |
35 public static SuggestionsSection createSection( | 35 public static SuggestionsSection createSection( |
36 boolean moreButton, boolean showIfEmpty, ItemGroup.Observer observer
) { | 36 boolean moreButton, boolean showIfEmpty, NodeParent parent) { |
37 SuggestionsCategoryInfo info = createInfo(42, moreButton, showIfEmpty); | 37 SuggestionsCategoryInfo info = createInfo(42, moreButton, showIfEmpty); |
38 return new SuggestionsSection(info, observer); | 38 return new SuggestionsSection(parent, info); |
39 } | 39 } |
40 } | 40 } |
OLD | NEW |