On Mon, Aug 22, 2022 at 11:44 PM Zoltan Kuscsik <zol...@s57.io> wrote:Hi Brad,
we don't know each other, but I hope you don't mind this mail. My team is working on enabling Multi-Window placement for Android WebView. This work is done under the umbrella of Poly working with Google, to build a solution of running Google Meet on a dual-display Android conferencing system.
We are making some good progress and I would like to make sure that we go in a direction that would allow us to upstream the solution into Chromium/WebView. Specifically, when it comes to WebView there are couple of degrees of freedom how this could integrate with the Android context.
Do you know if anyone in the Chromium/WebView team is looking into Android support? If yes, I would like to make sure that our work can aligns to that direction and we can make a meaningful contribution.
Thanks,
//Zoltan
Zoltan Kuscsik
CEO, SW EngineerSolution57 ApS
Strømmen 6, 9400 Nørresundby, Denmark
DK mobile: +45 26 127 372US mobile: +1 (669) 224 9114
The contents of this e-mail and its attachments are addressed to theare addressed to theintended recipient only, and are confidential and may contain legallyprivileged information. If you are not the intended recipient, pleasenotify the sender by replying to this e-mail and delete the message fromyour system.
+ @Deprecated
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback);
+ public void onShowCustomView(PopupView view, WebChromeClient.CustomViewCallback callback);
Hey Peter
The displayId comes via DisplayAndroidManagerJni.get().updateDisplay when updateDisplayOnNativeSide is called. Then on native side in DisplayAndroidManager::UpdateDisplay the Display is created/updated using the sdkDisplayId int, which we get from DisplayAndroidManagerJni.get().updateDisplay. So the ID in native code is the same as we get from a particular Display object from the DisplayManager.
We have modified DisplayAndroidManager so we add all physical displays during initialization. Likewise we have modified DisplayAndroidManagerJni.get().updateDisplay so we can specify the x,y position in the virtual screen arrangement for the screen/display. For now we have hardcoded all displays to be horizontal aligned adjacent to each other with primary display being leftmost at (0,0). This is also done in DisplayAndroidManager for now.
I am off until next Monday.
Cheers,
Michael Storgaard
Senior SW Engineer
URL: https://s57.io
Phone: +45 41 6000 43
The contents of this e-mail and its attachments are addressed to the intended recipient only,
and are confidential and may contain legally privileged information. If you are not the intended
recipient, please notify the sender by replying to this e-mail and delete the message from your system.
From: Peter Conn <pec...@google.com>
Date: Monday, 17 October 2022 at 18.04
To: Michael Storgaard <mic...@s57.io>
Cc: Mike Wasserman <m...@chromium.org>, Zoltan Kuscsik <zol...@s57.io>, Ben Morss <mo...@google.com>, btr...@chromium.org <btr...@chromium.org>, fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement
Hey Michael,
Thanks for the dock, we'll give it a thorough read this week.
A quick question though - the APIs refer to screenId, an int that works with Android's DeviceManager. How does the web contents learn of these? I'm assuming not through some standard web API?
Thanks,
Peter C
On Fri, 14 Oct 2022 at 15:18, Michael Storgaard <mic...@s57.io> wrote:
Hi Mike and Peter
Attached is our initial proposal for the API extenstion required to WebChromeClient to enable multi-screen window placement; in particular for fullscreen requests and window placement.
In the document there is also a link to a demo-video showing the current state of our work using the suggested proposal.
We welcome your feedback.
Best regards
Michael Storgaard
Senior SW Engineer
URL: https://s57.io
Phone: +45 41 6000 43
The contents of this e-mail and its attachments are addressed to the intended recipient only,
if (!('getScreenDetails' in self) || !('isExtended' in screen) || !('onchange' in screen)) { ... }
Hey,I had a chat with some others about the changes to WebChromeClient and everything seems very sensible.The one query is whether we care about feature detection - will the web page need to detect whether this is supported? If so, the current solution doesn't provide that, and doing sointroduces more complexity.Peter COn Tue, 18 Oct 2022 at 19:30, Michael Storgaard <mic...@s57.io> wrote:Thanks for the feedback. We will go through your document and Using cross-screen coordinates or per-screen coordinates. The actual implementation of virtual screen arrangement is something that we need to look further into; in particular the complex corner cases and what API extensions are needed for defining the screen arrangement from the Android app. We welcome your thoughts on this. As it is for now, the coordinate provided in WindowManager.RelativeLayout is the multi-screen origin coordinate for a certain window. It should be relative to the target display top-left corner as you also point out. Our suggestion is that the associated translation (and virtual screen configuration/management for android webview) should be done within the realm of DisplayAndroidManager using a new dedicated class for this. In the current version of our Android demo app, we are only relying on the screen ID provided via onCreateWindow in the proposed API. This is used for presenting the new window as a full screen child view in the activity on the target display.
BR Michael
Fra: Mike Wasserman <m...@chromium.org>
Sendt: tirsdag, oktober 18, 2022 12:38 AM
Til: Michael Storgaard <mic...@s57.io>
Cc: Peter Conn <pec...@google.com>; Zoltan Kuscsik <zol...@s57.io>; Ben Morss <mo...@google.com>; btr...@chromium.org <btr...@chromium.org>; fugu-dev <fugu...@chromium.org>
Emne: Re: Multi-window placement
Sorry for the very late we reply, we have internally been busy with some (non-related) releases and had to revisit the proposed approach for permission management as well. Using android.permission.WINDOW_PLACEMENT was a wrong as you also point out, since this relates to Android itself.
However, we suggest to use onPermissionRequest delegate method on WebChromeClient for letting the host app controlling window placement permission, which seems to be aimed for this kind of purpose. In conjunction with this, we propose extending the list of PermissionRequest resources with RESOURCE_WINDOW_PLACEMENT (android.webkit.resource.WINDOW_PLACEMENT) for window placement.
From a high-level implementation perspective, we will do this by extending AwPermissionManager for window-placement according to the same principles / patterns used for protected media identifier permission, MIDI/Sysex messages and geolocation.
We have an implementation using this approach that partially woks now. See video here for grant and deny:
However, the are some issues with ensuring having the correct permission state in the permission result cache. We are currently looking into this.
BR Michael
From: Peter Conn <pec...@google.com>
Date: Tuesday, 25 October 2022 at 09.54
To: Michael Storgaard <mic...@s57.io>
Cc: Mike Wasserman <m...@chromium.org>, Zoltan Kuscsik <zol...@s57.io>, Ben Morss <mo...@google.com>, Brad Triebwasser <btr...@chromium.org>, fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement
I think that's a good suggestion - but I'd like to see this part of the design explicitly called out.
Is WebView going to be responsible for checking what permissions the embedding app has?
Could you expand more on the WINDOW_PLACEMENT permission, it looks like it's a Chrome thing, not an Android thing. How will the user grant it?
On Mon, 24 Oct 2022, 14:11 Michael Storgaard, <mic...@s57.io> wrote:
Shouldn't this be controlled via the permission API only? If the manifest includes the permission declaration for android.permission.WINDOW_PLACEMENT and permission is granted, then the assumption is that the embedder will override these methods. However, in case permission is granted but the embedder has not implemented these delegate methods, then behavior will be as it is today when issuing window.open or fullscreen request; i.e. nothing happens.
BR Michael
From: Peter Conn <pec...@google.com>
Date: Monday, 24 October 2022 at 12.06
To: Mike Wasserman <m...@chromium.org>
Cc: Michael Storgaard <mic...@s57.io>, Zoltan Kuscsik <zol...@s57.io>, Ben Morss <mo...@google.com>, btr...@chromium.org <btr...@chromium.org>, fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement
The problem with the standard JS feature detection is that it will detect whether the browser currently supports that API - but in this case we need to know whether the embedder supports multi-window placement. In other words, has the embedder overridden the methods that we're talking about adding?
Yes, we have noticed that there was some ongoing renaming related to this and will follow the new naming convention and rename it to android.permission.WINDOW_MANAGEMENT. Thanks for links and for pointing this out
Adding Todd Page from HP/Poly PM to the mail thread.
Michael Storgaard
Senior SW Engineer
URL: https://s57.io
Phone: +45 41 6000 43
The contents of this e-mail and its attachments are addressed to the intended recipient only,
and are confidential and may contain legally privileged information. If you are not the intended
recipient, please notify the sender by replying to this e-mail and delete the message from your system.
From: Zoltan Kuscsik <zol...@s57.io>
Date: Monday, 12 June 2023 at 16.43
To: Ben Morss <mo...@google.com>, Michael Storgaard <mic...@s57.io>
Cc: Mike Wasserman <m...@chromium.org>, Peter Conn <pec...@google.com>, Brad Triebwasser <btr...@chromium.org>, fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement
Hi Ben,
we have prepared the patches for upstreaming, and we are waiting for the feedback from Poly/HP for a green light on releasing the code.
We have made the changes of WebView SDK extension based on the spec. Our test target is the AOSP master emulator x86 + x86 WebView.
In addition, we also have the updated Android SDK working with Chromium. Michael is fixing some regression of the patch set to latest chromium main.
//Zoltan
From: Ben Morss <mo...@google.com>
Sent: Monday, June 12, 2023 4:32 PM
To: Michael Storgaard <mic...@s57.io>
Cc: Mike Wasserman <m...@chromium.org>; Peter Conn <pec...@google.com>; Zoltan Kuscsik <zol...@s57.io>; Brad Triebwasser <btr...@chromium.org>; fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement
Hi all,
Hi Ben,
we started the upstreaming process. The AOSP specific changes:
Working through the corresponding WebView changes.
Br,
//Zoltan
To: Michael Storgaard <mic...@s57.io>
Cc: Mike Wasserman <m...@chromium.org>; Peter Conn <pec...@google.com>; Zoltan Kuscsik <zol...@s57.io>; Brad Triebwasser <btr...@chromium.org>; fugu-dev <fugu...@chromium.org>
Subject: Re: Multi-window placement