0
Commit Graph

46 Commits

Author SHA1 Message Date
Joey Arhar
525081b25b Remove histogram WebCore.FindInPage.DurationBetweenKeystrokes
This histogram isn't needed anymore now that we have shipped
auto-expanding details and hidden=until-found. This effectively reverts
crrev.com/924007

Fixed: 333390100
Bug: 40197893
Change-Id: I9f5c2773d9440676ce13e085114b59d1522d854a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5519293
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297260}
2024-05-07 02:13:54 +00:00
Alison Gale
770f3fce37 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ibc66b8c440e4bcdef414e77fef4d9874d2ea9951
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5493800
Auto-Submit: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293330}
2024-04-27 00:39:58 +00:00
Ali Hijazi
a56154dd81 Extend MiraclePtr coverage to more containers
This rewrites the following containers:
std::list, std::unordered_set, base::flat_set, std::stack, std::queue.

This patch was generated by running
./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh

Binary size increase:
The increase is only (~9.5kB) above the per-patch limit (+16kB). This
is not a lot given the size of the rewrite. Increase of around 500kb was
approved for MiraclePtr.

AX-Relnotes: n/a.
Binary-Size: See commit description.
Bug: 325302189
Change-Id: I969ae345ef6d6117d5c1773773be913197ca2e73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306923
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1265100}
2024-02-26 10:21:17 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Daniel Cheng
982f2b2e68 Use base::FunctionRef for the various ForEachRenderFrameHost helpers.
Using base::FunctionRef as the callable param for a visitor function
can significantly reduce the boilerplate required to use the visitor
function. It also avoids the heap allocation required to support
base::RepeatingCallback's strong ownership semantics.

The most common transformation in this CL is converting something
like:

  rfh->ForEachRenderFrameHost(base::BindRepeating(
      &MyClass::HandleRFH, base::Unretained(this)));

to simply using a lambda that captures `this`:

  rfh->ForEachRenderFrameHost([this] (content::RenderFrameHost* rfh) {
      HandleRFH(rfh);
  });

An astute reader will note that the latter is one line longer; however,
many of these callbacks currently bind other arguments as additional
input parameters or as out parameters. Using lambda captures
significantly reduces the boilerplate, improving readability, and makes
it much easier to avoid unnecessary copies.

Bug: 1303103
Change-Id: I3aeb74a0988dbddb645faef2239e9541c9adac52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3767487
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039508}
2022-08-25 23:46:16 +00:00
Gabriel Charette
d87f10f467 [base] IWYU for base::Time
This CL is a no-op.

Only fixing instances where base::Time (and Ticks/Delta) is used in
a statement (i.e. not as a parameter to avoid adding includes in mere
overrides). Skipping pointer and reference qualified instances.

i.e. matches this regex:
'(\n *[^/\n][^/\n][^/\n]*base::(Time|Thread)(Ticks|Delta)?\b[^*&][^)]*;)'

and skipping files that have any existing fwd-decl for any of the
variants.

This is a prereq to remove unused base/task/post_task.h includes in
https://chromium-review.googlesource.com/c/chromium/src/+/3555247

Bug: 1026641
Change-Id: I87b43a8dc92bdceb67f4bd59b327b54813aa72a6
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557354
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987283}
2022-03-31 00:44:22 +00:00
Joey Arhar
0574fb753b Clear delayed queries when stopping find-in-page
This fixes a regression caused by http://crrev.com/956680 where clearing
the find-in-page text box causes a find-in-page to occur with the last
text which was in the box. For example, typing "a" into the text field
and then pressing backspace quickly before the find-in-page request
occurs will make the page get searched for "a" and highlight results
after the find-in-page text field is empty.

This happens because FindRequestManager::Find is not called when the
search is cleared, but FindRequestManager::StopFinding is called
instead, and StopFinding wasn't accounting for the pre-existing delayed
find-in-page query.

This patch fixes it by clearing the delayed find-in-page query when
StopFinding is called.

