Introduce FindInPageClient, with SetNumberOfMatches and SetActiveMatch
FindInPageClient is a per-frame client for FindInPage. FindRequestManager has a map of frame -> FindInPageClient. FindInPageClient manages per-frame number of matches, and also updates the global number of matches and the current active match rect and ordinal. In this CL, we are changing ActivateNearestFindResult to call methods on FindInPageClient instead of calling a callback. SetNumberOfMatches is called to update the corresponding frame's number of find-in-page matches and also update the total number of matches in a tab. SetActiveMatch updates the tab's active match rect and ordinal. When we mojoify FindInPage::Find, we'll use FindInPageClient to receive the find replies and remove FindRequestManager::OnFindReply. Mojoifying doc: https://goo.gl/JenyGm Previous CLs: Mojoify FindInPage::StopFinding crrev.com/c/1058731 (other CLs linked in the CL above) Bug: 819919 Change-Id: I25a6d81037655801db1b1337f335073f11aa7862 Reviewed-on: https://chromium-review.googlesource.com/1080568 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Alex Moshchuk <alexmos@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#577106}
Showing
This diff is collapsed.
Please register or sign in to comment