| Index: chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java
|
| index 76856454c3541f5f3e4d683e29a46e58241aca79..fda2878df480146559ea5fe7e917cbbf0b79e844 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java
|
| @@ -4,8 +4,12 @@
|
|
|
| package org.chromium.chrome.browser.enhancedbookmarks;
|
|
|
| +import android.support.annotation.Nullable;
|
| import android.support.v4.widget.DrawerLayout;
|
| +import android.view.View;
|
|
|
| +import org.chromium.chrome.browser.enhanced_bookmarks.EnhancedBookmarksModel;
|
| +import org.chromium.chrome.browser.enhanced_bookmarks.LaunchLocation;
|
| import org.chromium.components.bookmarks.BookmarkId;
|
|
|
| import java.util.List;
|
| @@ -27,6 +31,11 @@ interface EnhancedBookmarkDelegate {
|
| public void onBookmarkUIStateChange(String url);
|
| }
|
|
|
| + static final int STATE_LOADING = 0;
|
| + static final int STATE_ALL_BOOKMARKS = 1;
|
| + static final int STATE_FOLDER = 2;
|
| + static final int STATE_FILTER = 3;
|
| +
|
| /**
|
| * Corresponds to "All Items" list item in the side drawer. Shows all bookmarks.
|
| */
|
| @@ -40,6 +49,13 @@ interface EnhancedBookmarkDelegate {
|
| void openFolder(BookmarkId folder);
|
|
|
| /**
|
| + * Corresponds to any filter list item in the side drawer. Shows bookmarks under the
|
| + * filter.
|
| + * @param filter Filter string to search
|
| + */
|
| + void openFilter(String filter);
|
| +
|
| + /**
|
| * Clear all selected items. After this call, {@link #isSelectionEnabled()} will return false.
|
| */
|
| void clearSelection();
|
| @@ -67,6 +83,17 @@ interface EnhancedBookmarkDelegate {
|
| List<BookmarkId> getSelectedBookmarks();
|
|
|
| /**
|
| + * Sets list mode. If the mode is toggles,
|
| + * {@link EnhancedBookmarkUIObserver#onListModeChange(boolean)} will be called.
|
| + */
|
| + void setListModeEnabled(boolean isListModeEnabled);
|
| +
|
| + /**
|
| + * @return True is list mode is enabled. False otherwise.
|
| + */
|
| + boolean isListModeEnabled();
|
| +
|
| + /**
|
| * Notifies the current mode set event to the given observer. For example, if the current mode
|
| * is MODE_ALL_BOOKMARKS, it calls onAllBookmarksModeSet.
|
| */
|
| @@ -96,6 +123,26 @@ interface EnhancedBookmarkDelegate {
|
| void openBookmark(BookmarkId bookmark, int launchLocation);
|
|
|
| /**
|
| + * Starts detail activity with shared element animation. On Lollipop and later devices, shows a
|
| + * shared image animation. On earlier devices, opens the activity using the standard Activity
|
| + * transition.
|
| + * @param bookmarkId The bookmark that the detail activity shows.
|
| + * @param view The view to share for activity transition animation. If null, no transition is
|
| + * displayed.
|
| + */
|
| + void startDetailActivity(BookmarkId bookmarkId, @Nullable View view);
|
| +
|
| + /**
|
| + * Shows the search UI.
|
| + */
|
| + void openSearchUI();
|
| +
|
| + /**
|
| + * Dismisses the search UI.
|
| + */
|
| + void closeSearchUI();
|
| +
|
| + /**
|
| * Closes the EnhancedBookmark Activity on Phone. Does nothing on tablet.
|
| */
|
| void finishActivityOnPhone();
|
| @@ -117,7 +164,7 @@ interface EnhancedBookmarkDelegate {
|
|
|
| /**
|
| * @return Current UIState of Enhanced Bookmark main UI. If no mode is stored,
|
| - * {@link UIState#STATE_LOADING} is returned.
|
| + * {@link EnhancedBookmarkDelegate#STATE_LOADING} is returned.
|
| */
|
| int getCurrentState();
|
| }
|
|
|