Use direct member for CefBrowserHostBase::contents_delegate_

There's no reason to use unique_ptr here as the lifespan of
|contents_delegate_| exactly matches CefBrowserHostBase.
This commit is contained in:
Marshall Greenblatt
2024-07-18 13:50:37 -04:00
parent d470cf8204
commit 3acdbac061
5 changed files with 34 additions and 37 deletions

View File

@ -148,7 +148,7 @@ void ChromeBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
return;
}
if (contents_delegate_->OnSetFocus(source)) {
if (contents_delegate_.OnSetFocus(source)) {
return;
}
@ -470,7 +470,7 @@ void ChromeBrowserHostImpl::Attach(content::WebContents* web_contents,
platform_delegate_->WebContentsCreated(web_contents,
/*own_web_contents=*/false);
contents_delegate_->ObserveWebContents(web_contents);
contents_delegate_.ObserveWebContents(web_contents);
// Associate the platform delegate with this browser.
platform_delegate_->BrowserCreated(this);