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

Unified Diff: ash/wm/ash_native_cursor_manager.h

Issue 2932563002: Implement cursor changing on Mushrome (Closed)
Patch Set: Remove last NOTIMPLEMENTED for this patch Created 3 years, 6 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
Index: ash/wm/ash_native_cursor_manager.h
diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h
index fac694dd960fa93e45f9c3272d8ba0fbed57a71b..2b8abf51c07cb15bfa1e6cb409dd971425d7fbca 100644
--- a/ash/wm/ash_native_cursor_manager.h
+++ b/ash/wm/ash_native_cursor_manager.h
@@ -11,25 +11,17 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/strings/string16.h"
+#include "ui/display/display.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/wm/core/native_cursor_manager.h"
#include "ui/wm/core/native_cursor_manager_delegate.h"
-namespace ui {
-class ImageCursors;
-}
-
namespace ash {
-namespace test {
-class CursorManagerTestApi;
-}
-
-// This does the ash-specific setting of cursor details like cursor
-// visibility. It communicates back with the CursorManager through the
-// NativeCursorManagerDelegate interface, which receives messages about what
-// changes were acted on.
+// Ash specific extensions to NativeCursorManager. This lets us switch whether
+// we're using the native cursor, along with exposing additional data about how
+// we're going to render cursors.
class ASH_EXPORT AshNativeCursorManager : public ::wm::NativeCursorManager {
public:
AshNativeCursorManager();
@@ -39,31 +31,13 @@ class ASH_EXPORT AshNativeCursorManager : public ::wm::NativeCursorManager {
// The native cursor is enabled by default. When disabled, we hide the native
// cursor regardless of visibility state, and let CursorWindowManager draw
// the cursor.
- void SetNativeCursorEnabled(bool enabled);
-
- private:
- friend class test::CursorManagerTestApi;
+ virtual void SetNativeCursorEnabled(bool enabled) = 0;
- // Overridden from ::wm::NativeCursorManager:
- void SetDisplay(const display::Display& display,
- ::wm::NativeCursorManagerDelegate* delegate) override;
- void SetCursor(gfx::NativeCursor cursor,
- ::wm::NativeCursorManagerDelegate* delegate) override;
- void SetVisibility(bool visible,
- ::wm::NativeCursorManagerDelegate* delegate) override;
- void SetCursorSet(ui::CursorSetType cursor_set,
- ::wm::NativeCursorManagerDelegate* delegate) override;
- void SetMouseEventsEnabled(
- bool enabled,
- ::wm::NativeCursorManagerDelegate* delegate) override;
-
- // The cursor location where the cursor was disabled.
- gfx::Point disabled_cursor_location_;
-
- bool native_cursor_enabled_;
-
- std::unique_ptr<ui::ImageCursors> image_cursors_;
+ // Returns the scale and rotation of the currently loaded cursor.
+ virtual float GetScale() const = 0;
+ virtual display::Display::Rotation GetRotation() const = 0;
+ private:
DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager);
};

Powered by Google App Engine
This is Rietveld 408576698