Does LOCKED-FULLSCREEN work for a ChromeBook?

260 views
Skip to first unread message

Robert Velton

unread,
May 17, 2022, 11:09:51 PM5/17/22
to Chromium Extensions
I have come pretty far building an extension for a ChromeBook in manifest V3. However, I am not able to set the WindowState to locked-fullscreen. 

Does anyone know if there is a specific permission I need to set in the manifest? 

I haven't found munch in the way of documentation on this. Any help would be appreciated.

Thanks.

hrg...@gmail.com

unread,
May 17, 2022, 11:56:53 PM5/17/22
to Chromium Extensions, Robert Velton
The permission you need should be "lockWindowFullscreenPrivate".

Robert Velton

unread,
May 18, 2022, 1:49:37 AM5/18/22
to hrg...@gmail.com, Chromium Extensions
Thank you for the reply. I tried adding that permission to the manifest, but no luck.

On the actual Chromebook, in the developer console, I keep seeing the following message:
"Locked browser launch request sent."

However, the locked browser doesn't seem to be launching. Is there a setting in the admin console I use to assign apps to devices? Or is this a setting in code?

Robert Velton

unread,
May 18, 2022, 2:04:28 AM5/18/22
to Chromium Extensions, Robert Velton, Chromium Extensions, hrg...@gmail.com
Disregard the output, that is actually my own debug, lol. But for some reason, even with the "lockWindowFullscreenPrivate" in the permission list in the manifest, the locked window is not popping up.

hrg...@gmail.com

unread,
May 18, 2022, 3:07:41 AM5/18/22
to Chromium Extensions, Robert Velton, Chromium Extensions, hrg...@gmail.com
Maybe that specific API call requires a user interaction, i.e. it must be called inside an input event handler (onclick, onkeypress, etc.).
If that's the case then you should see some kind of error message in the console.
Try opening the DevTools console in an extension page (or the service worker) and type this:
chrome.windows.create({state:'locked-fullscreen'})

Do you see any errors?

Robert Velton

unread,
May 18, 2022, 9:13:58 AM5/18/22
to hrg...@gmail.com, Chromium Extensions
Okay, got some more information.

So I do have the permission "lockWindowFullscreenPrivate" set in the manifest, but here is the error message in the debug console on the chromebook:

"Unchecked runtime.lastError: Cannot lock window to fullscreen or close a locked fullscreen window without lockWindowFullscreenPrivate manifest permission"

Not sure if I have to prompt the user or if there is a managed setting to allow this on the chrome book?

hrg...@gmail.com

unread,
May 18, 2022, 9:44:08 AM5/18/22
to Chromium Extensions, Robert Velton, Chromium Extensions, hrg...@gmail.com
I think the explanation is here:

The "lockWindowFullscreenPrivate" permission is only allowed to 6 extension IDs.

In other words, the locked-fullscreen state is a special feature only allowed on Chrome OS to a couple of Google-owned extensions: "Share to Classroom" and "Assessment Assistant".

Robert Velton

unread,
May 18, 2022, 9:50:55 AM5/18/22
to hrg...@gmail.com, Chromium Extensions
AH, well that would explain it, lol.

This is going to be a real bummer if we can't get access to that permission or if we have to create a full app in the Google play store.

Thanks for your help.

Robert Velton

unread,
May 18, 2022, 10:37:11 AM5/18/22
to hrg...@gmail.com, Chromium Extensions
I wonder how they are going to handle the replacement of Kiosk mode in manifest V2 since that is being deprecated and chrome apps are being deprecated as well.

Anyone know if there is replacement functionality for this?

Thanks.

hrg...@gmail.com

unread,
May 18, 2022, 11:49:32 AM5/18/22
to Chromium Extensions, Robert Velton, Chromium Extensions, hrg...@gmail.com
The kiosk mode functionality is independent of apps and extensions.
You can start a kiosk mode with this command line:
chrome.exe --user-data-dir="C:\path\to\datadir" --kiosk www.example.com

However, Chrome OS is not a typical OS environment, so you'll have to do some digging to make that work.
Reply all
Reply to author
Forward
0 new messages