feat: add getBounds() method for BrowserView (#19370)

* implement getBounds on mac

* add Linux/Win impl

* add test

* add docs
This commit is contained in:
Micha Hanselmann 2019-07-29 19:43:05 -07:00 committed by Shelley Vohr
parent c06007175f
commit 42a483ad27
9 changed files with 39 additions and 0 deletions

View file

@ -97,6 +97,10 @@ void NativeBrowserViewViews::SetBounds(const gfx::Rect& bounds) {
ResetAutoResizeProportions();
}
gfx::Rect NativeBrowserViewViews::GetBounds() {
return GetInspectableWebContentsView()->GetView()->bounds();
}
void NativeBrowserViewViews::SetBackgroundColor(SkColor color) {
auto* view = GetInspectableWebContentsView()->GetView();
view->SetBackground(views::CreateSolidBackground(color));