refactor: remove native_browser_view web contents get function (#25526)
This commit is contained in:
parent
a80c35d161
commit
ea76788b67
3 changed files with 4 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue