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

Side by Side Diff: ash/wm/ash_native_cursor_manager.h

Issue 145313003: Implement cursor compositing mode on Ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid changes in ui/views/. Let Shell call AshNativeCursorManager directly. Created 6 years, 10 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
« no previous file with comments | « ash/test/mirror_window_test_api.cc ('k') | ash/wm/ash_native_cursor_manager.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 (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 ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_ 5 #ifndef ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
6 #define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_ 6 #define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 15 matching lines...) Expand all
26 // This does the ash-specific setting of cursor details like cursor 26 // This does the ash-specific setting of cursor details like cursor
27 // visibility. It communicates back with the CursorManager through the 27 // visibility. It communicates back with the CursorManager through the
28 // NativeCursorManagerDelegate interface, which receives messages about what 28 // NativeCursorManagerDelegate interface, which receives messages about what
29 // changes were acted on. 29 // changes were acted on.
30 class ASH_EXPORT AshNativeCursorManager 30 class ASH_EXPORT AshNativeCursorManager
31 : public views::corewm::NativeCursorManager { 31 : public views::corewm::NativeCursorManager {
32 public: 32 public:
33 AshNativeCursorManager(); 33 AshNativeCursorManager();
34 virtual ~AshNativeCursorManager(); 34 virtual ~AshNativeCursorManager();
35 35
36 // Toggle native cursor enabled/disabled.
37 // The native cursor is enabled by default. When disabled, we hide the native
38 // cursor regardless of visibility state, and let CursorWindowManager draw
39 // the cursor.
40 void SetNativeCursorEnabled(bool enabled);
41
36 private: 42 private:
37 friend class test::CursorManagerTestApi; 43 friend class test::CursorManagerTestApi;
38 44
39 // Overridden from views::corewm::NativeCursorManager: 45 // Overridden from views::corewm::NativeCursorManager:
40 virtual void SetDisplay( 46 virtual void SetDisplay(
41 const gfx::Display& display, 47 const gfx::Display& display,
42 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 48 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
43 virtual void SetCursor( 49 virtual void SetCursor(
44 gfx::NativeCursor cursor, 50 gfx::NativeCursor cursor,
45 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 51 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
46 virtual void SetVisibility( 52 virtual void SetVisibility(
47 bool visible, 53 bool visible,
48 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 54 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
49 virtual void SetScale( 55 virtual void SetScale(
50 float scale, 56 float scale,
51 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 57 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
52 virtual void SetCursorSet( 58 virtual void SetCursorSet(
53 ui::CursorSetType cursor_set, 59 ui::CursorSetType cursor_set,
54 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 60 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
55 virtual void SetMouseEventsEnabled( 61 virtual void SetMouseEventsEnabled(
56 bool enabled, 62 bool enabled,
57 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; 63 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
58 64
59 // The cursor location where the cursor was disabled. 65 // The cursor location where the cursor was disabled.
60 gfx::Point disabled_cursor_location_; 66 gfx::Point disabled_cursor_location_;
61 67
68 bool native_cursor_enabled_;
69
62 scoped_ptr<ImageCursors> image_cursors_; 70 scoped_ptr<ImageCursors> image_cursors_;
63 71
64 DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager); 72 DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager);
65 }; 73 };
66 74
67 } // namespace ash 75 } // namespace ash
68 76
69 #endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_ 77 #endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/test/mirror_window_test_api.cc ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698