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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_cursor_client.h

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 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
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 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
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_
OLDNEW
« no previous file with comments | « ui/views/corewm/compound_event_filter_unittest.cc ('k') | ui/views/widget/desktop_aura/desktop_cursor_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698