Commit 3bd52040 authored by Michael Giuffrida's avatar Michael Giuffrida Committed by Commit Bot

Always start KioskNextHome app maximized

The app window can sometimes get un-maximized, e.g. by snapping it to
the side (crbug.com/966889).

These changes ensure that even when these bugs happen, the app will be
maximized again the next time it launches (ie, at next sign-in):

* Removing the window ID ensures bad bounds aren't cached in the user's
  profile.
* Calling window.maximize() in the window-created callback is usually a
  no-op, but guards against other bugs preventing the app window from
  opening maximized.

Bug: 930285
Change-Id: Icb1edacef86dd71cc69f8b9dde2b8139b0c270b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638279
Auto-Submit: Michael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Bruno Santos <brunoad@chromium.org>
Reviewed-by: default avatarBruno Santos <brunoad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665994}
parent 3f09d734
......@@ -3,6 +3,8 @@
// found in the LICENSE file.
chrome.app.runtime.onLaunched.addListener(() => {
const windowOptions = {id: 'main', state: 'maximized', frame: 'none'};
chrome.app.window.create('main.html', windowOptions);
const windowOptions = {state: 'maximized', frame: 'none'};
chrome.app.window.create('main.html', windowOptions, (newWindow) => {
newWindow.maximize();
});
});
......@@ -3,6 +3,8 @@
// found in the LICENSE file.
chrome.app.runtime.onLaunched.addListener(() => {
const windowOptions = {id: 'main', state: 'maximized', frame: 'none'};
chrome.app.window.create('internal/main.html', windowOptions);
const windowOptions = {state: 'maximized', frame: 'none'};
chrome.app.window.create('internal/main.html', windowOptions, (newWindow) => {
newWindow.maximize();
});
});
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