Skip to content

120.0.6099.288

Currently we close new browsers with `browser->window()->Close()`. Turns
out this can fail in certain conditions, e.g. if the user is currently
dragging the window. This leads to the possibility that a new window
does not get closed.

This change uses `browser->tab_strip_model()->CloseAllTabs()` that seems
to be more resilient and closes the browser window during drag events.

Note this is a bandaid fix, the ideal solution is to prevent the window
from opening on the first place, not to close it after the fact.

This is behind the `kKioskCloseAllTabs` feature flag. Enable it with the
`--enable-features=KioskCloseAllTabs` arg in /etc/chrome_dev.conf.

      and the window still closes during a drag.

(cherry picked from commit e090938556780999db8cca6dfde8aab52b57300b)

Bug: b:322954900
Test: manual - do the steps in b/322775376, verify step 11 does not work
Change-Id: Iae6beba499e66d7849551331bc10e55179051024
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5249989
Commit-Queue: Edman Anjos <edman@chromium.org>
Reviewed-by: Ben Franz <bfranz@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1254484}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5272320
Commit-Queue: Jeroen Dhollander <jeroendh@google.com>
Auto-Submit: Edman Anjos <edman@chromium.org>
Reviewed-by: Jeroen Dhollander <jeroendh@google.com>
Cr-Commit-Position: refs/branch-heads/6099@{#1943}
Cr-Branched-From: e6ee4500f7d6549a9ac1354f8d056da49ef406be-refs/heads/main@{#1217362}
Assets 2