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

Unified Diff: ash/wm/ash_cursor_platform_delegate.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: General patch cleanup. 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: ash/wm/ash_cursor_platform_delegate.h
diff --git a/ash/wm/ash_cursor_platform_delegate.h b/ash/wm/ash_cursor_platform_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..71949ac5a8c717a66f7faf67e4d3e784dc287a15
--- /dev/null
+++ b/ash/wm/ash_cursor_platform_delegate.h
@@ -0,0 +1,61 @@
+// 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_ASH_CURSOR_PLATFORM_DELEGATE_H_
+#define ASH_WM_ASH_CURSOR_PLATFORM_DELEGATE_H_
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/point.h"
+#include "ui/views/corewm/cursor_manager_delegate.h"
+#include "ui/views/corewm/cursor_platform_delegate.h"
+
+namespace ash {
+
+namespace test {
+class CursorManagerTestApi;
+}
+
+class ImageCursors;
+
+// This class controls the visibility and the type of the cursor.
+// The cursor type can be locked so that the type stays the same
+// until it's unlocked.
+class ASH_EXPORT AshCursorPlatformDelegate
+ : public views::corewm::CursorPlatformDelegate {
+ public:
+ AshCursorPlatformDelegate();
+ virtual ~AshCursorPlatformDelegate();
+
+ private:
+ friend class test::CursorManagerTestApi;
+
+ // 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;
+
+ // The cursor location where the cursor was disabled.
+ gfx::Point disabled_cursor_location_;
+
+ scoped_ptr<ImageCursors> image_cursors_;
+
+ DISALLOW_COPY_AND_ASSIGN(AshCursorPlatformDelegate);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_ASH_CURSOR_PLATFORM_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698