Add OSR text selection changed handler and remove hard-coded test bounds (issue #2383)

This commit is contained in:
Mike Wiedenbauer
2018-04-09 13:48:23 -04:00
committed by Marshall Greenblatt
parent b220672c42
commit c3f5e6463c
9 changed files with 294 additions and 111 deletions

View File

@ -204,6 +204,16 @@ class CefRenderHandler : public virtual CefBaseRefCounted {
virtual void OnImeCompositionRangeChanged(CefRefPtr<CefBrowser> browser,
const CefRange& selected_range,
const RectList& character_bounds) {}
///
// Called when text selection has changed for the specified |browser|.
// |selected_text| is the currently selected text and |selected_range| is
// the character range.
///
/*--cef(optional_param=selected_text,optional_param=selected_range)--*/
virtual void OnTextSelectionChanged(CefRefPtr<CefBrowser> browser,
const CefString& selected_text,
const CefRange& selected_range) {}
};
#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_