1 // Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_ 6 #define CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_ 7 8 #include "include/internal/cef_types.h" 9 10 #include "ui/base/cursor/cursor.h" 11 #include "ui/base/cursor/mojom/cursor_type.mojom-forward.h" 12 13 #if defined(USE_AURA) 14 #include "ui/base/cursor/platform_cursor.h" 15 #endif 16 17 class CefBrowserHostBase; 18 19 namespace cursor_util { 20 21 #if defined(USE_AURA) 22 cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type); 23 cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor); 24 #endif // defined(USE_AURA) 25 26 // Returns true if the client handled the cursor change. 27 bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor); 28 29 } // namespace cursor_util 30 31 #endif // CEF_LIBCEF_BROWSER_NATIVE_CURSOR_UTIL_H_ 32