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

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: 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
Index: ash/wm/cursor_manager.h
diff --git a/ash/wm/cursor_manager.h b/ash/wm/cursor_manager.h
index f2b857e8c71143095a348e06f1e6d22594399f6c..b45e286c33881ad886bce65d5b51afa9e9853098 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,8 +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();
oshima 2012/10/09 23:08:38 Can you define these API in CursorClient? RWHVA ne
mazda 2012/10/10 00:59:12 Done. I'd like to add the implementations other th
@@ -50,20 +47,26 @@ class ASH_EXPORT CursorManager : public aura::client::CursorClient {
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') | ash/wm/cursor_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698