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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java

Issue 2230473002: Refactor and extend SnippetsBridge for multi-section support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@categoryinfo
Patch Set: Michael's comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java
index 300ec76619ec008b21d464dcbfb7f249512504a5..02acf3ef33a6bbc6b1175aa5468b5650f4e377ab 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleViewHolder.java
@@ -68,7 +68,7 @@ public class SnippetArticleViewHolder extends CardViewHolder
private static final int ID_REMOVE = 4;
private final NewTabPageManager mNewTabPageManager;
- private final SnippetsSource mSnippetsSource;
+ private final SuggestionsSource mSuggestionsSource;
private final TextView mHeadlineTextView;
private final TextView mPublisherTextView;
private final TextView mArticleSnippetTextView;
@@ -86,15 +86,15 @@ public class SnippetArticleViewHolder extends CardViewHolder
*
* @param parent The ViewGroup that is going to contain the newly created view.
* @param manager The NTPManager object used to open an article
- * @param snippetsSource The SnippetsBridge used to retrieve the snippet thumbnails.
+ * @param suggestionsSource The source used to retrieve the thumbnails.
* @param uiConfig The NTP UI configuration object used to adjust the article UI.
*/
public SnippetArticleViewHolder(NewTabPageRecyclerView parent, NewTabPageManager manager,
- SnippetsSource snippetsSource, UiConfig uiConfig) {
+ SuggestionsSource suggestionsSource, UiConfig uiConfig) {
super(R.layout.new_tab_page_snippets_card, parent, uiConfig);
mNewTabPageManager = manager;
- mSnippetsSource = snippetsSource;
+ mSuggestionsSource = suggestionsSource;
mThumbnailView = (ImageView) itemView.findViewById(R.id.article_thumbnail);
mHeadlineTextView = (TextView) itemView.findViewById(R.id.article_headline);
mPublisherTextView = (TextView) itemView.findViewById(R.id.article_publisher);
@@ -254,7 +254,7 @@ public class SnippetArticleViewHolder extends CardViewHolder
} else {
mThumbnailView.setImageResource(R.drawable.ic_snippet_thumbnail_placeholder);
mImageCallback = new FetchImageCallback(this, mArticle);
- mSnippetsSource.fetchSnippetImage(mArticle, mImageCallback);
+ mSuggestionsSource.fetchSuggestionImage(mArticle, mImageCallback);
}
// Set the favicon of the publisher.

Powered by Google App Engine
This is Rietveld 408576698