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

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

Issue 2932563002: Implement cursor changing on Mushrome (Closed)
Patch Set: oshima patch take 2 Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_NATIVE_CURSOR_MANAGER_ASH_MUS_H_
6 #define ASH_WM_NATIVE_CURSOR_MANAGER_ASH_MUS_H_
7
8 #include "ash/wm/native_cursor_manager_ash.h"
9
10 namespace ui {
11 class CursorDataFactoryOzone;
12 class ImageCursors;
13 } // namespace ui
14
15 namespace ash {
16
17 // An NativeCursorManagerAsh which is used in Mushrome mode.
18 //
19 // NativeCursorManagerAshClassic implicitly communicates with ozone via
20 // ImageCursors and the window tree host, but in mushrome, we want to
21 // communicate with the window server purely through the mus interfaces.
22 //
23 // This doesn't mean that we can just cut out all ozone communication; we'll
24 // have to do what the mash does, which is install just the cursor factory part
25 // of ozone.
26 class ASH_EXPORT NativeCursorManagerAshMus : public NativeCursorManagerAsh {
27 public:
28 NativeCursorManagerAshMus();
29 ~NativeCursorManagerAshMus() override;
30
31 private:
32 // Overridden from NativeCursorManagerAsh:
33 void SetNativeCursorEnabled(bool enabled) override;
34 float GetScale() const override;
35 display::Display::Rotation GetRotation() const override;
36
37 // Overridden from ::wm::NativeCursorManager:
38 void SetDisplay(const display::Display& display,
39 ::wm::NativeCursorManagerDelegate* delegate) override;
40 void SetCursor(gfx::NativeCursor cursor,
41 ::wm::NativeCursorManagerDelegate* delegate) override;
42 void SetVisibility(bool visible,
43 ::wm::NativeCursorManagerDelegate* delegate) override;
44 void SetCursorSet(ui::CursorSetType cursor_set,
45 ::wm::NativeCursorManagerDelegate* delegate) override;
46 void SetMouseEventsEnabled(
47 bool enabled,
48 ::wm::NativeCursorManagerDelegate* delegate) override;
49
50 // The cursor location where the cursor was disabled.
51 gfx::Point disabled_cursor_location_;
52
53 bool native_cursor_enabled_ = true;
54
55 #if defined(USE_OZONE)
56 std::unique_ptr<ui::CursorDataFactoryOzone> cursor_factory_ozone_;
57 #endif
58
59 // Always nullptr when USE_OZONE is false.
60 std::unique_ptr<::ui::ImageCursors> image_cursors_;
61
62 DISALLOW_COPY_AND_ASSIGN(NativeCursorManagerAshMus);
63 };
64
65 } // namespace ash
66
67 #endif // ASH_WM_NATIVE_CURSOR_MANAGER_ASH_MUS_H_
OLDNEW
« no previous file with comments | « ash/wm/native_cursor_manager_ash_interactive_uitest.cc ('k') | ash/wm/native_cursor_manager_ash_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698