MacViews: Lazily enable using a single ui::Compositor
It is not possible to know ahead of time whether or not a WebContentsView will be embedded in an NSView or a views::View, even when MacViewsBrowser is enabled (content_shell, for instance, uses the NSView display path). Lazily determine if a WebContentsView is to display via its parent views::View's compositor. When attaching to a views::View for the first time, clear all content that is being displayed in the NSView (because it will occlude the views::View) and disable displaying through Cocoa for the lifetime of the WebContentsView. When all code that expects to display through Cocoa is updated or deleted, this lazy determination may be removed. Bug: 840173 Change-Id: I36c7054ba7c71e6fe94e496e677a9a9be4fb790a Reviewed-on: https://chromium-review.googlesource.com/1075563Reviewed-by:Sidney San Martín <sdy@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#563008}
Showing
Please register or sign in to comment