diff --git a/shell/browser/native_browser_view.cc b/shell/browser/native_browser_view.cc index b906308bb408..b65e3a89080e 100644 --- a/shell/browser/native_browser_view.cc +++ b/shell/browser/native_browser_view.cc @@ -25,12 +25,6 @@ InspectableWebContentsView* NativeBrowserView::GetInspectableWebContentsView() { return inspectable_web_contents_->GetView(); } -content::WebContents* NativeBrowserView::GetWebContents() { - if (!inspectable_web_contents_) - return nullptr; - return inspectable_web_contents_->GetWebContents(); -} - void NativeBrowserView::WebContentsDestroyed() { inspectable_web_contents_ = nullptr; } diff --git a/shell/browser/native_browser_view.h b/shell/browser/native_browser_view.h index 8d5623a53e1c..e9ae6baa8d57 100644 --- a/shell/browser/native_browser_view.h +++ b/shell/browser/native_browser_view.h @@ -40,7 +40,6 @@ class NativeBrowserView : public content::WebContentsObserver { } InspectableWebContentsView* GetInspectableWebContentsView(); - content::WebContents* GetWebContents(); virtual void SetAutoResizeFlags(uint8_t flags) = 0; virtual void SetBounds(const gfx::Rect& bounds) = 0; diff --git a/shell/browser/native_browser_view_mac.mm b/shell/browser/native_browser_view_mac.mm index b844281f059f..ca1afa6b62ea 100644 --- a/shell/browser/native_browser_view_mac.mm +++ b/shell/browser/native_browser_view_mac.mm @@ -231,11 +231,11 @@ void NativeBrowserViewMac::SetBackgroundColor(SkColor color) { void NativeBrowserViewMac::UpdateDraggableRegions( const std::vector& 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);