OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_WM_IMAGE_CURSORS_H_ |
| 6 #define ASH_WM_IMAGE_CURSORS_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 namespace ui { |
| 13 class CursorLoader; |
| 14 } |
| 15 |
| 16 namespace ash { |
| 17 |
| 18 // A utility class that provides cursors for NativeCursors for which we have |
| 19 // image resources. |
| 20 class ASH_EXPORT ImageCursors { |
| 21 public: |
| 22 ImageCursors(); |
| 23 ~ImageCursors(); |
| 24 |
| 25 // Returns the device scale factor of cursors. |
| 26 float GetDeviceScaleFactor() const; |
| 27 |
| 28 // Sets the device scale factor of the cursors with |device_scale_factor| and |
| 29 // reloads the cursor images if necessary. |
| 30 void SetDeviceScaleFactor(float device_scale_factor); |
| 31 |
| 32 // Sets the platform cursor based on the native type of |cursor|. |
| 33 void SetPlatformCursor(gfx::NativeCursor* cursor); |
| 34 |
| 35 private: |
| 36 scoped_ptr<ui::CursorLoader> cursor_loader_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(ImageCursors); |
| 39 }; |
| 40 |
| 41 } // namespace ash |
| 42 |
| 43 #endif // ASH_WM_IMAGE_CURSORS_H_ |
OLD | NEW |