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

@@ -432,11 +432,19 @@ typedef struct _cef_handler_t
enum cef_retval_t (CEF_CALLBACK *handle_take_focus)(
struct _cef_handler_t* handler, cef_browser_t* browser, int reverse);
// Event called for adding values to a frame's JavaScript 'window' object. The
// Event called for adding values to a frame's JavaScript 'window' object. The
// return value is currently ignored.
enum cef_retval_t (CEF_CALLBACK *handle_jsbinding)(
struct _cef_handler_t* handler, cef_browser_t* browser,
cef_frame_t* frame, struct _cef_v8value_t* object);
// Called when the browser component is requesting focus. |isWidget| will be
// true (1) 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.
enum cef_retval_t (CEF_CALLBACK *handle_set_focus)(
struct _cef_handler_t* handler, cef_browser_t* browser, int isWidget);
} cef_handler_t;