Fixed: 1286068
Change-Id: I1b9b9e8f58d9a48b24f0ec49e42c1ce8f9b8938c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3544186
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#986254}
2022-03-29 00:45:16 +00:00
Xiaohan Wang
1ecfd006fd content: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ia0eae6f9396065e190929d42600012c9324c07e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3399774
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Owners-Override: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961157}
2022-01-19 22:33:10 +00:00
Joey Arhar
cac45bff1a Implement find-in-page delay
Bug: 1250158
Change-Id: Icfaabd88b3170062def83893f577e344db54d78d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3304877
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956680}
2022-01-07 21:59:31 +00:00
Keishi Hattori
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945735}
2021-11-27 09:25:52 +00:00
Gyuyoung Kim
a855ff5d4c Reland "MPArch: Fenced frame does not clear the find request queue in FindRequestManager::RemoveFrame"
This is a reland of 2b80df4d74

The original CL called a private method in the test via friend class.
But, it could cause undefined symbol build error due to the visibility.
To fix it, we need to use CONTENT_EXPORT keyword for the private method
in order to export the symbol of the method to the test class.

Original change's description:
> MPArch: Fenced frame does not clear the find request queue in FindRequestManager::RemoveFrame
>
> FindRequestManager::RemoveFrame method has cleared its own find request
> queue when a given render frame host is a mainframe. This CL makes
> the method only clear the queue on a pimary main frame. Besides
> this CL adds a test case to verify it.
>
> Bug: 1264776
> Change-Id: Iddaaa1eec0d0d332efc54b1a06c9b5e8d936fff2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3255123
> Reviewed-by: Dominic Farolino <dom@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#942951}

Bug: 1264776
Change-Id: I2725610adcd679b45de3a885680124cd214852c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3288660
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#943437}
2021-11-19 07:24:35 +00:00
Nidhi Jaju
aec028192b Revert "MPArch: Fenced frame does not clear the find request queue in FindRequestManager::RemoveFrame"
This reverts commit 2b80df4d74.

Reason for revert: https://ci.chromium.org/ui/p/chromium/builders/ci/Mac%20Builder%20(dbg)/204054/overview

Original change's description:
> MPArch: Fenced frame does not clear the find request queue in FindRequestManager::RemoveFrame
>
> FindRequestManager::RemoveFrame method has cleared its own find request
> queue when a given render frame host is a mainframe. This CL makes
> the method only clear the queue on a pimary main frame. Besides
> this CL adds a test case to verify it.
>
> Bug: 1264776
> Change-Id: Iddaaa1eec0d0d332efc54b1a06c9b5e8d936fff2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3255123
> Reviewed-by: Dominic Farolino <dom@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#942951}

Bug: 1264776
Change-Id: I301d912a43aebb5b2eef33b68ff2a3ef1aba7785
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3288419
Auto-Submit: Nidhi Jaju <nidhijaju@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Nidhi Jaju <nidhijaju@chromium.org>
Owners-Override: Nidhi Jaju <nidhijaju@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942956}
2021-11-18 04:37:48 +00:00
Gyuyoung Kim
2b80df4d74 MPArch: Fenced frame does not clear the find request queue in FindRequestManager::RemoveFrame
FindRequestManager::RemoveFrame method has cleared its own find request
queue when a given render frame host is a mainframe. This CL makes
the method only clear the queue on a pimary main frame. Besides
this CL adds a test case to verify it.

Bug: 1264776
Change-Id: Iddaaa1eec0d0d332efc54b1a06c9b5e8d936fff2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3255123
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/main@{#942951}
2021-11-18 04:10:40 +00:00
Lei Zhang
ed9be3a428 Remove many unneeded CONTENT_EXPORT entries.
Many classes within content don't need CONTENT_EXPORT because they are
not in content/public and they are not directly used from tests.

Change-Id: I22696b3840ab7a89371184e866b05d0b4980e7dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3288753
Auto-Submit: Lei Zhang <thestig@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942828}
2021-11-17 22:01:18 +00:00
Miyoung Shin
bf4c40c8ca [mparch] Manage FindRequestManager with RFHs' lifecycle state
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}
2021-10-21 11:00:23 +00:00
Joey Arhar
8afb88ed99 Add UMA to measure time between find-in-page keystrokes
This metric records the amount of time between keystrokes the user made
while typing a search query into the find-in-page browser dialog. This
will be used in order to determine how long we should make the
find-in-page scroll delay: http://crbug.com/1250158

