0
Commit Graph

90 Commits

Author SHA1 Message Date
Georg Neis
35ff854b7e Remove Lacros leftovers from content/browser, part 2
Main changes:
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Remove obsolete build flag includes/dependencies

Bug: b:354842935
AX-Relnotes: n/a.
Change-Id: I079b003a4664a7a3f7281905323611b6fc4fe3da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090635
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397108}
2024-12-16 18:02:08 -08:00
Kartar Singh
b1bfa1a221 Move render input router and related dependencies to //components/input
This is being done as a part of InputVizard project[1] where touch input
handling is being moved to Viz on Android. Earlier we had
been refactoring input related bits from browser classes and placing
them in //content/common/input but since Viz cannot depend on content,
the input code is being moved into //components/input.

[1] https://docs.google.com/document/d/1mcydbkgFCO_TT9NuFE962L8PLJWT2XOfXUAPO88VuKE

Bug: b/340182114
Change-Id: I14187a7ed34d576a5c6d86bf6ed08174bcef04fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5613297
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Kartar Singh <kartarsingh@google.com>
Cr-Commit-Position: refs/heads/main@{#1318531}
2024-06-24 13:14:57 +00:00
Aman Verma
37105efdd7 Pull RWHIER and RWT to //content/common/input.
This CL pulls render_widget_host_input_event_router and
render_widget_targeter to //content/common/input. To allow this, this CL
also pulls the remaining dependencies, namely, touch_emulator_client and
cursor_manager to //content/common/input.

Doc Link:
https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?tab=t.0#heading=h.7wb78gd5w8i0

Bug: b:330555923
Change-Id: I73f08be862e0aec339ff1ca29d3142ec227220b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5397681
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Cr-Commit-Position: refs/heads/main@{#1308554}
2024-05-31 11:09:49 +00:00
Alison Gale
81f4f2c793 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: Iee14d10d544e9f0ec046117cc4ec8a55c427adc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469947
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290838}
2024-04-22 19:33:31 +00:00
Dave Tapuska
9425f10ddf [code health] Remove ConsolidatedMovementXY
This feature has been enabled for a while, we can remove the legacy
code path.

Bug: 41364801
Change-Id: I755b15833e2cb507d287f3b81cbedca5f8108b5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467429
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290063}
2024-04-19 18:18:31 +00:00
Takumi Fujimoto
4661871d13 [CodeHealth] Rename mouse lock to pointer lock
When the code was originally written, "mouse lock" was a popular term in
the gaming industry and the PointerLock API didn't even exist. Now that
"pointer lock" is an established term, we are switching our codebase
away from the old term to be consistent with the web platform API:
https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API

There still are some names that aren't renamed in this CL, e.g. enum
values recorded in metrics.

There should be no behavioral changes.

Low-Coverage-Reason: TRIVIAL_CHANGE This is a rename CL
Bug: 1518948
Change-Id: Ib66d87e4919c2570109d7e6755ea91dfc18d42fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5148491
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251864}
2024-01-25 02:04:18 +00:00
Arthur Sonzogni
bdeca8e234 Privatize content features.
There are two headers to declare features in content.
- the public one: `content/public/common/content_features.h`
- the private one: `content/common/features.h`.

Unfortunately, most are declared in the public one, despite being used
privately exclusively. This violate the `content/public/` rules. This
patches provides a fix.

Parts of this patch was made programmatically using this script:
https://paste.googleplex.com/6699322946093056, with the following
output: https://paste.googleplex.com/5591288895242240

This patch:
1. Update `docs/how_to_add_your_feature_flag.md` to incentive
   developers to the non public versions.
2. Move ~70 features back into the private version.
3. Programmatically update the includes to include the correct
   #include header(s).
4. For consistency and minimizing the amount of files modified,
   the two headers to use the `features::` namespace.

AX-Relnotes: n/a.
Change-Id: Id9126a95dfbc533d4778b188b659b5acc9b3d9e3
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4836057
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194718}
2023-09-11 08:32:12 +00:00
Ella Ge
04708ae310 Remove expired flag enable-pointer-lock-options
Remove the expired feature flag. The flag has been default enabled
since 2020.
https://chromestatus.com/feature/5723553087356928

Unfortunately the spec change didn't land because of lack of interest from other implementers!

