refactor: inline simple getters (#41125)
This commit is contained in:
parent
4e19321ba8
commit
ffec3127d5
17 changed files with 93 additions and 192 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue