In the FindInPage Mojo interface, GetNearestFindResult(),
ActivateNearestFindResult(), and FindMatchRects() are only used on
Android. Mark them as Android-only and adjust the caller/callee
implementation to match.
Bug: 1341309
Change-Id: I86b0b5de268337f672e333c1234d521dad83ec75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3736098
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021873}
This CL observes RenderFrameHostStateChanged instead of
RenderFrameHostChanged and adds the IsActive check so that
we would only run find-in-page on active pages, and also this
adds some checks and tests to ensure that this is true.
Bug: 1245613
Change-Id: I84b5d9dd057a343dea2e8377ac345533ce892e88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3135523
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#933813}
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
Convert the implementation and clients in the browser and renderer
processes (i.e. blink::FindInPage, content::FindInPageClient) to the
new types, as well as the signature of the FindInPage::SetClient()
method as defined in the find_in_page.mojom file.
Bug: 955171, 978694
Change-Id: I4511bb238333fe846e0e681c225dbceaa05dcf6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1701849
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#678450}
This reverts commit fc0e1eac05 and
adds a new function FindRequestManager::ShouldIgnoreReply.
Previously the original CL wrongly removed a check to ignore stale
Find replies (first part of FindRequestManager::OnFindReply). This
makes some tests like FindInPageTest.CtrlEnter and
SavePageOriginalVsSavedComparisonTest to become flaky. They fail
when the stale replies arrives when the test hasn't ended yet.
I returned the check in the form of a new function,
FindRequestManager::ShouldIgnoreReply which is called by
FindInPageClient::SetNumberOfMatches and
FindInPageClient::SetActiveMatch. I've confirmed locally that
the tests aren't flaky anymore by running them 50+ times.
TBR=dcheng@chromium.org,yosin@chromium.org
Bug: 819919
Change-Id: I4482a5961854ce7b3477623f204fa93c0bd79a0c
Reviewed-on: https://chromium-review.googlesource.com/1174207
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583489}
This reverts commit fef811c512.
Reason for revert: SaveType/SavePageOriginalVsSavedComparisonTest.Style becomes flaky and findit suggested this is the culprit.
Let me revert this speculatively and see if it'll be fixed.
Original change's description:
> Mojoify FindInPage::Find
>
> We are mojoifying browser<->renderer communication of Find-in-page.
> In this CL, we are converting the Find function to mojo. Find replies
> are now separated into two functions, one to update the number of
> found matches (SetNumberOfMatches) and the other is to update which
> match is active right now (SetActiveMatch).
>
> This is the final function to be mojoified for FindInPage.
> Mojoifying doc: https://goo.gl/JenyGm
>
> Bug: 819919
> Change-Id: I990160f973b29d7620214d7d58a16ece033adf3f
> Reviewed-on: https://chromium-review.googlesource.com/1086950
> 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@{#582841}
TBR=dcheng@chromium.org,yosin@chromium.org,alexmos@chromium.org,rakina@chromium.org
Change-Id: I0c48b0aed588049147f8cc49addaf1686fa67621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 819919, 873965
Reviewed-on: https://chromium-review.googlesource.com/1173892
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582862}
We are mojoifying browser<->renderer communication of Find-in-page.
In this CL, we are converting the Find function to mojo. Find replies
are now separated into two functions, one to update the number of
found matches (SetNumberOfMatches) and the other is to update which
match is active right now (SetActiveMatch).
This is the final function to be mojoified for FindInPage.
Mojoifying doc: https://goo.gl/JenyGm
Bug: 819919
Change-Id: I990160f973b29d7620214d7d58a16ece033adf3f
Reviewed-on: https://chromium-review.googlesource.com/1086950
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@{#582841}
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}