OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef ASH_WM_NATIVE_CURSOR_MANAGER_ASH_H_ |
| 6 #define ASH_WM_NATIVE_CURSOR_MANAGER_ASH_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" |
| 10 #include "ui/display/display.h" |
| 11 #include "ui/wm/core/native_cursor_manager.h" |
| 12 #include "ui/wm/core/native_cursor_manager_delegate.h" |
| 13 |
| 14 namespace ash { |
| 15 |
| 16 // Ash specific extensions to NativeCursorManager. This lets us switch whether |
| 17 // we're using the native cursor, along with exposing additional data about how |
| 18 // we're going to render cursors. |
| 19 class ASH_EXPORT NativeCursorManagerAsh : public ::wm::NativeCursorManager { |
| 20 public: |
| 21 ~NativeCursorManagerAsh() override = default; |
| 22 |
| 23 // Toggle native cursor enabled/disabled. |
| 24 // The native cursor is enabled by default. When disabled, we hide the native |
| 25 // cursor regardless of visibility state, and let CursorWindowManager draw |
| 26 // the cursor. |
| 27 virtual void SetNativeCursorEnabled(bool enabled) = 0; |
| 28 |
| 29 // Returns the scale and rotation of the currently loaded cursor. |
| 30 virtual float GetScale() const = 0; |
| 31 virtual display::Display::Rotation GetRotation() const = 0; |
| 32 |
| 33 protected: |
| 34 NativeCursorManagerAsh() = default; |
| 35 |
| 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(NativeCursorManagerAsh); |
| 38 }; |
| 39 |
| 40 } // namespace ash |
| 41 |
| 42 #endif // ASH_WM_NATIVE_CURSOR_MANAGER_ASH_H_ |
OLD | NEW |