Bug: 1250158
Change-Id: Ia2f16bbf8ffae427d608b1c92086f69239dc00ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3163943
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924007}
2021-09-22 20:11:47 +00:00
Peter Boström
828b902994 Replace DISALLOW_COPY_AND_ASSIGN in content/
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}
2021-09-21 02:28:43 +00:00
Christian Dullweber
5e66727b7e Reland "Remove superfluous includes from navigation_controller.h"
This is a reland of 219c8e40b4

Original change's description:
> Remove superfluous includes from navigation_controller.h
>
> NavigationHandle and SharedUrlLoaderFactory add lots of unnecessary
> indirect includes to navigation_controller.h. Remove them and fix
> broken files that relied on these includes.
>
> Bug: 242216
> Change-Id: I4a9e95915187849eed45f55518cea539f186ee4c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999323
> Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Owners-Override: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#897779}

Bug: 242216
Change-Id: I26c846f072962b7691fea7667a56a983e846ce5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3002065
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Owners-Override: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898136}
2021-07-02 13:23:15 +00:00
Bret Sepulveda
9f5ddd4d8f Revert "Reland "Remove superfluous includes from navigation_controller.h""
This reverts commit 0af8b2943f.

Reason for revert: Compile failure on Chrome OS: https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20Full/188740?

Original change's description:
> Reland "Remove superfluous includes from navigation_controller.h"
>
> This is a reland of 219c8e40b4
>
> Original change's description:
> > Remove superfluous includes from navigation_controller.h
> >
> > NavigationHandle and SharedUrlLoaderFactory add lots of unnecessary
> > indirect includes to navigation_controller.h. Remove them and fix
> > broken files that relied on these includes.
> >
> > Bug: 242216
> > Change-Id: I4a9e95915187849eed45f55518cea539f186ee4c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999323
> > Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > Owners-Override: Jochen Eisinger <jochen@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#897779}
>
> Bug: 242216
> Change-Id: If1f739f709fdb2cf7e0b6a8e3d42678e7684a8be
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3000813
> Auto-Submit: Christian Dullweber <dullweber@chromium.org>
> Commit-Queue: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Owners-Override: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#898110}

Bug: 242216
Change-Id: Ibfd6a9dae757dceda771ab8f76015ba17d955420
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3001027
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Owners-Override: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898113}
2021-07-02 11:06:44 +00:00
Christian Dullweber
0af8b2943f Reland "Remove superfluous includes from navigation_controller.h"
This is a reland of 219c8e40b4

Original change's description:
> Remove superfluous includes from navigation_controller.h
>
> NavigationHandle and SharedUrlLoaderFactory add lots of unnecessary
> indirect includes to navigation_controller.h. Remove them and fix
> broken files that relied on these includes.
>
> Bug: 242216
> Change-Id: I4a9e95915187849eed45f55518cea539f186ee4c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999323
> Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Owners-Override: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#897779}

Bug: 242216
Change-Id: If1f739f709fdb2cf7e0b6a8e3d42678e7684a8be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3000813
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Owners-Override: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898110}
2021-07-02 10:49:59 +00:00
Findit
10647d5f29 Revert "Remove superfluous includes from navigation_controller.h"
This reverts commit 219c8e40b4.

Reason for revert:

Note: It is reported that sheriffs cannot submit CL created by Findit
(crbug.com/1187426). A workaround in the mean time is to abandon this
CL and create another revert CL.

