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

Side by Side Diff: ui/aura/test/test_cursor_client.h

Issue 92413002: Cursor state should be global for all CursorManagers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/client/cursor_client.h ('k') | ui/aura/test/test_cursor_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_AURA_TEST_TEST_CURSOR_CLIENT_H_ 5 #ifndef UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
6 #define UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ 6 #define UI_AURA_TEST_TEST_CURSOR_CLIENT_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/observer_list.h" 10 #include "base/observer_list.h"
11 #include "ui/aura/client/cursor_client.h" 11 #include "ui/aura/client/cursor_client.h"
12 12
13 namespace aura { 13 namespace aura {
14 namespace test { 14 namespace test {
15 15
16 class TestCursorClient : public aura::client::CursorClient { 16 class TestCursorClient : public aura::client::CursorClient {
17 public: 17 public:
18 explicit TestCursorClient(aura::Window* root_window); 18 explicit TestCursorClient(aura::Window* root_window);
19 virtual ~TestCursorClient(); 19 virtual ~TestCursorClient();
20 20
21 // Overridden from aura::client::CursorClient: 21 // Overridden from aura::client::CursorClient:
22 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 22 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
23 virtual gfx::NativeCursor GetCursor() const OVERRIDE;
23 virtual void ShowCursor() OVERRIDE; 24 virtual void ShowCursor() OVERRIDE;
24 virtual void HideCursor() OVERRIDE; 25 virtual void HideCursor() OVERRIDE;
25 virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE; 26 virtual void SetCursorSet(ui::CursorSetType cursor_set) OVERRIDE;
27 virtual ui::CursorSetType GetCursorSet() const OVERRIDE;
26 virtual void SetScale(float scale) OVERRIDE; 28 virtual void SetScale(float scale) OVERRIDE;
29 virtual float GetScale() const OVERRIDE;
27 virtual bool IsCursorVisible() const OVERRIDE; 30 virtual bool IsCursorVisible() const OVERRIDE;
28 virtual void EnableMouseEvents() OVERRIDE; 31 virtual void EnableMouseEvents() OVERRIDE;
29 virtual void DisableMouseEvents() OVERRIDE; 32 virtual void DisableMouseEvents() OVERRIDE;
30 virtual bool IsMouseEventsEnabled() const OVERRIDE; 33 virtual bool IsMouseEventsEnabled() const OVERRIDE;
31 virtual void SetDisplay(const gfx::Display& display) OVERRIDE; 34 virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
32 virtual void LockCursor() OVERRIDE; 35 virtual void LockCursor() OVERRIDE;
33 virtual void UnlockCursor() OVERRIDE; 36 virtual void UnlockCursor() OVERRIDE;
34 virtual bool IsCursorLocked() const OVERRIDE; 37 virtual bool IsCursorLocked() const OVERRIDE;
35 virtual void AddObserver( 38 virtual void AddObserver(
36 aura::client::CursorClientObserver* observer) OVERRIDE; 39 aura::client::CursorClientObserver* observer) OVERRIDE;
37 virtual void RemoveObserver( 40 virtual void RemoveObserver(
38 aura::client::CursorClientObserver* observer) OVERRIDE; 41 aura::client::CursorClientObserver* observer) OVERRIDE;
39 42
40 private: 43 private:
41 bool visible_; 44 bool visible_;
42 bool mouse_events_enabled_; 45 bool mouse_events_enabled_;
43 int cursor_lock_count_; 46 int cursor_lock_count_;
44 ObserverList<aura::client::CursorClientObserver> observers_; 47 ObserverList<aura::client::CursorClientObserver> observers_;
45 aura::Window* root_window_; 48 aura::Window* root_window_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(TestCursorClient); 50 DISALLOW_COPY_AND_ASSIGN(TestCursorClient);
48 }; 51 };
49 52
50 } // namespace test 53 } // namespace test
51 } // namespace aura 54 } // namespace aura
52 55
53 #endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ 56 #endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/client/cursor_client.h ('k') | ui/aura/test/test_cursor_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698