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

Side by Side Diff: ui/aura/cursor_manager.h

Issue 10692170: Aura desktop: Show resize cursors again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura compile Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_CURSOR_MANAGER_H_
6 #define UI_AURA_CURSOR_MANAGER_H_
7
8 #include "base/basictypes.h"
9 #include "ui/aura/aura_export.h"
10 #include "ui/gfx/native_widget_types.h"
11
12 namespace aura {
13 class CursorDelegate;
14
15 // This class controls the visibility and the type of the cursor.
16 // The cursor type can be locked so that the type stays the same
17 // until it's unlocked.
18 class AURA_EXPORT CursorManager {
19 public:
20 CursorManager();
21 ~CursorManager();
22
23 void set_delegate(CursorDelegate* delegate) { delegate_ = delegate; }
24
25 // Locks/Unlocks the cursor change.
26 void LockCursor();
27 void UnlockCursor();
28
29 void SetCursor(gfx::NativeCursor);
30
31 // Shows or hides the cursor.
32 void ShowCursor(bool show);
33 bool cursor_visible() const { return cursor_visible_; }
34
35 private:
36 CursorDelegate* delegate_;
37
38 // Number of times LockCursor() has been invoked without a corresponding
39 // UnlockCursor().
40 int cursor_lock_count_;
41
42 // Set to true if UpdateCursor() is invoked while |cursor_lock_count_| == 0.
43 bool did_cursor_change_;
44
45 // Cursor to set once |cursor_lock_count_| is set to 0. Only valid if
46 // |did_cursor_change_| is true.
47 gfx::NativeCursor cursor_to_set_on_unlock_;
48
49 // Is cursor visible?
50 bool cursor_visible_;
51
52 DISALLOW_COPY_AND_ASSIGN(CursorManager);
53 };
54
55 } // namespace aura
56
57 #endif // UI_AURA_CURSOR_MANAGER_H_
58
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698