Index: ui/views/widget/desktop_aura/desktop_cursor_platform_delegate.h |
diff --git a/ui/views/widget/desktop_aura/desktop_cursor_platform_delegate.h b/ui/views/widget/desktop_aura/desktop_cursor_platform_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..94f257e57d5366cb58772ef8c5739f94c5f1927d |
--- /dev/null |
+++ b/ui/views/widget/desktop_aura/desktop_cursor_platform_delegate.h |
@@ -0,0 +1,58 @@ |
+// 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_CURSOR_PLATFORM_DELEGATE_H_ |
+#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_PLATFORM_DELEGATE_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/views/corewm/cursor_platform_delegate.h" |
+#include "ui/views/views_export.h" |
+ |
+namespace aura { |
+class RootWindow; |
+} |
+ |
+namespace ui { |
+class CursorLoader; |
+} |
+ |
+namespace views { |
+ |
+namespace corewm { |
+class CursorManagerDelegate; |
+} |
+ |
+// A CursorClient that interacts with only one RootWindow. (Unlike the one in |
+// ash, which interacts with all the RootWindows.) |
+class VIEWS_EXPORT DesktopCursorPlatformDelegate |
+ : public views::corewm::CursorPlatformDelegate { |
+ public: |
+ explicit DesktopCursorPlatformDelegate(aura::RootWindow* window); |
+ virtual ~DesktopCursorPlatformDelegate(); |
+ |
+ private: |
+ // Overridden from views::corewm::CursorPlatformDelegate: |
+ virtual void SetDeviceScaleFactor( |
+ float device_scale_factor, |
+ views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
+ virtual void SetCursor( |
+ gfx::NativeCursor cursor, |
+ views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
+ virtual void SetVisibility( |
+ bool visible, |
+ views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
+ virtual void SetMouseEventsEnabled( |
+ bool enabled, |
+ views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
+ |
+ aura::RootWindow* root_window_; |
+ scoped_ptr<ui::CursorLoader> cursor_loader_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DesktopCursorPlatformDelegate); |
+}; |
+ |
+} // namespace views |
+ |
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_PLATFORM_DELEGATE_H_ |