Bug: 1419225
Change-Id: If89b7a5f868406f673c25c5b392f13ef5abbb451
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4366978
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1121888}
2023-03-24 19:55:18 +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
Dave Tapuska
327c06c9c7 Rename GetMainFrame to GetPrimaryMainFrame
Progressively rename some usages of GetMainFrame to GetPrimaryMainFrame.

This is an automated change via git grep & sed.

BUG=1250404

Change-Id: I5e8fda4f11104cf9fcde8a690a33dc6ab7c34f3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3696741
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013636}
2022-06-13 20:31:51 +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
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
Carlos Caballero
15caeeb12d Rename WebContentsImpl::GetFrameTree to GetPrimaryFrameTree
Note that the old method is already returning the PrimaryFrameTree so
this patch is just about making that explicit.

Trivial change that renames all test files leaving the production code
for a later patch. That code will need a closer look to make sure that
call sites are really expecting the primary frame tree (note they are
already getting the primary frame tree, so this is just an extra check
for peace of mind).

Keeping the old method around for a while will also prevent this massive
patch from being reverted if an optional try-bot later fails.

Bug: 1251094
Change-Id: Ibc86aedf203013e41e61ede94e6af929f80ee477
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3231330
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Sreeja Kamishetty <sreejakshetty@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/main@{#935359}
2021-10-27 09:57:55 +00:00
Mustaq Ahmed
8f49a8b2f4 Add a test covering pending mouse-lock state on deleted element.
Bug: 1213769
Change-Id: I196a1e7af7cab3b0a018b2015b60a97b93eacc34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2989049
Auto-Submit: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896241}
2021-06-25 22:42:28 +00:00
Xida Chen
365e7caf5e Disable PointerLockBrowserTest.PointerLockEventRouting on Linux
The test is flaky on linux.

Bug: 1210940
Change-Id: I72127f07d7a09eca48c7b55f5ca177b0c78e7660
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909885
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886363}
2021-05-25 17:39:01 +00:00
Martin Šrámek
bcbe62ab32 Disable PointerLockBrowserTest.PointerLockWheelEventRouting on Linux
Due to flakiness.

Bug: 1205889
Change-Id: I946325c86c32bd1e40dbd7717e9b856299cc3adb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2876886
Auto-Submit: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880326}
2021-05-07 11:54:27 +00:00
Etienne Pierre-doray
544a9a1a92 [sheriff]: Disable PointerLockBrowserTestWithOptions.UnadjustedMovement
Bug: 1198612
Change-Id: Ib283f0690c8089d99e1ddb395f6b39be0c21b6ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2826655
Auto-Submit: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Ella Ge <eirage@chromium.org>
Owners-Override: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#872598}
2021-04-14 22:48:13 +00:00
arthursonzogni
3d3ec9e859 Align ExecJs with EvalJs. ExecJs now waits for the promise.
The documentation of ExecJs says:
```
Run a script exactly the same as EvalJs(), but ignore the resulting
value.
```
and developers are using it with this assumption. A big difference is
that EvalJs() is waiting on the promise the resolve, while ExecJs
doesn't.

There are no strong reasons not to wait for the promise to resolve in
both case. Moreover, there are dozen of tests written with an
incorrect assumption about its behavior. They are listed on this patch:
https://chromium-review.googlesource.com/c/chromium/src/+/2644945

This patch aligns ExecJs with EvalJs. It nows waits for the promise to
resolve before returning.

Bug: 1170681
Change-Id: I97e6f199c7d261d8fab2096911a0327d60997338
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2652609
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859712}
2021-03-04 11:00:50 +00:00
Yuta Hijikata
d0a8b6b606 LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_CHROMEOS_ASH)
The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with
is_chromeos_ash with some special cases (For those cases please
refer to http://go/lacros-macros).

The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.

Bug: 1052397
Change-Id: Ieb265e116ff6ada5e2f99d609ff12fb9f92727e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534271
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829687}
2020-11-20 16:36:15 +00:00
danakj
10f3237a20 Point includes to content/browser/renderer_host instead of frame_host/ (5/x)
The code has moved, so update the includes.

R=avi@chromium.org

Bug: 1091083
Change-Id: I560162df09d04a63a7155500b8d3205440086ec1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2411402
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807205}
2020-09-15 22:25:16 +00:00
Avi Drissman
7c57be77a7 Migrate to OS_MAC and OS_APPLE in content
Because content is not used by iOS, this migrates
 defined(OS_MACOSX) -> defined(OS_MAC)

