Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: ui/ozone/public/cursor_factory_ozone.h

Issue 543823002: ozone: Plumb animated cursors from CursorLoaderOzone to CursorFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/ozone/public/cursor_factory_ozone.h
diff --git a/ui/ozone/public/cursor_factory_ozone.h b/ui/ozone/public/cursor_factory_ozone.h
index 6809b99c3fadadd1311063bb76484305904fa832..4950a3186ee6fd7911dc7024b8123f8ab5ca73df 100644
--- a/ui/ozone/public/cursor_factory_ozone.h
+++ b/ui/ozone/public/cursor_factory_ozone.h
@@ -5,6 +5,8 @@
#ifndef UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_
#define UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_
+#include <vector>
+
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/ozone_base_export.h"
@@ -35,6 +37,15 @@ class OZONE_BASE_EXPORT CursorFactoryOzone {
virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
const gfx::Point& hotspot);
+ // Return a animated cursor from the specified image & hotspot. Animated
+ // cursors are referenced counted and have an initial refcount of 1.
+ // Therefore, each CreateAnimatedCursor call must be matched with a call to
+ // UnrefImageCursor.
+ virtual PlatformCursor CreateAnimatedCursor(
+ const std::vector<SkBitmap>& bitmaps,
+ const gfx::Point& hotspot,
+ int frame_delay_ms);
+
// Increment platform image cursor refcount.
virtual void RefImageCursor(PlatformCursor cursor);

Powered by Google App Engine
This is Rietveld 408576698