mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
win/linux: Use CursorLoader for loading cursor resources (see issue #3270)
Switch to using aura::CursorLoader which knows how to load system, non-system and pak cursor resources. On Windows, cursors will be loaded via LoadCursor first if available with a fallback to pak file if necessary (like with component builds). On Linux, all non-system cursor resources will be loaded from pak file. Cursors may be loaded asynchronously resulting in the default (pointer) cursor being returned on the first request.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "libcef/browser/native/cursor_util.h"
|
||||
|
||||
#include "ui/base/cursor/cursor_factory.h"
|
||||
#include "ui/ozone/buildflags.h"
|
||||
|
||||
#if BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
@@ -15,14 +14,6 @@
|
||||
|
||||
namespace cursor_util {
|
||||
|
||||
cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
|
||||
auto cursor = ui::CursorFactory::GetInstance()->GetDefaultCursor(type);
|
||||
if (cursor) {
|
||||
return ToCursorHandle(cursor);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor) {
|
||||
#if BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
// See https://crbug.com/1029142 for background.
|
||||
|
Reference in New Issue
Block a user