There's a utility function in chrome/browser/ui/web_contents_sizer.* that directly manipulates the native views on Aura/Mac/Android. Instead, this should be encapsulated in the WebContents.
There was one prior attempt to do this (https://codereview.chromium.org/2695093005/). However, that attempt broke some tests. This revealed that some callers of ResizeWebContents() are doing so *before* the main frame's RenderWidgetHostView is created. It was also not possible to fix this by having them provide an initial size in WebContents::CreateParams::initial_size because all of the desktop platform impls ignore this field (!).
Therefore, we need a solution where the size of the WebContents can be set by the embedder, and possibly before the main frame's RWHV is even created; and it needs to guarantee the RWHV is set to that size either immediately or upon creation.
Comment 1 by sheriffbot@chromium.org
, Feb 21 2018Status: Untriaged (was: Available)