Bug: 1105907
Change-Id: Ibf85273fea9c5566594ca00f2589b890515be6c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321210
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792842}
2020-07-29 20:09:46 +00:00
James Howard
a07e14909a Implement unadjusted mouse movement when pointerlocked on Mac
Unaccelerated pointer movement fields in CGEvent are publicly declared
in the macOS 10.15.1 SDK.

Any local mouse move NSEvent/CGEvent on a compatible macOS has the
unaccelerated movement data, so simply choose which fields to query when
constructing a WebMouseEvent based on a flag.

R=jameshollyer@chromium.org

Bug: 998688
Change-Id: I45a9fdb5c0cd1ef2dff3edf31d9dfa116d13b703
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238504
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783000}
2020-06-26 15:34:08 +00:00
James Hollyer
67e23385f5 Enable UnadjustedMovement option in Chrome OS
This uses the InputControllerEvDev to allow application to turn off
mouse acceleration when using pointer lock on Chrome OS.

Bug: 982379
Change-Id: Ie3b9d5f67d7a5514b90b25d8b13e9f6f5b01e390
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2188908
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781628}
2020-06-24 00:26:56 +00:00
Liviu Tinta
942fbf4b3f Enable test PointerLockBrowserTest.PointerLockChildFrameDetached
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: I759ca6c31856fbf1e99a70b4e925a7d5093c50cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212978
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772756}
2020-05-28 17:04:16 +00:00
Liviu Tinta
2775eb855f Enable test PointerLockBrowserTest.PointerLockAndUserActivation
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: I30c9d3df7101be6ccd0686b051b83bfb0754300c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213103
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772666}
2020-05-28 13:33:36 +00:00
Liviu Tinta
2877fb925b Enable test PointerLockBrowserTest.PointerLockEventRouting
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: I473623338fee3277cb905b17151f80a6468ebb57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213107
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772367}
2020-05-27 19:44:09 +00:00
Liviu Tinta
cd230a590f Enable test PointerLockBrowserTest.PointerLockBasic
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: Icc977b9c8bbfaba8c322a82ff6388886aee83941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212997
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772227}
2020-05-27 14:18:33 +00:00
Liviu Tinta
4585e27a39 Enable PointerLockBrowserTest.PointerLockWheelEventRouting
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: I08ba7c5f34d57a92e24480934cb6d2fc731fd6f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213110
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771923}
2020-05-26 19:49:58 +00:00
Liviu Tinta
6e6833d9cc Enable PointerLockBrowserTestWithOptions.UnadjustedMovement
The tests in pointer_lock_browsertest.cc were flaky for 3 reasons:
- requestPointerLock being asynchronous
- mouse events being asynchronous
- native mouse events interfering with tests during execution
All the above were addressed in prior CLs.

Bug: 766450
Change-Id: Ic046bce6c81a9bcc8d1f78a5c56506ed959b45ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213202
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771844}
2020-05-26 16:42:34 +00:00
Rune Lillesveen
7da21846b1 PointerLockWheelEventRouting still flaky.
Example:

https://ci.chromium.org/p/chromium/builders/ci/Win7%20Tests%20%281%29/102829

TBR=liviutinta@chromium.org

Bug: 766450
Change-Id: I1932669f8381bb3efdf820c20e496191831d088d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203069
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769272}
2020-05-15 14:57:21 +00:00
Peter Kasting
919ce657e4 Add missing #includes of browser_test.h.
This is a step towards doing full IWYU of browser_test.h, which will
have other benefits.

Completely mechanical and already R+ed as part of r765923.

Tbr: sky
Bug: none
Change-Id: Icb7ab728098a6cf29c0920da4b524e96a7c024c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186411
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766361}
2020-05-07 10:22:36 +00:00
Balazs Engedy
683d2c7a8f Revert "IWYU for browser_test.h."
This reverts commit 66a53c909a.

Reason for revert: Breaks compile on official branded builders.

Original change's description:
> IWYU for browser_test.h.
> 
> Include this directly in relevant test files.  This lets us convert the
> HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
> view_event_test_base.h into #errors, and force people to not even
> include this file in files that can't use it.
> 
> Bug: none
> Tbr: sky
> Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#765923}

TBR=sky@chromium.org,pkasting@chromium.org,thestig@chromium.org

Change-Id: I4583916602404c310a93f571dd2c78645c6bd567
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184132
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765931}
2020-05-06 10:36:40 +00:00
Peter Kasting
66a53c909a IWYU for browser_test.h.
Include this directly in relevant test files.  This lets us convert the
HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
view_event_test_base.h into #errors, and force people to not even
include this file in files that can't use it.

