Move OnCursorChange from CefRenderHandler to CefDisplayHandler

The cursor change can now be handled by the client with both windowed and
off-screen rendering.

Returning true from OnCursorChange will disable the default cursor change
behavior. This is functionally equivalent to the
CefBrowserHost::SetMouseCursorChangeDisabled method, so that method has been
removed.
This commit is contained in:
Marshall Greenblatt
2020-10-28 12:30:54 -04:00
parent 4e6c558bf2
commit 023d218104
38 changed files with 282 additions and 354 deletions

View File

@@ -135,6 +135,19 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual void OnLoadingProgressChange(CefRefPtr<CefBrowser> browser,
double progress) {}
///
// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
// |custom_cursor_info| will be populated with the custom cursor information.
// Return true if the cursor change was handled or false for default handling.
///
/*--cef()--*/
virtual bool OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor,
cef_cursor_type_t type,
const CefCursorInfo& custom_cursor_info) {
return false;
}
};
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_