Findit (https://goo.gl/kROfz5) identified CL at revision 897779 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzIxOWM4ZTQwYjQxZmEwODBjNTY5M2JmYzBmOTJiMjFkZWQxODMyOGMM

Sample Failed Build: https://ci.chromium.org/b/8842896488727742064

Sample Failed Step: compile

Original change's description:
> Remove superfluous includes from navigation_controller.h
> 
> NavigationHandle and SharedUrlLoaderFactory add lots of unnecessary
> indirect includes to navigation_controller.h. Remove them and fix
> broken files that relied on these includes.
> 
> Bug: 242216
> Change-Id: I4a9e95915187849eed45f55518cea539f186ee4c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999323
> Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Owners-Override: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#897779}


Change-Id: Id8cf6670212816702b843d7dd67e76f77f6ac5f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 242216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3000837
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Owners-Override: Matthew Wolenetz <wolenetz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#897804}
2021-07-01 17:08:33 +00:00
Christian Dullweber
219c8e40b4 Remove superfluous includes from navigation_controller.h
NavigationHandle and SharedUrlLoaderFactory add lots of unnecessary
indirect includes to navigation_controller.h. Remove them and fix
broken files that relied on these includes.

Bug: 242216
Change-Id: I4a9e95915187849eed45f55518cea539f186ee4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999323
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Owners-Override: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#897779}
2021-07-01 15:32:42 +00:00
Jan Wilken Dörrie
aace0cfef2 [LSC] Replace base::string16 with std::u16string in //{chrome*,content}
This change replaces base::string16 with std::u16string in //chrome,
//chromecast, //chromeos and //content.

Reproduction steps:
$ git grep -lw 'base::string16' chrome* content | \
      xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format

Bug: 1184339
Change-Id: I8fae0ab25b5d9bf1cb416ae5f47d7f680fb8f3ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752229
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862152}
2021-03-11 22:01:58 +00:00
Lei Zhang
4ea8c2099d Modernize content::FindRequestManager code.
Use more C++11. Along the way, also use base::Contains() in more places
and improve STL usage.

Change-Id: I34e96d3d9801bcdf30f0f10eea2f5ca91ed43508
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863157
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706284}
2019-10-16 02:27:59 +00:00
W. James MacLean
92a4519189 Add test for OOPIF ZoomToFindInPageRect.
This CL adds a test for
https://chromium-review.googlesource.com/c/chromium/src/+/1367864.

It modifies an existing, but disabled test to do this, so it's possible
this test was flakey or otherwise had issues, so this is being landed
separately from the main CL so we can diagnose it separately.

Bug: 734209
Change-Id: I7bf8a14f0d126a62e8ac4c5815d4b1802e27b3e6
Reviewed-on: https://chromium-review.googlesource.com/c/1384940
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618307}
2018-12-20 20:09:55 +00:00
Ehsan Karamad
6beb2ea93b Guest InnerWebContentses should always be attached
The API WebContentsImpl::GetInnerWebContents() returns two types of
WebContentses: the first type which are attached using
AttachToOuterContentsFrame, and legacy type which are based on
BrowserPlugin.

Similarly, WebContentsImpl::GetOuterWebContents() has a different
behavior depending on the type of the GuestView. Specifcally, if the
WebContents is for a BrowserPlugin-based GuestView, then
GetOuterWebContents() will return nullptr until BrowserPluginGuest is
attached. This means GetInnerWebContents() might return WebContentsImpls
whose BrowserPluginGuest is not still attached which is incorrect.

This issue seems to have caused a bug in find-in-page where there is a
MimeHandlerViewGuest in the page.

Bug: 897465
Change-Id: I1fc9b209cf5d1835e2aee311e36da15526c249c4
Reviewed-on: https://chromium-review.googlesource.com/c/1323904
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610735}
2018-11-25 18:15:13 +00:00
Rakina Zata Amni
3f77dff94c Remove WebFindOptions in browser process
This CL removes usage of WebFindOptions in browser process, in favor
of FindOptions, defined in find_in_page.mojom

Bug: 819919
Change-Id: Iee85e1a277a225765dc5bb9f990b5bb5854efa04
Reviewed-on: https://chromium-review.googlesource.com/1184594
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589783}
2018-09-08 16:19:43 +00:00
Rakina Zata Amni
2ac5750560 Reland "Mojoify FindInPage::Find"
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}
2018-08-16 01:44:45 +00:00
Makoto Shimazu
fc0e1eac05 Revert "Mojoify FindInPage::Find"
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}
2018-08-14 08:12:52 +00:00
Rakina Zata Amni
fef811c512 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}
2018-08-14 05:45:12 +00:00
Rakina Zata Amni
724f3efedd 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}
2018-07-23 03:19:46 +00:00
Rakina Zata Amni
57bec36fc8 Mojoify FindInPage::ActivateNearestFindResult
We are mojoifying browser<->renderer communication of Find-in-page.
In this CL, we are converting the GetNearestFindResult function to mojo.

Mojoifying doc: https://goo.gl/JenyGm

Previous CLs:
Mojoify FindInPage::GetNearestFindResult (parent of this CL)
crrev.com/c/1051143


Mojoify FindInPage::FindMatchRects
crrev.com/c/1049770

Add FindInPage mojo interface with ClearActiveFindMatch
crrev.com/c/1027393