Bug: none
Tbr: sky
Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765923}
2020-05-06 09:38:56 +00:00
Liviu Tinta
7f8bdfb534 Fix flaky test PointerLockWheelEventRouting
requestPointerLock is an asynchronous operation.
Use a promise to properly sync on pointerlock in order to safely check
for correctness.

Bug: 766450
Change-Id: I6df4f4b597807a1c4938e75ccd4b994ba6a1adde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2177154
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765809}
2020-05-05 23:35:26 +00:00
Liviu Tinta
cb1d46d8a3 Fix flaky test PointerLockBrowserTest.PointerLockEventRouting
Add global variables to child scope. Add synchronization between browser
and renderer.
In previous fix (https://chromium-review.googlesource.com/c/chromium/src/+/2158386)
I was able to reproduce the flakiness problem locally. For
this fix I wasn't able to. I assume the flakiness is due to having
browser process and renderer process out of sync.

Bug: 766450, 883710
Change-Id: I181692a2d7626541915084f9e36a12283553f4c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168555
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765095}
2020-05-04 16:26:05 +00:00
Rahul Arakeri
a7c322dcff Disable flaky pointerlock tests.
Change-Id: Iae9c087b3e54ad2ef2b27ae6f1b863d7e57e3ead
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2176094
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Rahul Arakeri <arakeri@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#764806}
2020-05-01 22:21:31 +00:00
Liviu Tinta
bf520b3c5b Fix flaky test PointerLockRequestUnadjustedMovement
The test code was not waiting for pointerlockchanged and pointerlockerror events before checking for correctness.

Bug: 1014324
Change-Id: I04dac67731f954a5f220c426db031502a6309e35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2158934
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761919}
2020-04-23 14:33:15 +00:00
Liviu Tinta
d59e507a43 Fix flaky test PointerLockBrowserTest.PointerLockEventRouting
The test was not waiting appropriately for events to fire. Now it waits for proper events to fire for requestPointerLock, exitPointerLock, mousemove before it checks for the correctness of the operation.

Bug: 766450
Change-Id: Id9f1db83f4555a16a45960f1869680a90c77757e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2158386
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761916}
2020-04-23 14:31:06 +00:00
Dave Tapuska
347d60a702 Scope WebInputEvent types to enum namespaces.
WebInputEvent::Type and WebTouchPoint::State are adjusted in this change.

This allows us to alias this enumeration to a mojo defined type that
will come in another CL.

No functional changes in this CL, largely completed via sed.

Change-Id: I0657aacf782a437f9432e721bba349f8fdf797e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159698
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761210}
2020-04-21 23:55:47 +00:00
jameshollyer
48a702f1d8 Reject Pointer Lock requests when not in focus
Recent changes to pointer lock requests(https://crrev.com/c/2069199)
caused an error in logic which allowed requests made while not in focus
to be able to succeed. This meant that a request made while changing
focus would cause a strange state. I also added an earlier check for
focus so that we error out before reaching the browser.

Bug: 1068339
Change-Id: If706d2a693ca6a9aa2a8cf6c85ed622b429b97fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2138501
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758382}
2020-04-11 04:21:40 +00:00
Darwin Huang
e38fd54a90 Sheriff: Mark PointerLockEventRouting test as flaky
Mark PointerLockBrowserTest.PointerLockEventRouting as flaky on Linux.

TBR=lfg@chromium.org, gab@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 766450
Change-Id: I1932e553b3ae1644241a4e8c8676b121e5710b19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142330
Reviewed-by: Darwin Huang <huangdarwin@chromium.org>
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757512}
2020-04-08 19:05:56 +00:00
James Hollyer
0a8c7ee103 Use ChangeMouseLock function from CrossProcessFrameConnector
The FrameConnectorDelegate is supposed to be an interface which
is implemented by an object supplying platform semantics for a child
frame. The recent change(https://crrev.com/c/2071788) failed to
implement the ChangeMouseLock in CrossProcessFrameConnector and
therefore these calls were not getting to the correct place.

I also added the error handler for the rarely hit
PointerLockResult::kUserRejected error.

Bug: 1062702
Change-Id: I9c6aad9bac455b578b39e2aa086732f69f09fe61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116327
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756517}
2020-04-04 07:45:16 +00:00
James Hollyer
d5c9de4662 Use Promise with RequestPointerLock calls
The Pointer Lock API used to use an even based system.  However, that
is an outdated system and the events do not give an reason in failures.
This change introduces a Promise to the call that adds reasons if the
request is rejected.

