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_CURSOR_LOADER_OZONE_H_ | 5 #ifndef UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ |
6 #define UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ | 6 #define UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "ui/base/cursor/cursor.h" | 11 #include "ui/base/cursor/cursor.h" |
12 #include "ui/base/cursor/cursor_loader.h" | 12 #include "ui/base/cursor/cursor_loader.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
| 16 class CursorFactoryOzone; |
| 17 |
16 class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader { | 18 class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader { |
17 public: | 19 public: |
18 CursorLoaderOzone(); | 20 CursorLoaderOzone(); |
19 ~CursorLoaderOzone() override; | 21 ~CursorLoaderOzone() override; |
20 | 22 |
21 // CursorLoader overrides: | 23 // CursorLoader overrides: |
22 void LoadImageCursor(CursorType id, | 24 void LoadImageCursor(CursorType id, |
23 int resource_id, | 25 int resource_id, |
24 const gfx::Point& hot) override; | 26 const gfx::Point& hot) override; |
25 void LoadAnimatedCursor(CursorType id, | 27 void LoadAnimatedCursor(CursorType id, |
26 int resource_id, | 28 int resource_id, |
27 const gfx::Point& hot, | 29 const gfx::Point& hot, |
28 int frame_delay_ms) override; | 30 int frame_delay_ms) override; |
29 void UnloadAll() override; | 31 void UnloadAll() override; |
30 void SetPlatformCursor(gfx::NativeCursor* cursor) override; | 32 void SetPlatformCursor(gfx::NativeCursor* cursor) override; |
31 | 33 |
32 private: | 34 private: |
33 // Pointers are owned by ResourceBundle and must not be freed here. | 35 // Pointers are owned by ResourceBundle and must not be freed here. |
34 typedef std::map<CursorType, PlatformCursor> ImageCursorMap; | 36 typedef std::map<CursorType, PlatformCursor> ImageCursorMap; |
35 ImageCursorMap cursors_; | 37 ImageCursorMap cursors_; |
| 38 CursorFactoryOzone* factory_ = nullptr; |
36 | 39 |
37 DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone); | 40 DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone); |
38 }; | 41 }; |
39 | 42 |
40 } // namespace ui | 43 } // namespace ui |
41 | 44 |
42 #endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ | 45 #endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ |
OLD | NEW |