Chromium Code Reviews| 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..03db8f6a226a8b1e5bdfa7f4cfc9519ec9d424f3 |
| --- /dev/null |
| +++ b/ash/wm/native_cursor_manager_ash.h |
| @@ -0,0 +1,48 @@ |
| +// 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 <memory> |
|
James Cook
2017/06/13 00:49:26
not needed
Elliot Glaysher
2017/06/13 18:05:45
Removed half the includes.
|
| + |
| +#include "ash/ash_export.h" |
| +#include "base/compiler_specific.h" |
|
James Cook
2017/06/13 00:49:26
Is this needed?
|
| +#include "base/macros.h" |
| +#include "base/strings/string16.h" |
|
James Cook
2017/06/13 00:49:26
many of these are not needed
|
| +#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 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_ |