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

Unified Diff: ui/aura/client/cursor_client.h

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 years 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 | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/env.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/client/cursor_client.h
diff --git a/ui/aura/client/cursor_client.h b/ui/aura/client/cursor_client.h
index 3f970b0b5c3939eac14a2040a5f49af6d58d5efc..9eadfbe31f16da89b75f8f48fca75b514e4fea3d 100644
--- a/ui/aura/client/cursor_client.h
+++ b/ui/aura/client/cursor_client.h
@@ -18,22 +18,37 @@ class AURA_EXPORT CursorClient {
// Notes that |window| has requested the change to |cursor|.
virtual void SetCursor(gfx::NativeCursor cursor) = 0;
- // Changes the visibility of the cursor.
- virtual void ShowCursor(bool show) = 0;
+ // Shows the cursor. This does not take effect When mouse events are disabled.
+ virtual void ShowCursor() = 0;
+
+ // Hides the cursor. Mouse events keep being sent even when the cursor is
+ // invisible.
+ virtual void HideCursor() = 0;
// Gets whether the cursor is visible.
virtual bool IsCursorVisible() const = 0;
+ // Makes mouse events start being sent and shows the cursor if it was hidden
+ // with DisableMouseEvents.
+ virtual void EnableMouseEvents() = 0;
+
+ // Makes mouse events stop being sent and hides the cursor if it is visible.
+ virtual void DisableMouseEvents() = 0;
+
+ // Returns true if mouse events are enabled.
+ virtual bool IsMouseEventsEnabled() const = 0;
+
// Sets the device scale factor of the cursor.
virtual void SetDeviceScaleFactor(float device_scale_factor) = 0;
- // Locks the cursor change. The cursor type and cursor visibility never change
- // as long as lock is held by anyone.
+ // Locks the cursor change. The cursor type, cursor visibility, and mouse
+ // events enable state never change as long as lock is held by anyone.
virtual void LockCursor() = 0;
- // Unlocks the cursor change. If all the locks are released, the cursor type
- // and visibility are restored to the ones set by the lastest call of
- // SetCursor and ShowCursor.
+ // Unlocks the cursor change. If all the locks are released, the cursor type,
+ // cursor visibility, and mouse events enable state are restored to the ones
+ // set by the lastest call of SetCursor, ShowCursor/HideCursor, and
+ // EnableMouseEvents/DisableMouseEvents.
virtual void UnlockCursor() = 0;
protected:
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/env.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698