refactor: inline simple getters (#41125)

This commit is contained in:
Charles Kerr 2024-01-29 20:43:28 -06:00 committed by GitHub
parent 4e19321ba8
commit ffec3127d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 93 additions and 192 deletions

View file

@ -139,7 +139,7 @@ OffScreenWebContentsView::CreateViewForChildWidget(
: web_contents_impl->GetRenderWidgetHostView());
return new OffScreenRenderWidgetHostView(transparent_, painting_,
view->GetFrameRate(), callback_,
view->frame_rate(), callback_,
render_widget_host, view, GetSize());
}
@ -191,12 +191,9 @@ void OffScreenWebContentsView::SetPainting(bool painting) {
}
bool OffScreenWebContentsView::IsPainting() const {
auto* view = GetView();
if (view != nullptr) {
return view->IsPainting();
} else {
return painting_;
}
if (auto* view = GetView())
return view->is_painting();
return painting_;
}
void OffScreenWebContentsView::SetFrameRate(int frame_rate) {
@ -208,12 +205,9 @@ void OffScreenWebContentsView::SetFrameRate(int frame_rate) {
}
int OffScreenWebContentsView::GetFrameRate() const {
auto* view = GetView();
if (view != nullptr) {
return view->GetFrameRate();
} else {
return frame_rate_;
}
if (auto* view = GetView())
return view->frame_rate();
return frame_rate_;
}
OffScreenRenderWidgetHostView* OffScreenWebContentsView::GetView() const {