Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: ui/base/cursor/cursor_loader_ozone.h

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/cursor/cursor_loader.h ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « ui/base/cursor/cursor_loader.h ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698