| Index: chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java
|
| index 080bced02d5fa4dc7b7d39256024b9c226eb57a3..89b6ee335473deac60d0519dea38a826c9e969e2 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java
|
| @@ -34,8 +34,6 @@ public final class EnhancedBookmarksBridge {
|
| private long mNativeEnhancedBookmarksBridge;
|
| private final ObserverList<FiltersObserver> mFilterObservers =
|
| new ObserverList<FiltersObserver>();
|
| - private final ObserverList<SearchServiceObserver> mSearchObservers =
|
| - new ObserverList<SearchServiceObserver>();
|
| private LruCache<String, Pair<String, Bitmap>> mSalientImageCache;
|
|
|
| /**
|
| @@ -63,17 +61,6 @@ public final class EnhancedBookmarksBridge {
|
| }
|
|
|
| /**
|
| - * Interface to provide consumers notifications to changes in search service results.
|
| - */
|
| - public interface SearchServiceObserver {
|
| - /**
|
| - * Invoked when client detects that search results have been updated. This callback is
|
| - * guaranteed to be called only once and only for the most recent query.
|
| - */
|
| - void onSearchResultsReturned();
|
| - }
|
| -
|
| - /**
|
| * Creates a new enhanced bridge using the given profile.
|
| */
|
| public EnhancedBookmarksBridge(Profile profile) {
|
| @@ -168,42 +155,6 @@ public final class EnhancedBookmarksBridge {
|
| }
|
|
|
| /**
|
| - * Sends request to search server for querying related bookmarks.
|
| - * @param query Keyword used to find related bookmarks.
|
| - */
|
| - public void sendSearchRequest(String query) {
|
| - nativeSendSearchRequest(mNativeEnhancedBookmarksBridge, query);
|
| - }
|
| -
|
| - /**
|
| - * Get list of bookmarks as result of a search request that was sent before in
|
| - * {@link EnhancedBookmarksBridge#sendSearchRequest(String)}. Normally this function should be
|
| - * called after {@link SearchServiceObserver#onSearchResultsReturned()}
|
| - * @param query Keyword used to find related bookmarks.
|
| - * @return List of BookmarkIds that are related to query. It will be null if the request is
|
| - * still on the fly, or empty list if there are no results for the query.
|
| - */
|
| - public List<BookmarkId> getSearchResultsForQuery(String query) {
|
| - return nativeGetSearchResults(mNativeEnhancedBookmarksBridge, query);
|
| - }
|
| -
|
| - /**
|
| - * Registers a SearchObserver that listens to search request updates.
|
| - * @param observer Observer to add
|
| - */
|
| - public void addSearchObserver(SearchServiceObserver observer) {
|
| - mSearchObservers.addObserver(observer);
|
| - }
|
| -
|
| - /**
|
| - * Unregisters a SearchObserver that listens to search request updates.
|
| - * @param observer Observer to remove
|
| - */
|
| - public void removeSearchObserver(SearchServiceObserver observer) {
|
| - mSearchObservers.removeObserver(observer);
|
| - }
|
| -
|
| - /**
|
| * Request bookmark salient image for the given URL. Please refer to
|
| * |BookmarkImageService::SalientImageForUrl|.
|
| * @return True if this method is executed synchronously. False if
|
| @@ -304,18 +255,6 @@ public final class EnhancedBookmarksBridge {
|
| }
|
|
|
| @CalledByNative
|
| - private void onSearchResultReturned() {
|
| - for (SearchServiceObserver observer : mSearchObservers) {
|
| - observer.onSearchResultsReturned();
|
| - }
|
| - }
|
| -
|
| - @CalledByNative
|
| - private static List<BookmarkId> createBookmarkIdList() {
|
| - return new ArrayList<BookmarkId>();
|
| - }
|
| -
|
| - @CalledByNative
|
| private static void addToBookmarkIdList(List<BookmarkId> bookmarkIdList, long id, int type) {
|
| bookmarkIdList.add(new BookmarkId(id, type));
|
| }
|
| @@ -328,8 +267,6 @@ public final class EnhancedBookmarksBridge {
|
| int type, String description);
|
| private native void nativeGetBookmarksForFilter(long nativeEnhancedBookmarksBridge,
|
| String filter, List<BookmarkId> list);
|
| - private native List<BookmarkId> nativeGetSearchResults(long nativeEnhancedBookmarksBridge,
|
| - String query);
|
| private native String[] nativeGetFilters(long nativeEnhancedBookmarksBridge);
|
| private native String[] nativeGetFiltersForBookmark(long nativeEnhancedBookmarksBridge, long id,
|
| int type);
|
| @@ -339,7 +276,6 @@ public final class EnhancedBookmarksBridge {
|
| BookmarkId bookmarkId, BookmarkId newParentId);
|
| private native BookmarkId nativeAddBookmark(long nativeEnhancedBookmarksBridge,
|
| BookmarkId parent, int index, String title, String url);
|
| - private native void nativeSendSearchRequest(long nativeEnhancedBookmarksBridge, String query);
|
| private native void nativeSalientImageForUrl(long nativeEnhancedBookmarksBridge,
|
| String url, SalientImageCallback callback);
|
| private native void nativeFetchImageForTab(long nativeEnhancedBookmarksBridge,
|
|
|