Bug: 1042289
Change-Id: I4c8cacac3db5d9dc8d2f3a09c663c2dfb5bdf89e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2069199
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748810}
2020-03-10 19:02:45 +00:00
Andy Paicu
4f71752f92 Disabling some flaky PointerLockBrowserTest.* tests
Bug: 1060129
Change-Id: Ic04b6aa906d939a924bb8488481c4f669b849a21

TBR=sky@chromium.org,jameshollyer@chromium.org

Change-Id: Ic04b6aa906d939a924bb8488481c4f669b849a21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095594
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Auto-Submit: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748651}
2020-03-10 13:23:24 +00:00
James Hollyer
5b0230fa8a Use Mojo For Pointer Lock Requests
Pointer lock and unlock requests were still using the old IPC workflow.
This updates the call to use Mojo.

This CL is a copy of a merged and reverted CL. For reference to the
discussions here is the original: https://crrev.com/c/2028453

Bug: 1042293
Change-Id: I26c3c3cabce06437698f8b9ebed01d8476bb5eb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095402
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748512}
2020-03-10 03:52:26 +00:00
Maggie Cai
8dda15b2f1 Revert "Use Mojo for Pointer Lock Requests"
This reverts commit 4e6e084bef.

Reason for revert: This CL is likely to cause the build failure for https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-chrome/3799 and https://ci.chromium.org/p/chromium/builders/ci/Cast%20Audio%20Linux/68656 (first failure linked).

Original change's description:
> Use Mojo for Pointer Lock Requests
> 
> Pointer lock requests were still using the old IPC workflow.  This
> updates the call to use Mojo.
> 
> Bug: 1042293
> Change-Id: I5b3b58b56f37fd8ea3fb5960579340fc0d72514a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028453
> Commit-Queue: James Hollyer <jameshollyer@chromium.org>
> Reviewed-by: Vincent Scheib <scheib@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#748021}

TBR=sky@chromium.org,danakj@chromium.org,dcheng@chromium.org,scheib@chromium.org,sammc@chromium.org,dtapuska@chromium.org,odejesush@chromium.org,jameshollyer@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1042293
Change-Id: I38dd8c8c881e03c878fa9c85846e04f35ff6f661
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2094517
Reviewed-by: Maggie Cai <mxcai@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748103}
2020-03-09 03:50:32 +00:00
James Hollyer
4e6e084bef Use Mojo for Pointer Lock Requests
Pointer lock requests were still using the old IPC workflow.  This
updates the call to use Mojo.

Bug: 1042293
Change-Id: I5b3b58b56f37fd8ea3fb5960579340fc0d72514a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028453
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748021}
2020-03-07 17:31:02 +00:00
Yi Gu
aa6443f72f Disable PointerLockBrowserTestWithOptions.UnadjustedMovement on Linux
This test is flaky on Linux:
https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyXQsSBUZsYWtlIlJjaHJvbWl1bUBjb250ZW50X2Jyb3dzZXJ0ZXN0c0BQb2ludGVyTG9ja0Jyb3dzZXJUZXN0V2l0aE9wdGlvbnMuVW5hZGp1c3RlZE1vdmVtZW50DA

TBR=mustaq@chromium.org

Bug: 1043985
Change-Id: I9c9cd3ade09dab3b601895ad0b8e8f4896745f56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028728
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736507}
2020-01-29 20:01:59 +00:00
Francois Doray
8a8d6627dc [sheriff] Disable PointerLockBrowserTestWithOptions.UnadjustedMovement on Windows.
R=mustaq@chromium.org
TBR=mustaq@chromium.org

Bug: 1043985
Change-Id: I16beb5001a913863a03b6670b303e935a9f5ae80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2019606
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735018}
2020-01-24 18:30:12 +00:00
W. James MacLean
13d834d963 Remove WebContentsViewGuest & RenderWidgetHostViewGuest.
This CL removes more dead BrowserPlugin infrastructure.

Specifically, it remove WebContentsViewGuest, and
RenderWidgetHostViewGuest. It also removes the "guest_view_hack" which
has been in RenderWidgetHostViewMac/Aura since the inception of
BrowserPlugin.

Bug: 533069
Change-Id: Ie6d28ca981d612d3f7bf8f180c615f78d53b7e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1943097
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721497}
2019-12-04 16:06:45 +00:00