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

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

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/web_dialogs/web_dialog_web_contents_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 class NativeCursorManager; 33 class NativeCursorManager;
34 34
35 // This class receives requests to change cursor properties, as well as 35 // This class receives requests to change cursor properties, as well as
36 // requests to queue any further changes until a later time. It sends changes 36 // requests to queue any further changes until a later time. It sends changes
37 // to the NativeCursorManager, which communicates back to us when these changes 37 // to the NativeCursorManager, which communicates back to us when these changes
38 // were made through the NativeCursorManagerDelegate interface. 38 // were made through the NativeCursorManagerDelegate interface.
39 class WM_EXPORT CursorManager : public aura::client::CursorClient, 39 class WM_EXPORT CursorManager : public aura::client::CursorClient,
40 public NativeCursorManagerDelegate { 40 public NativeCursorManagerDelegate {
41 public: 41 public:
42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate); 42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate);
43 virtual ~CursorManager(); 43 ~CursorManager() override;
44 44
45 // Overridden from aura::client::CursorClient: 45 // Overridden from aura::client::CursorClient:
46 virtual void SetCursor(gfx::NativeCursor) override; 46 void SetCursor(gfx::NativeCursor) override;
47 virtual gfx::NativeCursor GetCursor() const override; 47 gfx::NativeCursor GetCursor() const override;
48 virtual void ShowCursor() override; 48 void ShowCursor() override;
49 virtual void HideCursor() override; 49 void HideCursor() override;
50 virtual bool IsCursorVisible() const override; 50 bool IsCursorVisible() const override;
51 virtual void SetCursorSet(ui::CursorSetType cursor_set) override; 51 void SetCursorSet(ui::CursorSetType cursor_set) override;
52 virtual ui::CursorSetType GetCursorSet() const override; 52 ui::CursorSetType GetCursorSet() const override;
53 virtual void EnableMouseEvents() override; 53 void EnableMouseEvents() override;
54 virtual void DisableMouseEvents() override; 54 void DisableMouseEvents() override;
55 virtual bool IsMouseEventsEnabled() const override; 55 bool IsMouseEventsEnabled() const override;
56 virtual void SetDisplay(const gfx::Display& display) override; 56 void SetDisplay(const gfx::Display& display) override;
57 virtual void LockCursor() override; 57 void LockCursor() override;
58 virtual void UnlockCursor() override; 58 void UnlockCursor() override;
59 virtual bool IsCursorLocked() const override; 59 bool IsCursorLocked() const override;
60 virtual void AddObserver( 60 void AddObserver(aura::client::CursorClientObserver* observer) override;
61 aura::client::CursorClientObserver* observer) override; 61 void RemoveObserver(aura::client::CursorClientObserver* observer) override;
62 virtual void RemoveObserver( 62 bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override;
63 aura::client::CursorClientObserver* observer) override;
64 virtual bool ShouldHideCursorOnKeyEvent(
65 const ui::KeyEvent& event) const override;
66 63
67 private: 64 private:
68 // Overridden from NativeCursorManagerDelegate: 65 // Overridden from NativeCursorManagerDelegate:
69 virtual void CommitCursor(gfx::NativeCursor cursor) override; 66 void CommitCursor(gfx::NativeCursor cursor) override;
70 virtual void CommitVisibility(bool visible) override; 67 void CommitVisibility(bool visible) override;
71 virtual void CommitCursorSet(ui::CursorSetType cursor_set) override; 68 void CommitCursorSet(ui::CursorSetType cursor_set) override;
72 virtual void CommitMouseEventsEnabled(bool enabled) override; 69 void CommitMouseEventsEnabled(bool enabled) override;
73 70
74 scoped_ptr<NativeCursorManager> delegate_; 71 scoped_ptr<NativeCursorManager> delegate_;
75 72
76 // Number of times LockCursor() has been invoked without a corresponding 73 // Number of times LockCursor() has been invoked without a corresponding
77 // UnlockCursor(). 74 // UnlockCursor().
78 int cursor_lock_count_; 75 int cursor_lock_count_;
79 76
80 // The current state of the cursor. 77 // The current state of the cursor.
81 scoped_ptr<internal::CursorState> current_state_; 78 scoped_ptr<internal::CursorState> current_state_;
82 79
83 // The cursor state to restore when the cursor is unlocked. 80 // The cursor state to restore when the cursor is unlocked.
84 scoped_ptr<internal::CursorState> state_on_unlock_; 81 scoped_ptr<internal::CursorState> state_on_unlock_;
85 82
86 ObserverList<aura::client::CursorClientObserver> observers_; 83 ObserverList<aura::client::CursorClientObserver> observers_;
87 84
88 DISALLOW_COPY_AND_ASSIGN(CursorManager); 85 DISALLOW_COPY_AND_ASSIGN(CursorManager);
89 }; 86 };
90 87
91 } // namespace wm 88 } // namespace wm
92 89
93 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ 90 #endif // UI_WM_CORE_CURSOR_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/web_dialogs/web_dialog_web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698