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

Unified Diff: ui/base/cursor/image_cursors.h

Issue 258893002: app_shell: Add support for mouse cursors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update build to exclude ImageCursors on android Created 6 years, 8 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/image_cursors.cc ('k') | ui/base/cursor/image_cursors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/image_cursors.h
diff --git a/ash/wm/image_cursors.h b/ui/base/cursor/image_cursors.h
similarity index 60%
rename from ash/wm/image_cursors.h
rename to ui/base/cursor/image_cursors.h
index 1a75f40a9e3ad14bfedc72e6b3b61f2f508855f2..8e4a9ddc2f5d42b4f28ee2bbc0c33ec0a10db6b3 100644
--- a/ash/wm/image_cursors.h
+++ b/ui/base/cursor/image_cursors.h
@@ -2,25 +2,23 @@
// 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_
+#ifndef UI_BASE_CURSOR_IMAGE_CURSORS_H_
+#define UI_BASE_CURSOR_IMAGE_CURSORS_H_
-#include "ash/ash_export.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "ui/base/cursor/cursor.h"
+#include "ui/base/ui_base_export.h"
#include "ui/gfx/display.h"
#include "ui/gfx/native_widget_types.h"
namespace ui {
-class CursorLoader;
-}
-namespace ash {
+class CursorLoader;
// A utility class that provides cursors for NativeCursors for which we have
// image resources.
-class ASH_EXPORT ImageCursors {
+class UI_BASE_EXPORT ImageCursors {
public:
ImageCursors();
~ImageCursors();
@@ -29,14 +27,12 @@ class ASH_EXPORT ImageCursors {
float GetScale() const;
gfx::Display::Rotation GetRotation() const;
- // Sets the display the cursors are loaded for. The device scale factor
- // determines the size of the image to load, and the rotation of the display
- // determines if the image and its host point has to be retated.
- // Returns true if the cursor image is reloaded.
- bool SetDisplay(const gfx::Display& display);
+ // Sets the display the cursors are loaded for. |scale_factor| determines the
+ // size of the image to load. Returns true if the cursor image is reloaded.
+ bool SetDisplay(const gfx::Display& display, float scale_factor);
// Sets the type of the mouse cursor icon.
- void SetCursorSet(ui::CursorSetType cursor_set);
+ void SetCursorSet(CursorSetType cursor_set);
// Sets the platform cursor based on the native type of |cursor|.
void SetPlatformCursor(gfx::NativeCursor* cursor);
@@ -45,12 +41,12 @@ class ASH_EXPORT ImageCursors {
// Reloads the all loaded cursors in the cursor loader.
void ReloadCursors();
- scoped_ptr<ui::CursorLoader> cursor_loader_;
- ui::CursorSetType cursor_set_;
+ scoped_ptr<CursorLoader> cursor_loader_;
+ CursorSetType cursor_set_;
DISALLOW_COPY_AND_ASSIGN(ImageCursors);
};
-} // namespace ash
+} // namespace ui
-#endif // ASH_WM_IMAGE_CURSORS_H_
+#endif // UI_BASE_CURSOR_IMAGE_CURSORS_H_
« no previous file with comments | « ash/wm/image_cursors.cc ('k') | ui/base/cursor/image_cursors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698