#include "ui/base/cursor/cursor_factory.h"
#include <ostream>
#include "base/check.h"
#include "base/check_op.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
#include "ui/base/cursor/platform_cursor.h"
namespace ui {
namespace {
CursorFactory* g_instance = …;
}
CursorFactoryObserver::~CursorFactoryObserver() = default;
CursorFactory::CursorFactory() { … }
CursorFactory::~CursorFactory() { … }
CursorFactory* CursorFactory::GetInstance() { … }
void CursorFactory::AddObserver(CursorFactoryObserver* observer) { … }
void CursorFactory::RemoveObserver(CursorFactoryObserver* observer) { … }
void CursorFactory::NotifyObserversOnThemeLoaded() { … }
scoped_refptr<PlatformCursor> CursorFactory::GetDefaultCursor(
mojom::CursorType type) { … }
scoped_refptr<PlatformCursor> CursorFactory::GetDefaultCursor(
mojom::CursorType type,
float scale) { … }
scoped_refptr<PlatformCursor> CursorFactory::CreateImageCursor(
mojom::CursorType type,
const SkBitmap& bitmap,
const gfx::Point& hotspot,
float scale) { … }
std::optional<CursorData> CursorFactory::GetCursorData(mojom::CursorType type) { … }
scoped_refptr<PlatformCursor> CursorFactory::CreateAnimatedCursor(
mojom::CursorType type,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& hotspot,
float scale,
base::TimeDelta frame_delay) { … }
void CursorFactory::ObserveThemeChanges() { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
std::vector<std::string> CursorNamesFromType(mojom::CursorType type) { … }
#endif
}