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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemGroup.java

Issue 2396523002: Unify NewTabPageItem and ItemGroup into a single tree-structured interface. (Closed)
Patch Set: review Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.ntp.cards;
6
7 import java.util.List;
8
9 /**
10 * A group of items.
11 */
12 public interface ItemGroup {
13 /**
14 * @return A list of items contained in this group. The list should not be m odified.
15 */
16 List<NewTabPageItem> getItems();
17
18 /**
19 * Defines the actions an object can be notified about when there are change s inside of
20 * an {@link ItemGroup}.
21 */
22 interface Observer {
23 /** Notification about items having been changed in the group. */
24 void onItemRangeChanged(ItemGroup group, int itemPosition, int itemCount );
25
26 /** Notification about items having been added to the group. */
27 void onItemRangeInserted(ItemGroup group, int itemPosition, int itemCoun t);
28
29 /** Notification about items having been removed from the group. */
30 void onItemRangeRemoved(ItemGroup group, int itemPosition, int itemCount );
31 }
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698