Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java |
| index 89c697f81a768824426ea363e0cfd0b9fdfdf8f6..69fbbcae936982685a6e1f839a515bd2c5f81119 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java |
| @@ -368,6 +368,28 @@ public class ItemChooserDialog { |
| } |
|
Finnur
2016/03/14 11:36:50
Hmm... I just discovered that the only (previous)
juncai
2016/03/16 00:40:35
Done.
|
| /** |
| + * Add an item to the end of the list to show in the dialog. |
| + * |
| + * @param item The item to be added to the end of the chooser. |
| + */ |
| + public void addItemToList(ItemChooserRow item) { |
| + mProgressBar.setVisibility(View.GONE); |
| + mItemAdapter.add(item); |
| + setState(State.DISCOVERY_IDLE); |
| + } |
| + |
| + /** |
| + * Remove an item that is shown in the dialog. |
| + * |
| + * @param item The item to be removed in the chooser. |
| + */ |
| + public void removeItemFromList(ItemChooserRow item) { |
| + mProgressBar.setVisibility(View.GONE); |
|
Finnur
2016/03/14 11:36:50
Why is this necessary?
juncai
2016/03/16 00:40:35
Removed.
Done.
|
| + mItemAdapter.remove(item); |
| + setState(State.DISCOVERY_IDLE); |
|
Finnur
2016/03/14 11:36:50
What does the dialog look like if you add one item
juncai
2016/03/16 00:40:35
It shows "No devices found.".
|
| + } |
|
Finnur
2016/03/14 11:36:49
These new API functions need to be tested in ItemC
juncai
2016/03/16 00:40:35
Done.
|
| + |
| + /** |
| * Indicates the chooser that no more items will be added. |
| */ |
| public void setIdleState() { |