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

Unified Diff: ash/wm/native_cursor_manager_ash.h

Issue 2932563002: Implement cursor changing on Mushrome (Closed)
Patch Set: oshima patch take 2 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
« no previous file with comments | « ash/wm/ash_native_cursor_manager_unittest.cc ('k') | ash/wm/native_cursor_manager_ash_classic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/native_cursor_manager_ash.h
diff --git a/ash/wm/native_cursor_manager_ash.h b/ash/wm/native_cursor_manager_ash.h
new file mode 100644
index 0000000000000000000000000000000000000000..28756c5a335d4308c3aac8625ac446f3fe55f74d
--- /dev/null
+++ b/ash/wm/native_cursor_manager_ash.h
@@ -0,0 +1,42 @@
+// 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_NATIVE_CURSOR_MANAGER_ASH_H_
+#define ASH_WM_NATIVE_CURSOR_MANAGER_ASH_H_
+
+#include "ash/ash_export.h"
+#include "base/macros.h"
+#include "ui/display/display.h"
+#include "ui/wm/core/native_cursor_manager.h"
+#include "ui/wm/core/native_cursor_manager_delegate.h"
+
+namespace ash {
+
+// 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 NativeCursorManagerAsh : public ::wm::NativeCursorManager {
+ public:
+ ~NativeCursorManagerAsh() override = default;
+
+ // Toggle native cursor enabled/disabled.
+ // The native cursor is enabled by default. When disabled, we hide the native
+ // cursor regardless of visibility state, and let CursorWindowManager draw
+ // the cursor.
+ virtual void SetNativeCursorEnabled(bool enabled) = 0;
+
+ // Returns the scale and rotation of the currently loaded cursor.
+ virtual float GetScale() const = 0;
+ virtual display::Display::Rotation GetRotation() const = 0;
+
+ protected:
+ NativeCursorManagerAsh() = default;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NativeCursorManagerAsh);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_NATIVE_CURSOR_MANAGER_ASH_H_
« no previous file with comments | « ash/wm/ash_native_cursor_manager_unittest.cc ('k') | ash/wm/native_cursor_manager_ash_classic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698