| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ | 5 #ifndef UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ |
| 6 #define UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ | 6 #define UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ |
| 7 | 7 |
| 8 #include <X11/X.h> | 8 #include <X11/X.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "ui/base/cursor/cursor.h" | 14 #include "ui/base/cursor/cursor.h" |
| 15 #include "ui/platform_window/x11/x11_window_export.h" | 15 #include "ui/platform_window/x11/x11_window_export.h" |
| 16 | 16 |
| 17 class SkBitmap; | 17 class SkBitmap; |
| 18 | 18 |
| 19 namespace gfx { |
| 20 class Point; |
| 21 } |
| 22 |
| 19 namespace ui { | 23 namespace ui { |
| 20 | 24 |
| 21 // Ref counted class to hold an X11 cursor resource. Handles creating X11 cursor | 25 // Ref counted class to hold an X11 cursor resource. Handles creating X11 cursor |
| 22 // resources from SkBitmap/hotspot and clears the X11 resources on destruction. | 26 // resources from SkBitmap/hotspot and clears the X11 resources on destruction. |
| 23 class X11_WINDOW_EXPORT X11CursorOzone | 27 class X11_WINDOW_EXPORT X11CursorOzone |
| 24 : public base::RefCounted<X11CursorOzone> { | 28 : public base::RefCounted<X11CursorOzone> { |
| 25 public: | 29 public: |
| 26 X11CursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot); | 30 X11CursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot); |
| 27 X11CursorOzone(const std::vector<SkBitmap>& bitmaps, | 31 X11CursorOzone(const std::vector<SkBitmap>& bitmaps, |
| 28 const gfx::Point& hotspot, | 32 const gfx::Point& hotspot, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 39 X11CursorOzone(); | 43 X11CursorOzone(); |
| 40 ~X11CursorOzone(); | 44 ~X11CursorOzone(); |
| 41 | 45 |
| 42 ::Cursor xcursor_ = None; | 46 ::Cursor xcursor_ = None; |
| 43 | 47 |
| 44 DISALLOW_COPY_AND_ASSIGN(X11CursorOzone); | 48 DISALLOW_COPY_AND_ASSIGN(X11CursorOzone); |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 } // namespace ui | 51 } // namespace ui |
| 48 #endif // UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ | 52 #endif // UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ |
| OLD | NEW |