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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_cursor_manager.h

Issue 12263050: Rework ash::CursorManager into a corewm object, to share code with desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 10 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: ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
diff --git a/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa7847b06b5c135579ad845132a912218c96a498
--- /dev/null
+++ b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.h
@@ -0,0 +1,59 @@
+// 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 {
+
+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:
+ explicit DesktopNativeCursorManager(aura::RootWindow* window);
+ virtual ~DesktopNativeCursorManager();
+
+ private:
+ // Overridden from views::corewm::NativeCursorManager:
+ virtual void SetDeviceScaleFactor(
+ float device_scale_factor,
+ 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 SetMouseEventsEnabled(
+ bool enabled,
+ views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
+
+ aura::RootWindow* root_window_;
+ scoped_ptr<ui::CursorLoader> cursor_loader_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopNativeCursorManager);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_
+
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_cursor_client.cc ('k') | ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698