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

Side by Side Diff: ui/wm/core/cursor_manager.h

Issue 233053003: Remove obsolete scale related APIs for cursor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix wm_core_unittests Created 6 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 UI_WM_CORE_CURSOR_MANAGER_H_ 5 #ifndef UI_WM_CORE_CURSOR_MANAGER_H_
6 #define UI_WM_CORE_CURSOR_MANAGER_H_ 6 #define UI_WM_CORE_CURSOR_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 30 matching lines...) Expand all
41 public: 41 public:
42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate); 42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate);
43 virtual ~CursorManager(); 43 virtual ~CursorManager();
44 44
45 // Overridden from aura::client::CursorClient: 45 // Overridden from aura::client::CursorClient:
46 virtual void SetCursor(gfx::NativeCursor) OVERRIDE; 46 virtual void SetCursor(gfx::NativeCursor) OVERRIDE;
47 virtual gfx::NativeCursor GetCursor() const OVERRIDE; 47 virtual gfx::NativeCursor GetCursor() const OVERRIDE;
48 virtual void ShowCursor() OVERRIDE; 48 virtual void ShowCursor() OVERRIDE;
49 virtual void HideCursor() OVERRIDE; 49 virtual void HideCursor() OVERRIDE;
50 virtual bool IsCursorVisible() const OVERRIDE; 50 virtual bool IsCursorVisible() const OVERRIDE;
51 virtual void SetScale(float scale) OVERRIDE;
52 virtual float GetScale() const OVERRIDE;
53 virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE; 51 virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
54 virtual ui::CursorSetType GetCursorSet() const OVERRIDE; 52 virtual ui::CursorSetType GetCursorSet() const OVERRIDE;
55 virtual void EnableMouseEvents() OVERRIDE; 53 virtual void EnableMouseEvents() OVERRIDE;
56 virtual void DisableMouseEvents() OVERRIDE; 54 virtual void DisableMouseEvents() OVERRIDE;
57 virtual bool IsMouseEventsEnabled() const OVERRIDE; 55 virtual bool IsMouseEventsEnabled() const OVERRIDE;
58 virtual void SetDisplay(const gfx::Display& display) OVERRIDE; 56 virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
59 virtual void LockCursor() OVERRIDE; 57 virtual void LockCursor() OVERRIDE;
60 virtual void UnlockCursor() OVERRIDE; 58 virtual void UnlockCursor() OVERRIDE;
61 virtual bool IsCursorLocked() const OVERRIDE; 59 virtual bool IsCursorLocked() const OVERRIDE;
62 virtual void AddObserver( 60 virtual void AddObserver(
63 aura::client::CursorClientObserver* observer) OVERRIDE; 61 aura::client::CursorClientObserver* observer) OVERRIDE;
64 virtual void RemoveObserver( 62 virtual void RemoveObserver(
65 aura::client::CursorClientObserver* observer) OVERRIDE; 63 aura::client::CursorClientObserver* observer) OVERRIDE;
66 virtual bool ShouldHideCursorOnKeyEvent( 64 virtual bool ShouldHideCursorOnKeyEvent(
67 const ui::KeyEvent& event) const OVERRIDE; 65 const ui::KeyEvent& event) const OVERRIDE;
68 66
69 private: 67 private:
70 // Overridden from NativeCursorManagerDelegate: 68 // Overridden from NativeCursorManagerDelegate:
71 virtual void CommitCursor(gfx::NativeCursor cursor) OVERRIDE; 69 virtual void CommitCursor(gfx::NativeCursor cursor) OVERRIDE;
72 virtual void CommitVisibility(bool visible) OVERRIDE; 70 virtual void CommitVisibility(bool visible) OVERRIDE;
73 virtual void CommitScale(float scale) OVERRIDE;
74 virtual void CommitCursorSet(ui::CursorSetType cursor_set) OVERRIDE; 71 virtual void CommitCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
75 virtual void CommitMouseEventsEnabled(bool enabled) OVERRIDE; 72 virtual void CommitMouseEventsEnabled(bool enabled) OVERRIDE;
76 73
77 scoped_ptr<NativeCursorManager> delegate_; 74 scoped_ptr<NativeCursorManager> delegate_;
78 75
79 // Number of times LockCursor() has been invoked without a corresponding 76 // Number of times LockCursor() has been invoked without a corresponding
80 // UnlockCursor(). 77 // UnlockCursor().
81 int cursor_lock_count_; 78 int cursor_lock_count_;
82 79
83 // The current state of the cursor. 80 // The current state of the cursor.
84 scoped_ptr<internal::CursorState> current_state_; 81 scoped_ptr<internal::CursorState> current_state_;
85 82
86 // The cursor state to restore when the cursor is unlocked. 83 // The cursor state to restore when the cursor is unlocked.
87 scoped_ptr<internal::CursorState> state_on_unlock_; 84 scoped_ptr<internal::CursorState> state_on_unlock_;
88 85
89 ObserverList<aura::client::CursorClientObserver> observers_; 86 ObserverList<aura::client::CursorClientObserver> observers_;
90 87
91 DISALLOW_COPY_AND_ASSIGN(CursorManager); 88 DISALLOW_COPY_AND_ASSIGN(CursorManager);
92 }; 89 };
93 90
94 } // namespace wm 91 } // namespace wm
95 92
96 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ 93 #endif // UI_WM_CORE_CURSOR_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc ('k') | ui/wm/core/cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698