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

Unified Diff: ash/wm/ash_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
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_native_cursor_manager.h
diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..2364c70a802e8ead7283592b7dd932373c39d26b
--- /dev/null
+++ b/ash/wm/ash_native_cursor_manager.h
@@ -0,0 +1,62 @@
+// 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_NATIVE_CURSOR_MANAGER_H_
+#define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_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/native_cursor_manager.h"
+#include "ui/views/corewm/native_cursor_manager_delegate.h"
+
+namespace ash {
+
+namespace test {
+class CursorManagerTestApi;
+}
+
+class ImageCursors;
+
+// This does the ash-specific setting of cursor details like cursor
+// visibility. It communicates back with the CursorManager through the
+// NativeCursorManagerDelegate interface, which receives messages about what
+// changes were acted on.
+class ASH_EXPORT AshNativeCursorManager
+ : public views::corewm::NativeCursorManager {
+ public:
+ AshNativeCursorManager();
+ virtual ~AshNativeCursorManager();
+
+ private:
+ friend class test::CursorManagerTestApi;
+
+ // 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;
+
+ // The cursor location where the cursor was disabled.
+ gfx::Point disabled_cursor_location_;
+
+ scoped_ptr<ImageCursors> image_cursors_;
+
+ DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698