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

Unified Diff: ash/wm/image_cursors.h

Issue 10919135: Move ash specific cursor code to CursorManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/cursor_manager.cc ('k') | ash/wm/image_cursors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/image_cursors.h
diff --git a/ash/wm/image_cursors.h b/ash/wm/image_cursors.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1a7c41dddda28f5f047f7e7d2a193654a4575a1
--- /dev/null
+++ b/ash/wm/image_cursors.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_IMAGE_CURSORS_H_
+#define ASH_WM_IMAGE_CURSORS_H_
+
+#include "ash/ash_export.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+class CursorLoader;
+}
+
+namespace ash {
+
+// A utility class that provides cursors for NativeCursors for which we have
+// image resources.
+class ASH_EXPORT ImageCursors {
+ public:
+ ImageCursors();
+ ~ImageCursors();
+
+ // Returns the device scale factor of cursors.
+ float GetDeviceScaleFactor() const;
+
+ // Sets the device scale factor of the cursors with |device_scale_factor| and
+ // reloads the cursor images if necessary.
+ void SetDeviceScaleFactor(float device_scale_factor);
+
+ // Sets the platform cursor based on the native type of |cursor|.
+ void SetPlatformCursor(gfx::NativeCursor* cursor);
+
+ private:
+ scoped_ptr<ui::CursorLoader> cursor_loader_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageCursors);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_IMAGE_CURSORS_H_
« no previous file with comments | « ash/wm/cursor_manager.cc ('k') | ash/wm/image_cursors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698