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_IMAGE_CURSORS_H_ | 5 #ifndef UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
6 #define UI_BASE_CURSOR_IMAGE_CURSORS_H_ | 6 #define UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
12 #include "ui/base/ui_base_export.h" | 13 #include "ui/base/ui_base_export.h" |
13 #include "ui/gfx/display.h" | 14 #include "ui/gfx/display.h" |
14 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 class CursorLoader; | 19 class CursorLoader; |
19 | 20 |
(...skipping 15 matching lines...) Expand all Loading... |
35 // Sets the type of the mouse cursor icon. | 36 // Sets the type of the mouse cursor icon. |
36 void SetCursorSet(CursorSetType cursor_set); | 37 void SetCursorSet(CursorSetType cursor_set); |
37 | 38 |
38 // Sets the platform cursor based on the native type of |cursor|. | 39 // Sets the platform cursor based on the native type of |cursor|. |
39 void SetPlatformCursor(gfx::NativeCursor* cursor); | 40 void SetPlatformCursor(gfx::NativeCursor* cursor); |
40 | 41 |
41 private: | 42 private: |
42 // Reloads the all loaded cursors in the cursor loader. | 43 // Reloads the all loaded cursors in the cursor loader. |
43 void ReloadCursors(); | 44 void ReloadCursors(); |
44 | 45 |
45 scoped_ptr<CursorLoader> cursor_loader_; | 46 std::unique_ptr<CursorLoader> cursor_loader_; |
46 CursorSetType cursor_set_; | 47 CursorSetType cursor_set_; |
47 | 48 |
48 DISALLOW_COPY_AND_ASSIGN(ImageCursors); | 49 DISALLOW_COPY_AND_ASSIGN(ImageCursors); |
49 }; | 50 }; |
50 | 51 |
51 } // namespace ui | 52 } // namespace ui |
52 | 53 |
53 #endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ | 54 #endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
OLD | NEW |