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_IMAGE_CURSORS_H_ | 5 #ifndef UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
6 #define UI_BASE_CURSOR_IMAGE_CURSORS_H_ | 6 #define UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ~ImageCursors(); | 26 ~ImageCursors(); |
27 | 27 |
28 // Returns the scale and rotation of the currently loaded cursor. | 28 // Returns the scale and rotation of the currently loaded cursor. |
29 float GetScale() const; | 29 float GetScale() const; |
30 display::Display::Rotation GetRotation() const; | 30 display::Display::Rotation GetRotation() const; |
31 | 31 |
32 // Sets the display the cursors are loaded for. |scale_factor| determines the | 32 // Sets the display the cursors are loaded for. |scale_factor| determines the |
33 // size of the image to load. Returns true if the cursor image is reloaded. | 33 // size of the image to load. Returns true if the cursor image is reloaded. |
34 bool SetDisplay(const display::Display& display, float scale_factor); | 34 bool SetDisplay(const display::Display& display, float scale_factor); |
35 | 35 |
36 // Sets the type of the mouse cursor icon. | 36 // Sets the size of the mouse cursor icon. |
37 void SetCursorSet(CursorSetType cursor_set); | 37 void SetCursorSize(CursorSize cursor_size); |
38 | 38 |
39 // Sets the platform cursor based on the native type of |cursor|. | 39 // Sets the platform cursor based on the native type of |cursor|. |
40 void SetPlatformCursor(gfx::NativeCursor* cursor); | 40 void SetPlatformCursor(gfx::NativeCursor* cursor); |
41 | 41 |
42 private: | 42 private: |
43 // Reloads the all loaded cursors in the cursor loader. | 43 // Reloads the all loaded cursors in the cursor loader. |
44 void ReloadCursors(); | 44 void ReloadCursors(); |
45 | 45 |
46 std::unique_ptr<CursorLoader> cursor_loader_; | 46 std::unique_ptr<CursorLoader> cursor_loader_; |
47 CursorSetType cursor_set_; | 47 CursorSize cursor_size_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(ImageCursors); | 49 DISALLOW_COPY_AND_ASSIGN(ImageCursors); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace ui | 52 } // namespace ui |
53 | 53 |
54 #endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ | 54 #endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_ |
OLD | NEW |