Future CLs:
Mojoify other find-in-page functions

Bug: 819919
Change-Id: I8f2d0bfcf6642dc43d7f5ab5e80ce6614e006647
Reviewed-on: https://chromium-review.googlesource.com/1051525
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560494}
2018-05-22 06:05:10 +00:00
Rakina Zata Amni
da99726ec3 Mojoify FindInPage::GetNearestFindResult
We are mojoifying browser<->renderer communication of Find-in-page.
In this CL, we are converting the GetNearestFindResult function to mojo.

Mojoifying doc: https://goo.gl/JenyGm

Previous CLs:
Mojoify FindInPage::FindMatchRects (parent of this CL)
crrev.com/c/1049770

Add FindInPage mojo interface with ClearActiveFindMatch
crrev.com/c/1027393


Future CLs:
Mojoify other find-in-page functions

Bug: 819919
Change-Id: Id4852ed3902128594f3a29f7aa55d80d7f1f9a06
Reviewed-on: https://chromium-review.googlesource.com/1051143
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558329}
2018-05-14 15:59:36 +00:00
Rakina Zata Amni
174ef718ea Mojoify FindInPage::FindMatchRects
We are mojoifying browser<->renderer communication of Find-in-page.
In this CL, we are converting the FindMatchRects function to mojo.

Mojoifying doc: https://goo.gl/JenyGm

Previous CL:
Add FindInPage mojo interface with ClearActiveFindMatch
crrev.com/c/1027393

Future CLs:
Mojoify other find-in-page functions

Bug: 819919
Change-Id: I63dd966ac8008460dce796e2c2405df353416fd0
Reviewed-on: https://chromium-review.googlesource.com/1049770
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@{#558272}
2018-05-14 12:45:20 +00:00
Rakina Zata Amni
acf4049e2d Add FindInPage mojo interface with ClearActiveFindMatch
We are mojoifying browser<->renderer communication of Find-in-page.
In this CL, we are introducing the FindInPage mojo interface,
which currently only have the ClearActiveFindMatch function in it
and its implementation on the browser and renderer side. We are
also removing the old IPC messagefor ClearActiveFindMatch and
functions related to it.

ClearActiveFindMatch is called when the browser side wants to
remove the current active match highlighting in a frame.

Previous CLs (refactoring):
crrev.com/c/956648
crrev.com/c/1025242
crrev.com/c/1027013

Future CLs:
Mojoify other find-in-page functions

Mojoifying doc: https://goo.gl/JenyGm

Bug: 819919
Change-Id: I3ca9835819c6a46fbee0e2bf20a665c0bd0f5d22
Reviewed-on: https://chromium-review.googlesource.com/1027393
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Paul Meyer <paulmeyer@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556996}
2018-05-08 22:59:33 +00:00
Blink Reformat
a30d423812 The Great Blink mv for source files, part 1.
Update file contents without moving files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=darin@chromium.org

Bug: 768828
Change-Id: I8a2f4535a49a25f44b43df32f25691c0a2556d28
Reviewed-on: https://chromium-review.googlesource.com/1001152
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549060}
2018-04-07 15:31:06 +00:00
Brett Wilson
cc8623dc8e Replace std::deque and std::queue in //content.
These are replaced with the base versions base::circular_deque and base::queue.

Typedefs were replaced with using statements in changed code, and adjacent
typedefs were also converted.

RTCTimestamps struct in rtc_video_encoder.cc was made copyable and moveable
(it's just an int64 and an int32) to support being put in a circular_deque.
BrowsingDataRemoverImpl::RemovalTask was made move-only (from previously
not movable or copyable).

BUG=757232

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ib83f929ae4c014ae0d3766a57e9cb56cba446e2b
Reviewed-on: https://chromium-review.googlesource.com/656066
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501169}
2017-09-12 03:28:10 +00:00
paulmeyer
feafc2de2c Enable find-in-page across GuestViews.
This patch enables find-in-page to work across GuestViews, including
WebViews and PDFs, as explained in this design doc:
https://drive.google.com/open?id=1tl1L99oTgqQxolV7jRvDLzFQ9K251rQ_E16mOwB-BuU.
Specifically, this will allow find-in-page to work with embedded PDFs,
which has been a (very) longstanding bug in Chrome.

