| 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 UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader { | 16 class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader { |
| 17 public: | 17 public: |
| 18 CursorLoaderOzone(); | 18 CursorLoaderOzone(); |
| 19 ~CursorLoaderOzone() override; | 19 ~CursorLoaderOzone() override; |
| 20 | 20 |
| 21 // CursorLoader overrides: | 21 // CursorLoader overrides: |
| 22 void LoadImageCursor(int id, | 22 void LoadImageCursor(CursorType id, |
| 23 int resource_id, | 23 int resource_id, |
| 24 const gfx::Point& hot) override; | 24 const gfx::Point& hot) override; |
| 25 void LoadAnimatedCursor(int id, | 25 void LoadAnimatedCursor(CursorType id, |
| 26 int resource_id, | 26 int resource_id, |
| 27 const gfx::Point& hot, | 27 const gfx::Point& hot, |
| 28 int frame_delay_ms) override; | 28 int frame_delay_ms) override; |
| 29 void UnloadAll() override; | 29 void UnloadAll() override; |
| 30 void SetPlatformCursor(gfx::NativeCursor* cursor) override; | 30 void SetPlatformCursor(gfx::NativeCursor* cursor) override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 // Pointers are owned by ResourceBundle and must not be freed here. | 33 // Pointers are owned by ResourceBundle and must not be freed here. |
| 34 typedef std::map<int, PlatformCursor> ImageCursorMap; | 34 typedef std::map<CursorType, PlatformCursor> ImageCursorMap; |
| 35 ImageCursorMap cursors_; | 35 ImageCursorMap cursors_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone); | 37 DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace ui | 40 } // namespace ui |
| 41 | 41 |
| 42 #endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ | 42 #endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_ |
| OLD | NEW |