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

Side by Side 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: s/0/0U/ 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_ 5 #ifndef UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_
6 #define UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_ 6 #define UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_
7 7
8 #include <vector>
9
8 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
9 #include "ui/ozone/ozone_base_export.h" 11 #include "ui/ozone/ozone_base_export.h"
10 12
11 namespace gfx { 13 namespace gfx {
12 class Point; 14 class Point;
13 } 15 }
14 16
15 namespace ui { 17 namespace ui {
16 18
17 typedef void* PlatformCursor; 19 typedef void* PlatformCursor;
(...skipping 10 matching lines...) Expand all
28 // ui/base/cursor/cursor.h. Default cursors are managed by the implementation 30 // ui/base/cursor/cursor.h. Default cursors are managed by the implementation
29 // and must live indefinitely; there's no way to know when to free them. 31 // and must live indefinitely; there's no way to know when to free them.
30 virtual PlatformCursor GetDefaultCursor(int type); 32 virtual PlatformCursor GetDefaultCursor(int type);
31 33
32 // Return a image cursor from the specified image & hotspot. Image cursors 34 // Return a image cursor from the specified image & hotspot. Image cursors
33 // are referenced counted and have an initial refcount of 1. Therefore, each 35 // are referenced counted and have an initial refcount of 1. Therefore, each
34 // CreateImageCursor call must be matched with a call to UnrefImageCursor. 36 // CreateImageCursor call must be matched with a call to UnrefImageCursor.
35 virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap, 37 virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
36 const gfx::Point& hotspot); 38 const gfx::Point& hotspot);
37 39
40 // Return a animated cursor from the specified image & hotspot. Animated
41 // cursors are referenced counted and have an initial refcount of 1.
42 // Therefore, each CreateAnimatedCursor call must be matched with a call to
43 // UnrefImageCursor.
44 virtual PlatformCursor CreateAnimatedCursor(
45 const std::vector<SkBitmap>& bitmaps,
46 const gfx::Point& hotspot,
47 int frame_delay_ms);
48
38 // Increment platform image cursor refcount. 49 // Increment platform image cursor refcount.
39 virtual void RefImageCursor(PlatformCursor cursor); 50 virtual void RefImageCursor(PlatformCursor cursor);
40 51
41 // Decrement platform image cursor refcount. 52 // Decrement platform image cursor refcount.
42 virtual void UnrefImageCursor(PlatformCursor cursor); 53 virtual void UnrefImageCursor(PlatformCursor cursor);
43 54
44 private: 55 private:
45 static CursorFactoryOzone* impl_; // not owned 56 static CursorFactoryOzone* impl_; // not owned
46 }; 57 };
47 58
48 } // namespace ui 59 } // namespace ui
49 60
50 #endif // UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_ 61 #endif // UI_OZONE_PUBLIC_CURSOR_FACTORY_OZONE_H_
OLDNEW
« no previous file with comments | « ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc ('k') | ui/ozone/public/cursor_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698