summaryrefslogtreecommitdiff
path: root/chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
commit679147eead574d186ebf3069647b4c23e8ccace6 (patch)
treefc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
downloadqtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz
Initial import.
Diffstat (limited to 'chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h')
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h b/chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
new file mode 100644
index 00000000000..f6a800bfb9f
--- /dev/null
+++ b/chromium/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
@@ -0,0 +1,69 @@
+// 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
+#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/views/corewm/native_cursor_manager.h"
+#include "ui/views/views_export.h"
+
+namespace aura {
+class RootWindow;
+}
+
+namespace ui {
+class CursorLoader;
+}
+
+namespace views {
+class DesktopCursorLoaderUpdater;
+
+namespace corewm {
+class NativeCursorManagerDelegate;
+}
+
+// A NativeCursorManager that interacts with only one RootWindow. (Unlike the
+// one in ash, which interacts with all the RootWindows that ash knows about.)
+class VIEWS_EXPORT DesktopNativeCursorManager
+ : public views::corewm::NativeCursorManager {
+ public:
+ DesktopNativeCursorManager(
+ aura::RootWindow* window,
+ scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater);
+ virtual ~DesktopNativeCursorManager();
+
+ // Builds a cursor and sets the internal platform representation.
+ gfx::NativeCursor GetInitializedCursor(int type);
+
+ private:
+ // Overridden from views::corewm::NativeCursorManager:
+ virtual void SetDisplay(
+ const gfx::Display& display,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ virtual void SetCursor(
+ gfx::NativeCursor cursor,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ virtual void SetVisibility(
+ bool visible,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ virtual void SetScale(
+ float scale,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+ virtual void SetMouseEventsEnabled(
+ bool enabled,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+
+ aura::RootWindow* root_window_;
+ scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater_;
+ scoped_ptr<ui::CursorLoader> cursor_loader_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopNativeCursorManager);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
+