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.
5 #ifndef ASH_WM_IMAGE_CURSORS_H_
6 #define ASH_WM_IMAGE_CURSORS_H_
8 #include "ash/ash_export.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/native_widget_types.h"
18 // A utility class that provides cursors for NativeCursors for which we have
20 class ASH_EXPORT ImageCursors
{
25 // Returns the device scale factor of cursors. The device scale factor must
26 // be set by SetDeviceScaleFactor at least once before using this.
27 float GetDeviceScaleFactor() const;
29 // Sets the device scale factor of the cursors with |device_scale_factor| and
30 // reloads the cursor images if necessary. Returns true if the cursor image
32 bool SetDeviceScaleFactor(float device_scale_factor
);
34 // Sets the platform cursor based on the native type of |cursor|.
35 void SetPlatformCursor(gfx::NativeCursor
* cursor
);
38 scoped_ptr
<ui::CursorLoader
> cursor_loader_
;
40 DISALLOW_COPY_AND_ASSIGN(ImageCursors
);
45 #endif // ASH_WM_IMAGE_CURSORS_H_