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

Unified Diff: ash/wm/cursor_manager.h

Issue 11035050: Enable CursorManager::LockCursor to lock cursor visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura build Created 8 years, 2 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/wm/cursor_delegate.h ('k') | ash/wm/cursor_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/cursor_manager.h
diff --git a/ash/wm/cursor_manager.h b/ash/wm/cursor_manager.h
index f2b857e8c71143095a348e06f1e6d22594399f6c..c203c70d428db2c0e182c37fb1c08b6dafde5b3f 100644
--- a/ash/wm/cursor_manager.h
+++ b/ash/wm/cursor_manager.h
@@ -18,7 +18,6 @@ namespace test {
class CursorManagerTestApi;
}
-class CursorDelegate;
class ImageCursors;
// This class controls the visibility and the type of the cursor.
@@ -29,12 +28,6 @@ class ASH_EXPORT CursorManager : public aura::client::CursorClient {
CursorManager();
virtual ~CursorManager();
- void set_delegate(CursorDelegate* delegate) { delegate_ = delegate; }
-
- // Locks/Unlocks the cursor change.
- void LockCursor();
- void UnlockCursor();
-
bool is_cursor_locked() const { return cursor_lock_count_ > 0; }
// Shows or hides the cursor.
@@ -45,25 +38,33 @@ class ASH_EXPORT CursorManager : public aura::client::CursorClient {
virtual void ShowCursor(bool show) OVERRIDE;
virtual bool IsCursorVisible() const OVERRIDE;
virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE;
+ virtual void LockCursor() OVERRIDE;
+ virtual void UnlockCursor() OVERRIDE;
private:
friend class test::CursorManagerTestApi;
void SetCursorInternal(gfx::NativeCursor cursor);
-
- CursorDelegate* delegate_;
+ void ShowCursorInternal(bool show);
// Number of times LockCursor() has been invoked without a corresponding
// UnlockCursor().
int cursor_lock_count_;
- // Set to true if UpdateCursor() is invoked while |cursor_lock_count_| == 0.
+ // Set to true if SetCursor() is invoked while |cursor_lock_count_| == 0.
bool did_cursor_change_;
// Cursor to set once |cursor_lock_count_| is set to 0. Only valid if
// |did_cursor_change_| is true.
gfx::NativeCursor cursor_to_set_on_unlock_;
+ // Set to true if ShowCursor() is invoked while |cursor_lock_count_| == 0.
+ bool did_visibility_change_;
+
+ // The visibility to set once |cursor_lock_count_| is set to 0. Only valid if
+ // |did_visibility_change_| is true.
+ bool show_on_unlock_;
+
// Is cursor visible?
bool cursor_visible_;
« no previous file with comments | « ash/wm/cursor_delegate.h ('k') | ash/wm/cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698