Commit cf87e74b authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Find an existing terminal if one exists to position settings

Bug: 1056983
Change-Id: Ic0671f0c06a9390346537343a94a28b75adbca63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096605
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749511}
parent c3a94015
...@@ -136,6 +136,10 @@ void LaunchTerminalSettings(Profile* profile, Browser* terminal) { ...@@ -136,6 +136,10 @@ void LaunchTerminalSettings(Profile* profile, Browser* terminal) {
params->disposition = WindowOpenDisposition::NEW_POPUP; params->disposition = WindowOpenDisposition::NEW_POPUP;
// If |terminal| is not set, we open the settings window with the // If |terminal| is not set, we open the settings window with the
// default bounds and then resize it later. // default bounds and then resize it later.
if (!terminal) {
terminal = web_app::FindSystemWebAppBrowser(
profile, web_app::SystemAppType::TERMINAL);
}
if (terminal) { if (terminal) {
const gfx::Rect& bounds = terminal->window()->GetBounds(); const gfx::Rect& bounds = terminal->window()->GetBounds();
params->override_bounds.set_origin( params->override_bounds.set_origin(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment