Commit 4a8cdc58 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

macviews: fix build

3dfddc05 changed this interface but did not
update the MacViews implementation.

TBR=aleventhal@chromium.org

Bug: None
Change-Id: Ic71d4160b6ffe3b09cfcfafc9de9b175974a2054
Reviewed-on: https://chromium-review.googlesource.com/956844Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542176}
parent 14a0400e
......@@ -25,8 +25,9 @@ class ChromeWebContentsViewDelegateViewsMac
bool TakeFocus(bool reverse) override;
private:
// Used to handle focus management.
std::unique_ptr<ChromeWebContentsViewFocusHelper> focus_helper_;
content::WebContents* web_contents_;
ChromeWebContentsViewFocusHelper* GetFocusHelper() const;
DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateViewsMac);
};
......
......@@ -14,31 +14,40 @@
ChromeWebContentsViewDelegateViewsMac::ChromeWebContentsViewDelegateViewsMac(
content::WebContents* web_contents)
: ChromeWebContentsViewDelegateMac(web_contents),
focus_helper_(
std::make_unique<ChromeWebContentsViewFocusHelper>(web_contents)) {}
web_contents_(web_contents) {
ChromeWebContentsViewFocusHelper::CreateForWebContents(web_contents);
}
ChromeWebContentsViewDelegateViewsMac::
~ChromeWebContentsViewDelegateViewsMac() {
}
ChromeWebContentsViewFocusHelper*
ChromeWebContentsViewDelegateViewsMac::GetFocusHelper() const {
ChromeWebContentsViewFocusHelper* helper =
ChromeWebContentsViewFocusHelper::FromWebContents(web_contents_);
DCHECK(helper);
return helper;
}
void ChromeWebContentsViewDelegateViewsMac::StoreFocus() {
focus_helper_->StoreFocus();
GetFocusHelper()->StoreFocus();
}
bool ChromeWebContentsViewDelegateViewsMac::RestoreFocus() {
return focus_helper_->RestoreFocus();
return GetFocusHelper()->RestoreFocus();
}
void ChromeWebContentsViewDelegateViewsMac::ResetStoredFocus() {
focus_helper_->ResetStoredFocus();
GetFocusHelper()->ResetStoredFocus();
}
bool ChromeWebContentsViewDelegateViewsMac::Focus() {
return focus_helper_->Focus();
return GetFocusHelper()->Focus();
}
bool ChromeWebContentsViewDelegateViewsMac::TakeFocus(bool reverse) {
return focus_helper_->TakeFocus(reverse);
return GetFocusHelper()->TakeFocus(reverse);
}
#if BUILDFLAG(MAC_VIEWS_BROWSER)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment