views: Add support for accelerators (issue #2102)

This commit is contained in:
Marshall Greenblatt
2017-02-16 18:19:43 -05:00
parent e4867b5afb
commit bd1b80198f
35 changed files with 948 additions and 74 deletions

View File

@ -35,6 +35,7 @@ CEF_BUTTON_IMPL_T class CefButtonImpl : public CEF_VIEW_IMPL_D {
// CefView methods:
CefRefPtr<CefButton> AsButton() override { return this; }
void SetFocusable(bool focusable) override;
protected:
// Create a new implementation object.
@ -68,4 +69,11 @@ CEF_BUTTON_IMPL_T void CEF_BUTTON_IMPL_D::SetAccessibleName(
ParentClass::root_view()->SetAccessibleName(name);
}
CEF_BUTTON_IMPL_T void CEF_BUTTON_IMPL_D::SetFocusable(
bool focusable) {
CEF_REQUIRE_VALID_RETURN_VOID();
ParentClass::root_view()->set_request_focus_on_press(focusable);
ParentClass::SetFocusable(focusable);
}
#endif // CEF_LIBCEF_BROWSER_VIEWS_BUTTON_IMPL_H_