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

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

Issue 2961403002: WIP fix for Ozone cursor woes in Mushrome: Numéro deux
Patch Set: Created 3 years, 5 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 | « services/ui/ws/window_server_delegate.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 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_
OLDNEW
« no previous file with comments | « services/ui/ws/window_server_delegate.h ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698