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

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

Issue 158023006: Adding Ozone CursorLoader and necessary API functions to allow setting the cursor in SoftwareFactor… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/cursor/cursor_loader_null.cc ('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 (c) 2012 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_NULL_H_ 5 #ifndef UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
6 #define UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_ 6 #define UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include <map>
9
10 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/base/cursor/cursor_loader.h" 11 #include "ui/base/cursor/cursor_loader.h"
10 #include "ui/base/ui_base_export.h" 12
13 namespace gfx {
14 class ImageSkia;
15 }
11 16
12 namespace ui { 17 namespace ui {
13 18
14 class UI_BASE_EXPORT CursorLoaderNull : public CursorLoader { 19 class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader {
15 public: 20 public:
16 CursorLoaderNull(); 21 CursorLoaderOzone();
17 virtual ~CursorLoaderNull(); 22 virtual ~CursorLoaderOzone();
18 23
19 // Overridden from CursorLoader: 24 // CursorLoader overrides:
20 virtual void LoadImageCursor(int id, 25 virtual void LoadImageCursor(int id,
21 int resource_id, 26 int resource_id,
22 const gfx::Point& hot) OVERRIDE; 27 const gfx::Point& hot) OVERRIDE;
23 virtual void LoadAnimatedCursor(int id, 28 virtual void LoadAnimatedCursor(int id,
24 int resource_id, 29 int resource_id,
25 const gfx::Point& hot, 30 const gfx::Point& hot,
26 int frame_delay_ms) OVERRIDE; 31 int frame_delay_ms) OVERRIDE;
27 virtual void UnloadAll() OVERRIDE; 32 virtual void UnloadAll() OVERRIDE;
28 virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE; 33 virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE;
29 34
30 private: 35 private:
31 DISALLOW_COPY_AND_ASSIGN(CursorLoaderNull); 36 // Pointers are owned by ResourceBundle and must not be freed here.
37 std::map<int, const gfx::ImageSkia*> cursors_;
38
39 SkBitmap invisible_cursor_;
40
41 DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone);
32 }; 42 };
33 43
34 } // namespace ui 44 } // namespace ui
35 45
36 #endif // UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_ 46 #endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
OLDNEW
« no previous file with comments | « ui/base/cursor/cursor_loader_null.cc ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698