Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b91a0d360f331e94e9ede15bf1f93a494f189923 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsCategoryInfo.java |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2016 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. |
| + |
| +package org.chromium.chrome.browser.ntp.cards; |
| + |
| +import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsCardLayout.ContentSuggestionsCardLayoutEnum; |
| + |
| +/** |
| + * Contains static meta information about a Category. Equivalent of the CategoryInfo class in |
| + * components/ntp_snippets/category_info.h. |
| + */ |
| +public class SuggestionsCategoryInfo { |
| + /** |
| + * Localized title of the category. |
| + */ |
| + private final String mTitle; |
| + |
| + /** |
| + * Layout of the cards to be used to display suggestions in this category. |
| + */ |
| + @ContentSuggestionsCardLayoutEnum |
| + private final int mCardLayout; |
| + |
| + public SuggestionsCategoryInfo(String title, @ContentSuggestionsCardLayoutEnum int cardLayout) { |
| + this.mTitle = title; |
|
dgn
2016/08/10 10:31:22
the `this` usage is unnecessary here
Philipp Keck
2016/08/10 12:36:12
I consider this a nit and will fix it in a subsequ
|
| + this.mCardLayout = cardLayout; |
| + } |
| + |
| + public String getTitle() { |
| + return this.mTitle; |
| + } |
| + |
| + @ContentSuggestionsCardLayoutEnum |
| + public int getCardLayout() { |
| + return this.mCardLayout; |
| + } |
| +} |