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:
Marshall Greenblatt
2009-06-16 13:52:35 +00:00
parent ff7e8379fb
commit d953faf7f8
8 changed files with 74 additions and 15 deletions

View File

@@ -720,6 +720,16 @@ public:
return RV_HANDLED;
}
// Called when the browser component is requesting focus. |isWidget| will be
// true if the focus is requested for a child widget of the browser window.
// Return RV_CONTINUE to allow the focus to be set or RV_HANDLED to cancel
// setting the focus.
virtual RetVal HandleSetFocus(CefRefPtr<CefBrowser> browser,
bool isWidget)
{
return RV_CONTINUE;
}
// Retrieve the current navigation state flags
void GetNavState(bool &isLoading, bool &canGoBack, bool &canGoForward)
{