This patch also cleans up code that was previously used to route find
requests to the guest WebContents in the case of full-page GuestViews.
This shortcut is no longer needed, as this patch implements a more general
solution to traversing frames across all WebContentses during a find
session.

Note that this is an attempt to reland a fixed version of the reverted
CL here: https://codereview.chromium.org/2700613003/

BUG=55421

Review-Url: https://codereview.chromium.org/2836973002
Cr-Commit-Position: refs/heads/master@{#467124}
2017-04-25 21:46:40 +00:00
paulmeyer
b6c7ab52d0 Revert of Enable find-in-page across GuestViews. (patchset id:270001 of https://codereview.chromium.org/2700613003/ )
Reason for revert:
Suspected cause of crashes: https://bugs.chromium.org/p/chromium/issues/detail?id=709478

Original issue's description:
> Enable find-in-page across GuestViews.
>
> This patch enables find-in-page to work across GuestViews, including
> WebViews and PDFs, as explained in this design doc:
> https://drive.google.com/open?id=1tl1L99oTgqQxolV7jRvDLzFQ9K251rQ_E16mOwB-BuU.
> Specifically, this will allow find-in-page to work with embedded PDFs,
> which has been a (very) longstanding bug in Chrome.
>
> This patch also cleans up code that was previously used to route find
> requests to the guest WebContents in the case of full-page GuestViews.
> This shortcut is no longer needed, as this patch implements a more general
> solution to traversing frames across all WebContentses during a find
> session.
>
> BUG=55421
>
> Review-Url: https://codereview.chromium.org/2700613003
> Cr-Commit-Position: refs/heads/master@{#462327}
> Committed: 9dedb9f32f

TBR=nick@chromium.org,lfg@chromium.org,thestig@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=55421

Review-Url: https://codereview.chromium.org/2808923003
Cr-Commit-Position: refs/heads/master@{#463379}
2017-04-10 20:13:31 +00:00
paulmeyer
9dedb9f32f Enable find-in-page across GuestViews.
This patch enables find-in-page to work across GuestViews, including
WebViews and PDFs, as explained in this design doc:
https://drive.google.com/open?id=1tl1L99oTgqQxolV7jRvDLzFQ9K251rQ_E16mOwB-BuU.
Specifically, this will allow find-in-page to work with embedded PDFs,
which has been a (very) longstanding bug in Chrome.

This patch also cleans up code that was previously used to route find
requests to the guest WebContents in the case of full-page GuestViews.
This shortcut is no longer needed, as this patch implements a more general
solution to traversing frames across all WebContentses during a find
session.

BUG=55421

Review-Url: https://codereview.chromium.org/2700613003
Cr-Commit-Position: refs/heads/master@{#462327}
2017-04-06 02:14:58 +00:00
paulmeyer
3ac612d592 Handling new frames and frame navigations with find-in-page during a find
session.

This patch implements new find-in-page functionality that allows for frames
that are either newly added or navigated during a find session to be
automatically searched so that matches in their new content are
automatically highlighted and included in the results shown in the find bar.

Also, there is a fix included in this patch to prevent the find-in-page bar
from closing when a subframe navigates (the find session should only end if
the main frame navigates).

Design doc: https://docs.google.com/document/d/1r4F19FIKg4zPJCaSyJ9-T0sgFbxlCGKL3FjqQEAKegg/view

This is a reland of: https://codereview.chromium.org/2236403004/

BUG=2220, 621660

TBR=dcheng@chromium.org,pkasting@chromium.org

Review-Url: https://codereview.chromium.org/2384483004
Cr-Commit-Position: refs/heads/master@{#422176}
2016-09-30 19:24:09 +00:00
gcasto
cab0f2e9bc Revert of Handling new frames and frame navigations with find-in-page during a find session. (patchset id:120001 of https://codereview.chromium.org/2236403004/ )
Reason for revert:
This seems to be failing pretty consistently on some bots (e.g. https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29)

Original issue's description:
> Handling new frames and frame navigations with find-in-page during a find session.
>
> This patch implements new find-in-page functionality that allows for frames that are either newly added or navigated during a find session to be automatically searched so that matches in their new content are automatically highlighted and included in the results shown in the find bar.
>
> Also, there is a fix included in this patch to prevent the find-in-page bar from closing when a subframe navigates (the find session should only end if the main frame navigates).
>
> Design doc: https://docs.google.com/document/d/1r4F19FIKg4zPJCaSyJ9-T0sgFbxlCGKL3FjqQEAKegg/view
>
> BUG=2220,621660
>
> Committed: https://crrev.com/ec9c7f30eb10ab3fc9ab6707f7b736446ab89aa1
> Cr-Commit-Position: refs/heads/master@{#420715}

TBR=dcheng@chromium.org,pkasting@chromium.org,kenrb@chromium.org,paulmeyer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=2220,621660

Review-Url: https://codereview.chromium.org/2363993003
Cr-Commit-Position: refs/heads/master@{#420774}
2016-09-23 23:19:07 +00:00
paulmeyer
ec9c7f30eb Handling new frames and frame navigations with find-in-page during a find session.
This patch implements new find-in-page functionality that allows for frames that are either newly added or navigated during a find session to be automatically searched so that matches in their new content are automatically highlighted and included in the results shown in the find bar.

Also, there is a fix included in this patch to prevent the find-in-page bar from closing when a subframe navigates (the find session should only end if the main frame navigates).

Design doc: https://docs.google.com/document/d/1r4F19FIKg4zPJCaSyJ9-T0sgFbxlCGKL3FjqQEAKegg/view

BUG=2220,621660

Review-Url: https://codereview.chromium.org/2236403004
Cr-Commit-Position: refs/heads/master@{#420715}
2016-09-23 20:28:03 +00:00
paulmeyer
bbaacbe524 Changes to how FindRequestManager reports find results.
I've noticed some problematic edge cases with the reporting of find-in-page results from FindRequestManager. While trying to write some new tests in find_request_manager_browsertest.cc, I noticed that the new tests sometimes fail because of these edge cases. The existing tests in there could definitely fail from this as well, though much less likely. I have seen them fail very rarely before though and this is probably why.

The details of the issue, edge cases, and my solution are explained in this design doc: https://docs.google.com/a/google.com/document/d/1BCvuSW9XSBH7GMx5VC0TgBh6XmJJDOzz_XZKItjF6oM/edit?usp=sharing

UPDATE: Anther find-in-page CL I landed recently (https://codereview.chromium.org/2186113002/) was reverted because of a test that began timing out. I believe that failure is caused by the problems fixed here, so that bugfix is now blocked on this CL.
Review-Url: https://codereview.chromium.org/2249133002
Cr-Commit-Position: refs/heads/master@{#415353}
2016-08-30 18:06:11 +00:00
paulmeyer
c8cb7cbda8 Multi-Process Find-in-Page.
This patch completes the implementation of multi-process find-in-page, as described in the design doc: https://docs.google.com/document/d/12S_6X2MWWLoyJslajcajL2ELU7zhodPxMOxa8Bg4Wg0/view

BUG=457440
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/1959183002
Cr-Commit-Position: refs/heads/master@{#398186}
2016-06-07 01:20:37 +00:00
paulmeyer
c0b762b6f9 Implement a shell of FindRequestManager, and hook it up to WebContentsImpl.
This is an intermediate step towards the multi-process find-in-page implementation. At this stage, FindRequestManager does not add any extra functionality, but find requests are plumbed through it. Note that no additional testing is required at this stage.

Design doc for multi-process find-in-page: https://docs.google.com/a/google.com/document/d/12S_6X2MWWLoyJslajcajL2ELU7zhodPxMOxa8Bg4Wg0/edit?usp=sharing

Summary of specific changes introduced in this patch:
- Find request IDs are now always unique for every find request (previously unique per find session in most cases).
- Very basic shell of FindRequestManager added.
- Find, FindReply, StopFinding, FindMatchRects, FindMatchRectsReply, and ActivateNearestFindResult are now plumbed through FindRequestManager (though it does not yet process or alter these requests).
- FindMatchRects and ActivateNearestFindResult can no longer be called directly via RenderFrameHost. This ensures that all calls must go through FindRequestManager (via WebContents).
- Small find bug addressed in WebViewFindHelper.

BUG=457440
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review URL: https://codereview.chromium.org/1851793002

Cr-Commit-Position: refs/heads/master@{#386966}
2016-04-13 11:56:13 +00:00