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

Side by Side Diff: ash/wm/cursor_manager.h

Issue 10965020: Fix cursor getting invisible after moving a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_CURSOR_MANAGER_H_ 5 #ifndef ASH_WM_CURSOR_MANAGER_H_
6 #define ASH_WM_CURSOR_MANAGER_H_ 6 #define ASH_WM_CURSOR_MANAGER_H_
7 7
8 #include "ash/ash_export.h"
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/aura_export.h"
12 #include "ui/aura/client/cursor_client.h" 12 #include "ui/aura/client/cursor_client.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace ash { 15 namespace ash {
16 class CursorDelegate; 16 class CursorDelegate;
17 class ImageCursors; 17 class ImageCursors;
18 18
19 // This class controls the visibility and the type of the cursor. 19 // This class controls the visibility and the type of the cursor.
20 // The cursor type can be locked so that the type stays the same 20 // The cursor type can be locked so that the type stays the same
21 // until it's unlocked. 21 // until it's unlocked.
22 class CursorManager : public aura::client::CursorClient { 22 class ASH_EXPORT CursorManager : public aura::client::CursorClient {
23 public: 23 public:
24 class ASH_EXPORT TestApi {
sky 2012/09/20 20:46:27 Can you put this in a separate file so it isn't cl
mazda 2012/09/20 21:13:40 Changed as follows: - only declare TestApi here. -
25 public:
26 explicit TestApi(CursorManager* cursor_manager);
27
28 gfx::NativeCursor GetCurrentCursor();
29 float GetDeviceScaleFactor();
30
31 private:
32 CursorManager* cursor_manager_; // not owned
33
34 DISALLOW_COPY_AND_ASSIGN(TestApi);
35 };
36
24 CursorManager(); 37 CursorManager();
25 virtual ~CursorManager(); 38 virtual ~CursorManager();
26 39
27 void set_delegate(CursorDelegate* delegate) { delegate_ = delegate; } 40 void set_delegate(CursorDelegate* delegate) { delegate_ = delegate; }
28 41
29 // Locks/Unlocks the cursor change. 42 // Locks/Unlocks the cursor change.
30 void LockCursor(); 43 void LockCursor();
31 void UnlockCursor(); 44 void UnlockCursor();
32 45
33 bool is_cursor_locked() const { return cursor_lock_count_ > 0; } 46 bool is_cursor_locked() const { return cursor_lock_count_ > 0; }
(...skipping 30 matching lines...) Expand all
64 gfx::NativeCursor current_cursor_; 77 gfx::NativeCursor current_cursor_;
65 78
66 scoped_ptr<ImageCursors> image_cursors_; 79 scoped_ptr<ImageCursors> image_cursors_;
67 80
68 DISALLOW_COPY_AND_ASSIGN(CursorManager); 81 DISALLOW_COPY_AND_ASSIGN(CursorManager);
69 }; 82 };
70 83
71 } // namespace aura 84 } // namespace aura
72 85
73 #endif // UI_AURA_CURSOR_MANAGER_H_ 86 #endif // UI_AURA_CURSOR_MANAGER_H_
OLDNEW
« ash/ash.gyp ('K') | « ash/ash.gyp ('k') | ash/wm/cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698