OLD | NEW |
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_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ | 5 #ifndef UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ |
6 #define UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ | 6 #define UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
13 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | |
14 #include "ui/base/ui_base_export.h" | 13 #include "ui/base/ui_base_export.h" |
15 #include "ui/gfx/geometry/point.h" | 14 #include "ui/gfx/geometry/point.h" |
| 15 #include "ui/ozone/public/cursor_factory_ozone.h" |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 // A cursor that is an SkBitmap combined with a gfx::Point hotspot. | 19 // A cursor that is an SkBitmap combined with a gfx::Point hotspot. |
20 class UI_BASE_EXPORT BitmapCursorOzone | 20 class UI_BASE_EXPORT BitmapCursorOzone |
21 : public base::RefCounted<BitmapCursorOzone> { | 21 : public base::RefCounted<BitmapCursorOzone> { |
22 public: | 22 public: |
23 BitmapCursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot) | 23 BitmapCursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot) |
24 : bitmap_(bitmap), hotspot_(hotspot) {} | 24 : bitmap_(bitmap), hotspot_(hotspot) {} |
25 | 25 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Default cursors are cached & owned by the factory. | 66 // Default cursors are cached & owned by the factory. |
67 typedef std::map<int, scoped_refptr<BitmapCursorOzone> > DefaultCursorMap; | 67 typedef std::map<int, scoped_refptr<BitmapCursorOzone> > DefaultCursorMap; |
68 DefaultCursorMap default_cursors_; | 68 DefaultCursorMap default_cursors_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(BitmapCursorFactoryOzone); | 70 DISALLOW_COPY_AND_ASSIGN(BitmapCursorFactoryOzone); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace ui | 73 } // namespace ui |
74 | 74 |
75 #endif // UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ | 75 #endif // UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_ |
OLD | NEW |