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

Side by Side Diff: components/exo/wm_helper_ash.h

Issue 2780623002: exo: Fix multi-display hardware cursor (Closed)
Patch Set: Fix accessibility test 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_EXO_WM_HELPER_ASH_H_ 5 #ifndef COMPONENTS_EXO_WM_HELPER_ASH_H_
6 #define COMPONENTS_EXO_WM_HELPER_ASH_H_ 6 #define COMPONENTS_EXO_WM_HELPER_ASH_H_
7 7
8 #include "ash/shell_observer.h" 8 #include "ash/shell_observer.h"
9 #include "ash/wm/ash_native_cursor_manager.h"
9 #include "ash/wm_display_observer.h" 10 #include "ash/wm_display_observer.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "components/exo/wm_helper.h" 12 #include "components/exo/wm_helper.h"
12 #include "ui/aura/client/cursor_client_observer.h" 13 #include "ui/aura/client/cursor_client_observer.h"
13 #include "ui/aura/client/focus_change_observer.h" 14 #include "ui/aura/client/focus_change_observer.h"
14 #include "ui/events/devices/input_device_event_observer.h" 15 #include "ui/events/devices/input_device_event_observer.h"
15 #include "ui/wm/public/activation_change_observer.h" 16 #include "ui/wm/public/activation_change_observer.h"
16 17
17 namespace exo { 18 namespace exo {
18 19
19 // A helper class for accessing WindowManager related features. 20 // A helper class for accessing WindowManager related features.
20 class WMHelperAsh : public WMHelper, 21 class WMHelperAsh : public WMHelper,
21 public aura::client::ActivationChangeObserver, 22 public aura::client::ActivationChangeObserver,
22 public aura::client::FocusChangeObserver, 23 public aura::client::FocusChangeObserver,
23 public aura::client::CursorClientObserver, 24 public aura::client::CursorClientObserver,
25 public ash::AshNativeCursorManager::Observer,
24 public ash::ShellObserver, 26 public ash::ShellObserver,
25 public ash::WmDisplayObserver, 27 public ash::WmDisplayObserver,
26 public ui::InputDeviceEventObserver { 28 public ui::InputDeviceEventObserver {
27 public: 29 public:
28 WMHelperAsh(); 30 WMHelperAsh();
29 ~WMHelperAsh() override; 31 ~WMHelperAsh() override;
30 32
31 // Overridden from WMHelper: 33 // Overridden from WMHelper:
32 const display::ManagedDisplayInfo GetDisplayInfo( 34 const display::ManagedDisplayInfo& GetDisplayInfo(
33 int64_t display_id) const override; 35 int64_t display_id) const override;
34 aura::Window* GetContainer(int container_id) override; 36 aura::Window* GetContainer(int64_t display_id, int container_id) override;
35 aura::Window* GetActiveWindow() const override; 37 aura::Window* GetActiveWindow() const override;
36 aura::Window* GetFocusedWindow() const override; 38 aura::Window* GetFocusedWindow() const override;
37 ui::CursorSetType GetCursorSet() const override; 39 ui::CursorSetType GetCursorSet() const override;
40 const display::Display& GetCursorDisplay() const override;
38 void AddPreTargetHandler(ui::EventHandler* handler) override; 41 void AddPreTargetHandler(ui::EventHandler* handler) override;
39 void PrependPreTargetHandler(ui::EventHandler* handler) override; 42 void PrependPreTargetHandler(ui::EventHandler* handler) override;
40 void RemovePreTargetHandler(ui::EventHandler* handler) override; 43 void RemovePreTargetHandler(ui::EventHandler* handler) override;
41 void AddPostTargetHandler(ui::EventHandler* handler) override; 44 void AddPostTargetHandler(ui::EventHandler* handler) override;
42 void RemovePostTargetHandler(ui::EventHandler* handler) override; 45 void RemovePostTargetHandler(ui::EventHandler* handler) override;
43 bool IsMaximizeModeWindowManagerEnabled() const override; 46 bool IsMaximizeModeWindowManagerEnabled() const override;
44 47
45 // Overridden from aura::client::ActivationChangeObserver: 48 // Overridden from aura::client::ActivationChangeObserver:
46 void OnWindowActivated( 49 void OnWindowActivated(
47 aura::client::ActivationChangeObserver::ActivationReason reason, 50 aura::client::ActivationChangeObserver::ActivationReason reason,
48 aura::Window* gained_active, 51 aura::Window* gained_active,
49 aura::Window* lost_active) override; 52 aura::Window* lost_active) override;
50 53
51 // Overridden from aura::client::FocusChangeObserver: 54 // Overridden from aura::client::FocusChangeObserver:
52 void OnWindowFocused(aura::Window* gained_focus, 55 void OnWindowFocused(aura::Window* gained_focus,
53 aura::Window* lost_focus) override; 56 aura::Window* lost_focus) override;
54 57
55 // Overridden from aura::client::CursorClientObserver: 58 // Overridden from aura::client::CursorClientObserver:
56 void OnCursorVisibilityChanged(bool is_visible) override; 59 void OnCursorVisibilityChanged(bool is_visible) override;
57 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; 60 void OnCursorSetChanged(ui::CursorSetType cursor_set) override;
58 61
62 // Overridden from ash::AshNativeCursorManager::Observer:
63 void OnCursorDisplayChanged(const display::Display& display) override;
64
59 // Overridden from ash::ShellObserver: 65 // Overridden from ash::ShellObserver:
60 void OnMaximizeModeStarted() override; 66 void OnMaximizeModeStarted() override;
61 void OnMaximizeModeEnding() override; 67 void OnMaximizeModeEnding() override;
62 void OnMaximizeModeEnded() override; 68 void OnMaximizeModeEnded() override;
63 69
64 // Overridden from ash::WmDisplayObserver: 70 // Overridden from ash::WmDisplayObserver:
65 void OnDisplayConfigurationChanged() override; 71 void OnDisplayConfigurationChanged() override;
66 72
67 // Overridden from ui::InputDeviceEventObserver: 73 // Overridden from ui::InputDeviceEventObserver:
68 void OnKeyboardDeviceConfigurationChanged() override; 74 void OnKeyboardDeviceConfigurationChanged() override;
69 75
70 private: 76 private:
71 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); 77 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh);
72 }; 78 };
73 79
74 } // namespace exo 80 } // namespace exo
75 81
76 #endif // COMPONENTS_EXO_WM_HELPER_H_ 82 #endif // COMPONENTS_EXO_WM_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698