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.snippets; | 5 package org.chromium.chrome.browser.ntp.snippets; |
6 | 6 |
7 import android.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
8 | 8 |
9 import org.chromium.base.Callback; | 9 import org.chromium.base.Callback; |
10 import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; | 10 import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; |
11 import org.chromium.chrome.browser.ntp.snippets.CategoryStatus.CategoryStatusEnu
m; | 11 import org.chromium.chrome.browser.ntp.snippets.CategoryStatus.CategoryStatusEnu
m; |
| 12 import org.chromium.chrome.browser.suggestions.SuggestionsUma; |
12 | 13 |
13 import java.util.List; | 14 import java.util.List; |
14 | 15 |
15 /** | 16 /** |
16 * An interface for classes that provide content suggestions. | 17 * An interface for classes that provide content suggestions. |
17 */ | 18 */ |
18 public interface SuggestionsSource { | 19 public interface SuggestionsSource { |
19 /** | 20 /** |
20 * An observer for events in the content suggestions service. | 21 * An observer for events in the content suggestions service. |
21 */ | 22 */ |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 * Tells the source to dismiss the category. | 92 * Tells the source to dismiss the category. |
92 */ | 93 */ |
93 void dismissCategory(@CategoryInt int category); | 94 void dismissCategory(@CategoryInt int category); |
94 | 95 |
95 /** | 96 /** |
96 * Restores all categories previously dismissed with {@link #dismissCategory
}. | 97 * Restores all categories previously dismissed with {@link #dismissCategory
}. |
97 */ | 98 */ |
98 void restoreDismissedCategories(); | 99 void restoreDismissedCategories(); |
99 | 100 |
100 /** | 101 /** |
101 * Sets the recipient for update events from the source. | 102 * Finishes initialisation of the suggestions source, pairing it with an obs
erver. |
| 103 * @param observer object to notify when snippets are received. |
| 104 * @param umaHelper object used to obtain metrics-related data. |
102 */ | 105 */ |
103 void setObserver(Observer observer); | 106 void init(Observer observer, SuggestionsUma umaHelper); |
104 } | 107 } |
OLD | NEW |