refactor: remove native_browser_view web contents get function (#25526)

This commit is contained in:
Michaela Laurencin 2020-09-21 10:39:58 -07:00 committed by GitHub
parent a80c35d161
commit ea76788b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 11 deletions

View file

@ -231,11 +231,11 @@ void NativeBrowserViewMac::SetBackgroundColor(SkColor color) {
void NativeBrowserViewMac::UpdateDraggableRegions(
const std::vector<gfx::Rect>& drag_exclude_rects) {
auto* iwc_view = GetInspectableWebContentsView();
auto* web_contents = GetWebContents();
if (!(iwc_view && web_contents))
if (!inspectable_web_contents_)
return;
NSView* web_view = GetWebContents()->GetNativeView().GetNativeNSView();
auto* web_contents = inspectable_web_contents_->GetWebContents();
auto* iwc_view = GetInspectableWebContentsView();
NSView* web_view = web_contents->GetNativeView().GetNativeNSView();
NSView* inspectable_view = iwc_view->GetNativeView().GetNativeNSView();
NSView* window_content_view = inspectable_view.superview;
const auto window_content_view_height = NSHeight(window_content_view.bounds);