WebLayer: add FindInPage API
New methods are added to Tab: - beginFindInPage - activateNextFindInPageMatch - endFindInPage And a new FindInPageCallback interface is introduced with one method: - onFindResult Also add very basic FIP controls to shell to partially exercise the new API. Notes: 1. The embedder provides the main find in page UI (the text input). 2. The embedder is responsible for ending the find session as appropriate (i.e. when the main find in page UI is dismissed), which cleans up the in-page UI, consisting of a results sidebar and text highlighting. Commonly this would happen if the user cancels the find session or if a navigation occurs. 3. When the active tab loses focus, the find session is ended and the result bar is removed. 4. It is generally expected that the embedder-provided find in page UI will be hosted in the top view. TODO: 1. The top controls should be forced visible when the new web contents overlay view holds children. That will definitely be desired for tab modal dialogs, and is probably desired for find in page as well (at least judging by what Clank does). 2. Write tests. Bug: 1038415 Change-Id: I6183172dc3944157aae2db5ebb0aed983a34bffc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2004072Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Commit-Queue: Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/heads/master@{#734691}
Showing
Please register or sign in to comment