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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsSource.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 nits and renamings 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/SnippetsSource.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsSource.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsSource.java
deleted file mode 100644
index baab92e41136dcc9fbe069c6a25463de0cf3a8d1..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsSource.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// 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.snippets;
-
-import android.graphics.Bitmap;
-
-import org.chromium.base.Callback;
-import org.chromium.chrome.browser.ntp.snippets.CategoryStatus.CategoryStatusEnum;
-import org.chromium.chrome.browser.ntp.snippets.KnownCategories.KnownCategoriesEnum;
-
-import java.util.List;
-
-/**
- * An interface for classes that provide snippets.
- */
-public interface SnippetsSource {
- /**
- * An observer for events in the snippets service.
- */
- public interface SnippetsObserver {
- void onSuggestionsReceived(@KnownCategoriesEnum int category,
- List<SnippetArticleListItem> snippets);
-
- /** Called when a category changed its status. */
- void onCategoryStatusChanged(@KnownCategoriesEnum int category,
- @CategoryStatusEnum int newStatus);
- }
-
- /**
- * Tells the source to discard the snippet.
- */
- public void discardSnippet(SnippetArticleListItem snippet);
-
- /**
- * Fetches the thumbnail image for a snippet.
- */
- public void fetchSnippetImage(SnippetArticleListItem snippet, Callback<Bitmap> callback);
-
- /**
- * Checks whether a snippet has been visited.
- */
- public void getSnippedVisited(SnippetArticleListItem snippet, Callback<Boolean> callback);
-
- /**
- * Sets the recipient for the fetched snippets.
- */
- public void setObserver(SnippetsObserver observer);
-
- /**
- * Gives the reason snippets are disabled.
- */
- public int getCategoryStatus(@KnownCategoriesEnum int category);
-}

Powered by Google App Engine
This is Rietveld 408576698