Commit 6ed4fe96 authored by Marshall Greenblatt's avatar Marshall Greenblatt

views: Add groups and focus/blur callbacks (issue #2102)

- cefclient: Only make menus focusable when ALT is pressed.
- cefclient: Display sample top menu when passed the `--show-top-menu`
  command-line flag.
parent bd1b8019
......@@ -148,6 +148,18 @@ typedef struct _cef_view_t {
///
void (CEF_CALLBACK *set_id)(struct _cef_view_t* self, int id);
///
// Returns the group id of this View, or -1 if not set.
///
int (CEF_CALLBACK *get_group_id)(struct _cef_view_t* self);
///
// A group id is used to tag Views which are part of the same logical group.
// Focus can be moved between views with the same group using the arrow keys.
// The group id is immutable once it's set.
///
void (CEF_CALLBACK *set_group_id)(struct _cef_view_t* self, int group_id);
///
// Returns the View that contains this View, if any.
///
......
......@@ -105,6 +105,18 @@ typedef struct _cef_view_delegate_t {
///
void (CEF_CALLBACK *on_child_view_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view, int added, struct _cef_view_t* child);
///
// Called when |view| gains focus.
///
void (CEF_CALLBACK *on_focus)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
///
// Called when |view| loses focus.
///
void (CEF_CALLBACK *on_blur)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view);
} cef_view_delegate_t;
......
......@@ -145,6 +145,20 @@ class CefView : public CefBaseRefCounted {
/*--cef()--*/
virtual void SetID(int id) =0;
///
// Returns the group id of this View, or -1 if not set.
///
/*--cef()--*/
virtual int GetGroupID() =0;
///
// A group id is used to tag Views which are part of the same logical group.
// Focus can be moved between views with the same group using the arrow keys.
// The group id is immutable once it's set.
///
/*--cef()--*/
virtual void SetGroupID(int group_id) =0;
///
// Returns the View that contains this View, if any.
///
......
......@@ -108,6 +108,18 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
virtual void OnChildViewChanged(CefRefPtr<CefView> view,
bool added,
CefRefPtr<CefView> child) {}
///
// Called when |view| gains focus.
///
/*--cef()--*/
virtual void OnFocus(CefRefPtr<CefView> view) {}
///
// Called when |view| loses focus.
///
/*--cef()--*/
virtual void OnBlur(CefRefPtr<CefView> view) {}
};
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_
......@@ -377,6 +377,8 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter,
CefRefPtr<CefWindow> GetWindow() override;
int GetID() override;
void SetID(int id) override;
int GetGroupID() override;
void SetGroupID(int group_id) override;
CefRefPtr<CefView> GetParentView() override;
CefRefPtr<CefView> GetViewForID(int id) override;
void SetBounds(const CefRect& bounds) override;
......@@ -507,6 +509,19 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetID(int id) {
root_view()->set_id(id);
}
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetGroupID() {
CEF_REQUIRE_VALID_RETURN(0);
return root_view()->GetGroup();
}
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetGroupID(int group_id) {
CEF_REQUIRE_VALID_RETURN_VOID();
if (root_view()->GetGroup() != -1)
return;
root_view()->SetGroup(group_id);
}
CEF_VIEW_IMPL_T CefRefPtr<CefView> CEF_VIEW_IMPL_D::GetParentView() {
CEF_REQUIRE_VALID_RETURN(nullptr);
views::View* view = root_view()->parent();
......
......@@ -72,6 +72,8 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass {
void Layout() override;
void ViewHierarchyChanged(
const views::View::ViewHierarchyChangedDetails& details) override;
void OnFocus() override;
void OnBlur() override;
// Return true if this View is expected to have a minimum size (for example,
// a button where the minimum size is based on the label).
......@@ -162,6 +164,18 @@ CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::ViewHierarchyChanged(
ParentClass::ViewHierarchyChanged(details);
}
CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::OnFocus() {
if (cef_delegate())
cef_delegate()->OnFocus(GetCefView());
ParentClass::OnFocus();
}
CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::OnBlur() {
if (cef_delegate())
cef_delegate()->OnBlur(GetCefView());
ParentClass::OnBlur();
}
CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::NotifyChildViewChanged(
const views::View::ViewHierarchyChangedDetails& details) {
if (!cef_delegate())
......
......@@ -326,6 +326,35 @@ void CEF_CALLBACK browser_view_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK browser_view_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK browser_view_set_group_id(struct _cef_view_t* self,
int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK browser_view_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -933,6 +962,8 @@ CefBrowserViewCppToC::CefBrowserViewCppToC() {
GetStruct()->base.get_window = browser_view_get_window;
GetStruct()->base.get_id = browser_view_get_id;
GetStruct()->base.set_id = browser_view_set_id;
GetStruct()->base.get_group_id = browser_view_get_group_id;
GetStruct()->base.set_group_id = browser_view_set_group_id;
GetStruct()->base.get_parent_view = browser_view_get_parent_view;
GetStruct()->base.get_view_for_id = browser_view_get_view_for_id;
GetStruct()->base.set_bounds = browser_view_set_bounds;
......
......@@ -270,6 +270,42 @@ void CEF_CALLBACK browser_view_delegate_on_child_view_changed(
CefViewCToCpp::Wrap(child));
}
void CEF_CALLBACK browser_view_delegate_on_focus(
struct _cef_view_delegate_t* self, cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefBrowserViewDelegateCppToC::Get(
reinterpret_cast<cef_browser_view_delegate_t*>(self))->OnFocus(
CefViewCToCpp::Wrap(view));
}
void CEF_CALLBACK browser_view_delegate_on_blur(
struct _cef_view_delegate_t* self, cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefBrowserViewDelegateCppToC::Get(
reinterpret_cast<cef_browser_view_delegate_t*>(self))->OnBlur(
CefViewCToCpp::Wrap(view));
}
} // namespace
......@@ -293,6 +329,8 @@ CefBrowserViewDelegateCppToC::CefBrowserViewDelegateCppToC() {
browser_view_delegate_on_parent_view_changed;
GetStruct()->base.on_child_view_changed =
browser_view_delegate_on_child_view_changed;
GetStruct()->base.on_focus = browser_view_delegate_on_focus;
GetStruct()->base.on_blur = browser_view_delegate_on_blur;
}
template<> CefRefPtr<CefBrowserViewDelegate> CefCppToCRefCounted<CefBrowserViewDelegateCppToC,
......
......@@ -322,6 +322,33 @@ void CEF_CALLBACK button_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK button_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK button_set_group_id(struct _cef_view_t* self, int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK button_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -916,6 +943,8 @@ CefButtonCppToC::CefButtonCppToC() {
GetStruct()->base.get_window = button_get_window;
GetStruct()->base.get_id = button_get_id;
GetStruct()->base.set_id = button_set_id;
GetStruct()->base.get_group_id = button_get_group_id;
GetStruct()->base.set_group_id = button_set_group_id;
GetStruct()->base.get_parent_view = button_get_parent_view;
GetStruct()->base.get_view_for_id = button_get_view_for_id;
GetStruct()->base.set_bounds = button_set_bounds;
......
......@@ -172,6 +172,42 @@ void CEF_CALLBACK button_delegate_on_child_view_changed(
CefViewCToCpp::Wrap(child));
}
void CEF_CALLBACK button_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(
self))->OnFocus(
CefViewCToCpp::Wrap(view));
}
void CEF_CALLBACK button_delegate_on_blur(struct _cef_view_delegate_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(
self))->OnBlur(
CefViewCToCpp::Wrap(view));
}
} // namespace
......@@ -187,6 +223,8 @@ CefButtonDelegateCppToC::CefButtonDelegateCppToC() {
button_delegate_on_parent_view_changed;
GetStruct()->base.on_child_view_changed =
button_delegate_on_child_view_changed;
GetStruct()->base.on_focus = button_delegate_on_focus;
GetStruct()->base.on_blur = button_delegate_on_blur;
}
template<> CefRefPtr<CefButtonDelegate> CefCppToCRefCounted<CefButtonDelegateCppToC,
......
......@@ -531,6 +531,35 @@ void CEF_CALLBACK label_button_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK label_button_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefLabelButtonCppToC::Get(reinterpret_cast<cef_label_button_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK label_button_set_group_id(struct _cef_view_t* self,
int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefLabelButtonCppToC::Get(reinterpret_cast<cef_label_button_t*>(
self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK label_button_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -1152,6 +1181,8 @@ CefLabelButtonCppToC::CefLabelButtonCppToC() {
GetStruct()->base.base.get_window = label_button_get_window;
GetStruct()->base.base.get_id = label_button_get_id;
GetStruct()->base.base.set_id = label_button_set_id;
GetStruct()->base.base.get_group_id = label_button_get_group_id;
GetStruct()->base.base.set_group_id = label_button_set_group_id;
GetStruct()->base.base.get_parent_view = label_button_get_parent_view;
GetStruct()->base.base.get_view_for_id = label_button_get_view_for_id;
GetStruct()->base.base.set_bounds = label_button_set_bounds;
......
......@@ -569,6 +569,35 @@ void CEF_CALLBACK menu_button_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK menu_button_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefMenuButtonCppToC::Get(reinterpret_cast<cef_menu_button_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK menu_button_set_group_id(struct _cef_view_t* self,
int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefMenuButtonCppToC::Get(reinterpret_cast<cef_menu_button_t*>(
self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK menu_button_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -1189,6 +1218,8 @@ CefMenuButtonCppToC::CefMenuButtonCppToC() {
GetStruct()->base.base.base.get_window = menu_button_get_window;
GetStruct()->base.base.base.get_id = menu_button_get_id;
GetStruct()->base.base.base.set_id = menu_button_set_id;
GetStruct()->base.base.base.get_group_id = menu_button_get_group_id;
GetStruct()->base.base.base.set_group_id = menu_button_set_group_id;
GetStruct()->base.base.base.get_parent_view = menu_button_get_parent_view;
GetStruct()->base.base.base.get_view_for_id = menu_button_get_view_for_id;
GetStruct()->base.base.base.set_bounds = menu_button_set_bounds;
......
......@@ -199,6 +199,42 @@ void CEF_CALLBACK menu_button_delegate_on_child_view_changed(
CefViewCToCpp::Wrap(child));
}
void CEF_CALLBACK menu_button_delegate_on_focus(
struct _cef_view_delegate_t* self, cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefMenuButtonDelegateCppToC::Get(
reinterpret_cast<cef_menu_button_delegate_t*>(self))->OnFocus(
CefViewCToCpp::Wrap(view));
}
void CEF_CALLBACK menu_button_delegate_on_blur(
struct _cef_view_delegate_t* self, cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefMenuButtonDelegateCppToC::Get(
reinterpret_cast<cef_menu_button_delegate_t*>(self))->OnBlur(
CefViewCToCpp::Wrap(view));
}
} // namespace
......@@ -220,6 +256,8 @@ CefMenuButtonDelegateCppToC::CefMenuButtonDelegateCppToC() {
menu_button_delegate_on_parent_view_changed;
GetStruct()->base.base.on_child_view_changed =
menu_button_delegate_on_child_view_changed;
GetStruct()->base.base.on_focus = menu_button_delegate_on_focus;
GetStruct()->base.base.on_blur = menu_button_delegate_on_blur;
}
template<> CefRefPtr<CefMenuButtonDelegate> CefCppToCRefCounted<CefMenuButtonDelegateCppToC,
......
......@@ -462,6 +462,33 @@ void CEF_CALLBACK panel_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK panel_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK panel_set_group_id(struct _cef_view_t* self, int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK panel_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -1060,6 +1087,8 @@ CefPanelCppToC::CefPanelCppToC() {
GetStruct()->base.get_window = panel_get_window;
GetStruct()->base.get_id = panel_get_id;
GetStruct()->base.set_id = panel_set_id;
GetStruct()->base.get_group_id = panel_get_group_id;
GetStruct()->base.set_group_id = panel_set_group_id;
GetStruct()->base.get_parent_view = panel_get_parent_view;
GetStruct()->base.get_view_for_id = panel_get_view_for_id;
GetStruct()->base.set_bounds = panel_set_bounds;
......
......@@ -154,6 +154,42 @@ void CEF_CALLBACK panel_delegate_on_child_view_changed(
CefViewCToCpp::Wrap(child));
}
void CEF_CALLBACK panel_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(
self))->OnFocus(
CefViewCToCpp::Wrap(view));
}
void CEF_CALLBACK panel_delegate_on_blur(struct _cef_view_delegate_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(
self))->OnBlur(
CefViewCToCpp::Wrap(view));
}
} // namespace
......@@ -168,6 +204,8 @@ CefPanelDelegateCppToC::CefPanelDelegateCppToC() {
panel_delegate_on_parent_view_changed;
GetStruct()->base.on_child_view_changed =
panel_delegate_on_child_view_changed;
GetStruct()->base.on_focus = panel_delegate_on_focus;
GetStruct()->base.on_blur = panel_delegate_on_blur;
}
template<> CefRefPtr<CefPanelDelegate> CefCppToCRefCounted<CefPanelDelegateCppToC,
......
......@@ -369,6 +369,35 @@ void CEF_CALLBACK scroll_view_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK scroll_view_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefScrollViewCppToC::Get(reinterpret_cast<cef_scroll_view_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK scroll_view_set_group_id(struct _cef_view_t* self,
int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefScrollViewCppToC::Get(reinterpret_cast<cef_scroll_view_t*>(
self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK scroll_view_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -979,6 +1008,8 @@ CefScrollViewCppToC::CefScrollViewCppToC() {
GetStruct()->base.get_window = scroll_view_get_window;
GetStruct()->base.get_id = scroll_view_get_id;
GetStruct()->base.set_id = scroll_view_set_id;
GetStruct()->base.get_group_id = scroll_view_get_group_id;
GetStruct()->base.set_group_id = scroll_view_set_group_id;
GetStruct()->base.get_parent_view = scroll_view_get_parent_view;
GetStruct()->base.get_view_for_id = scroll_view_get_view_for_id;
GetStruct()->base.set_bounds = scroll_view_set_bounds;
......
......@@ -732,6 +732,34 @@ void CEF_CALLBACK textfield_set_id(struct _cef_view_t* self, int id) {
id);
}
int CEF_CALLBACK textfield_get_group_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefTextfieldCppToC::Get(reinterpret_cast<cef_textfield_t*>(
self))->GetGroupID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK textfield_set_group_id(struct _cef_view_t* self,
int group_id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefTextfieldCppToC::Get(reinterpret_cast<cef_textfield_t*>(self))->SetGroupID(
group_id);
}
struct _cef_view_t* CEF_CALLBACK textfield_get_parent_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
......@@ -1361,6 +1389,8 @@ CefTextfieldCppToC::CefTextfieldCppToC() {
GetStruct()->base.get_window = textfield_get_window;
GetStruct()->base.get_id = textfield_get_id;
GetStruct()->base.set_id = textfield_set_id;
GetStruct()->base.get_group_id = textfield_get_group_id;
GetStruct()->base.set_group_id = textfield_set_group_id;
GetStruct()->base.get_parent_view = textfield_get_parent_view;
GetStruct()->base.get_view_for_id = textfield_get_view_for_id;
GetStruct()->base.set_bounds = textfield_set_bounds;
......
......@@ -202,6 +202,42 @@ void CEF_CALLBACK textfield_delegate_on_child_view_changed(
CefViewCToCpp::Wrap(child));
}
void CEF_CALLBACK textfield_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Execute
CefTextfieldDelegateCppToC::Get(reinterpret_cast<cef_textfield_delegate_t*>(
self))->OnFocus(
CefViewCToCpp::Wrap(view));
}
void CEF_CALLBACK textfield_delegate_on_blur(struct _cef_view_delegate_t* self,
cef_view_t* view) {