Detect whether WebContents destructions was triggered by the user. |
||
Issue descriptionMultiple project want some notion of "user initiated" tab/window closure. e.g: 1. We want to collect metrics on spammy popups that users close right away 2. We want to use this for page load abort tracking (did the user close the page while it was loading? Right now, this signal can be corrupted by script-initiated close (e.g. window.close()) or other non-user initiated close (extensions, background contents for offline, etc). I *think* the best signal for this is logic flowing from browser_commands.cc (CloseWindow/CloseTab), but I'm not confident about Android.
,
Mar 26 2018
It looks like this exists already for tab-closing, see WebContents::GetClosedByUserGesture. For windows, it's more complex than CloseWindow in BrowserCommands. Pressing the "x" to close button on desktop goes through views::Widget::Close / BrowserView::CanClose which makes it hard to thread "user initiated" through. Still, the existing heuristic may be good enough for a start.
,
Nov 21
|
||
►
Sign in to add a comment |
||
Comment 1 by csharrison@chromium.org
, Mar 26 2018