OLD | NEW |
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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // A CursorClient that interacts with only one RootWindow. (Unlike the one in | 23 // A CursorClient that interacts with only one RootWindow. (Unlike the one in |
24 // ash, which interacts with all the RootWindows.) | 24 // ash, which interacts with all the RootWindows.) |
25 class VIEWS_EXPORT DesktopCursorClient : public aura::client::CursorClient { | 25 class VIEWS_EXPORT DesktopCursorClient : public aura::client::CursorClient { |
26 public: | 26 public: |
27 explicit DesktopCursorClient(aura::RootWindow* window); | 27 explicit DesktopCursorClient(aura::RootWindow* window); |
28 virtual ~DesktopCursorClient(); | 28 virtual ~DesktopCursorClient(); |
29 | 29 |
30 // Overridden from client::CursorClient: | 30 // Overridden from client::CursorClient: |
31 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 31 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
32 virtual void ShowCursor(bool show) OVERRIDE; | 32 virtual void ShowCursor() OVERRIDE; |
| 33 virtual void HideCursor() OVERRIDE; |
33 virtual bool IsCursorVisible() const OVERRIDE; | 34 virtual bool IsCursorVisible() const OVERRIDE; |
| 35 virtual void EnableMouseEvents() OVERRIDE; |
| 36 virtual void DisableMouseEvents() OVERRIDE; |
| 37 virtual bool IsMouseEventsEnabled() const OVERRIDE; |
34 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; | 38 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; |
35 virtual void LockCursor() OVERRIDE; | 39 virtual void LockCursor() OVERRIDE; |
36 virtual void UnlockCursor() OVERRIDE; | 40 virtual void UnlockCursor() OVERRIDE; |
37 | 41 |
38 private: | 42 private: |
| 43 void SetCursorVisibility(bool visible); |
| 44 |
39 aura::RootWindow* root_window_; | 45 aura::RootWindow* root_window_; |
40 scoped_ptr<ui::CursorLoader> cursor_loader_; | 46 scoped_ptr<ui::CursorLoader> cursor_loader_; |
41 | 47 |
42 gfx::NativeCursor current_cursor_; | 48 gfx::NativeCursor current_cursor_; |
43 bool cursor_visible_; | 49 bool cursor_visible_; |
44 | 50 |
45 DISALLOW_COPY_AND_ASSIGN(DesktopCursorClient); | 51 DISALLOW_COPY_AND_ASSIGN(DesktopCursorClient); |
46 }; | 52 }; |
47 | 53 |
48 } // namespace views | 54 } // namespace views |
49 | 55 |
50 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ | 56 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_CLIENT_H_ |
OLD | NEW |