|
Add bookmark search feature to enhanced bookmark
Frontend:
1. The UI for bookmark search is implemented as a custom substitutable
View, which on phone takes the entire screen and behave as if an activity; on
tablet replaces the content RecyclerView and shows on the right of the screen.
2. The view tansitions are done by ViewSwitchers, which are placed as the root
of eb_main.xml.
3. EnhancedBookmarkSearchRow, a subclass of EnhancedBookmarkBookmarkRow, was
created to show bookmark results.
Backend:
1. We used the same backend that powers omnibox bookmark query. It
traverses the entire bookmark model and gets prefix matching resutls. A maximum
limit of 500 bookmarks is chosen in case of too large query that blocks the UI
thread.
2. Search history is saved in one single Android SharedPreference. Android does
not have a built-in support for saving list of strings; consequently JSONArray
is chosen to help serializing and deserializing.
The majority of the code has been previously reviewed in
https://chrome-internal-review.googlesource.com/#/c/180705/ and
https://chrome-internal-review.googlesource.com/#/c/216387/
BUG= 515617
Committed: https://crrev.com/8178e1386b0005a8e7aec5fefc90cb6d183a1a13
Cr-Commit-Position: refs/heads/master@{#343105}
Total comments: 23
Total comments: 10
Total comments: 13
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+820 lines, -30 lines) |
Patch |
|
M |
chrome/android/java/res/layout-sw720dp/eb_main.xml
|
View
|
2
3
|
1 chunk |
+12 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/res/layout/eb_main.xml
|
View
|
|
1 chunk |
+25 lines, -14 lines |
0 comments
|
Download
|
|
A |
chrome/android/java/res/layout/eb_search.xml
|
View
|
2
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
A |
chrome/android/java/res/layout/eb_search_core.xml
|
View
|
1
2
3
4
|
1 chunk |
+75 lines, -0 lines |
0 comments
|
Download
|
|
A + |
chrome/android/java/res/layout/eb_search_row.xml
|
View
|
2
3
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/res/menu/eb_action_bar_menu.xml
|
View
|
2
3
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java
|
View
|
2
3
|
4 chunks |
+38 lines, -1 line |
0 comments
|
Download
|
|
A |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/BookmarkMatch.java
|
View
|
2
3
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkActionBar.java
|
View
|
1
2
3
|
4 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkDelegate.java
|
View
|
1
2
3
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkManager.java
|
View
|
1
2
3
|
6 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkRow.java
|
View
|
1
2
3
4
5
6
|
6 chunks |
+20 lines, -11 lines |
0 comments
|
Download
|
|
A |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkSearchRow.java
|
View
|
1
2
3
4
5
6
|
1 chunk |
+68 lines, -0 lines |
0 comments
|
Download
|
|
A |
chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkSearchView.java
|
View
|
1
2
3
4
5
6
|
1 chunk |
+406 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java/strings/android_chrome_strings.grd
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/android/bookmarks/bookmarks_bridge.h
|
View
|
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/android/bookmarks/bookmarks_bridge.cc
|
View
|
2
3
|
1 chunk |
+39 lines, -0 lines |
0 comments
|
Download
|
Depends on Patchset:
Total messages: 22 (4 generated)
|