mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add a CefHandler::HandleSetFocus() callback that gets called when the browser control or a child widget requests focus. This callback gives the client an opportunity to cancel the focus change. (Issue #34, initial patch by tux316).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@29 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -317,7 +317,7 @@ CefHandler::RetVal CefHandlerCToCpp::HandleTakeFocus(
|
||||
reverse);
|
||||
}
|
||||
|
||||
CefHandler::RetVal CefHandlerCToCpp::HandleJSBinding(
|
||||
CefHandler::RetVal CefHandlerCToCpp::HandleJSBinding(
|
||||
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Value> object)
|
||||
{
|
||||
@@ -328,6 +328,16 @@ CefHandler::RetVal CefHandlerCToCpp::HandleJSBinding(
|
||||
CefFrameCppToC::Wrap(frame), CefV8ValueCppToC::Wrap(object));
|
||||
}
|
||||
|
||||
CefHandler::RetVal CefHandlerCToCpp::HandleSetFocus(
|
||||
CefRefPtr<CefBrowser> browser, bool isWidget)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, handle_set_focus))
|
||||
return RV_CONTINUE;
|
||||
|
||||
return struct_->handle_set_focus(struct_, CefBrowserCppToC::Wrap(browser),
|
||||
isWidget);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
long CefCToCpp<CefHandlerCToCpp, CefHandler, cef_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user