This is a basic demo of the proposed Screen Enumeration and Window Placement APIs.
This demo depends on recent work and unmerged changes to Chrome:
- Screen Enumeration: Basic Implementation
- Available on Chromium 78 Canary and Dev channels with:
- Command-line switch: --enable-blink-features=ScreenEnumeration
- Or enable this flag : chrome://flags#enable-experimental-web-platform-features
- Available on Chromium 78 Canary and Dev channels with:
- [WIP] Fugu: Exploring new openWindow options
- Unmerged, local build needed to call openWindow() with options.
Get this demo and host it locally:
$ cd /src
$ git clone https://github.com/michaelwasserman/window-placement-demo.git
$ cd window-placement-demo
$ python -m SimpleHTTPServer
Apply the WIP window placement changes, build and run:
$ cd /src/chromium/src
$ git cl patch -b wip_window_placement_api https://chromium-review.googlesource.com/c/chromium/src/+/1767282
$ autoninja -C out/Default chrome
$ out/Default/chrome --enable-blink-features=ScreenEnumeration -- "http://localhost:8000"
To simulate multiple displays with linux-chromeos builds, use --ash-host-window-bounds:
$ out/cros_Default/chrome --enable-blink-features=ScreenEnumeration --ash-host-window-bounds=1280x960,1285+0-1280x960 -- "http://localhost:8000"
Demo screen capture: linux-chromeos with two virtual displays draws a screen-space diagram and opens windows on both displays