Make WebContents editing methods count as an interaction
These editing commands are called programmatically in response to user
actions from outside the web contents, such as context menu handlers.
In the case of the linked bug, `Paste()` is called by Ash clipboard
preview feature code.
Since pasting form the clipboard is only allowed after such an
interaction, the WebContents must log an editing command as an
interaction.
This renames symbols related to "interactive input event" with the
term "interaction" in order to more accurately describe its new
meaning.
Bug: 1363828
Change-Id: Iaef78cad04be76a3d5bb31c9acd5536b1a6bea75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3962271
Commit-Queue: Evan Stade <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Colin Kincaid <[email protected]>
Auto-Submit: Evan Stade <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1062956}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index aea5078..cc61bc1 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -1287,8 +1287,8 @@
// that an action that requires a user gesture actually has one in the
// trustworthy browser process, rather than relying on the untrustworthy
// renderer. This should be eventually merged into and accounted for in the
- // user activation work.
- virtual bool HasRecentInteractiveInputEvent() = 0;
+ // user activation work: crbug.com/848778
+ virtual bool HasRecentInteraction() = 0;
// Sets a flag that causes the WebContents to ignore input events.
virtual void SetIgnoreInputEvents(bool ignore_input_events) = 0;