Index: chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java |
index 98859f10af178627725cdc0a5c975dfc13153588..e330c48665ed22660fc1051dbde70b9fe4a84d1d 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/EnhancedBookmarksBridge.java |
@@ -83,17 +83,26 @@ public final class EnhancedBookmarksBridge { |
* Moves a Bookmark in the EnhancedBookmarkModel |
* @param bookmarkId The item to be be moved |
* @param newParentId The new parent of the item |
- * @param index New position index of bookmark within the parent |
+ * @param index New position index of bookmark within the parent. |
*/ |
public void moveBookmark(BookmarkId bookmarkId, BookmarkId newParentId, int index) { |
nativeMoveBookmark(mNativeEnhancedBookmarksBridge, bookmarkId, newParentId, index); |
} |
+ /** |
+ * Get descriptions of a given bookmark. |
+ * @param id The id of the bookmark to look at. |
+ * @return Description of the bookmark. If given a partner bookmark, this method will return an |
+ * empty list. |
+ */ |
public String getBookmarkDescription(BookmarkId id) { |
return nativeGetBookmarkDescription(mNativeEnhancedBookmarksBridge, id.getId(), |
id.getType()); |
} |
+ /** |
+ * Sets the description of the given bookmark. |
+ */ |
public void setBookmarkDescription(BookmarkId id, String description) { |
nativeSetBookmarkDescription(mNativeEnhancedBookmarksBridge, id.getId(), id.getType(), |
description); |
@@ -163,6 +172,18 @@ public final class EnhancedBookmarksBridge { |
} |
/** |
+ * Get all filters associated with the given bookmark. |
+ * |
+ * @param bookmark The bookmark to find filters for. |
+ * @return Array of Strings, each representing a filter. If given a partner bookmark, this |
+ * method will return an empty array. |
+ */ |
+ public String[] getFiltersForBookmark(BookmarkId bookmark) { |
+ return nativeGetFiltersForBookmark(mNativeEnhancedBookmarksBridge, bookmark.getId(), |
+ bookmark.getType()); |
+ } |
+ |
+ /** |
* @return Current set of known auto-filters for bookmarks. |
*/ |
public List<String> getFilters() { |
@@ -206,6 +227,8 @@ public final class EnhancedBookmarksBridge { |
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); |
private native BookmarkId nativeAddFolder(long nativeEnhancedBookmarksBridge, BookmarkId parent, |
int index, String title); |
private native void nativeMoveBookmark(long nativeEnhancedBookmarksBridge, |