OLD | NEW |
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 #include "components/exo/wm_helper_ash.h" | 5 #include "components/exo/wm_helper_ash.h" |
6 | 6 |
7 #include "ash/public/cpp/config.h" | 7 #include "ash/public/cpp/config.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_port.h" | 9 #include "ash/shell_port.h" |
10 #include "ash/system/tray/system_tray_notifier.h" | 10 #include "ash/system/tray/system_tray_notifier.h" |
11 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 11 #include "ash/wm/tablet_mode/tablet_mode_controller.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "ui/aura/client/focus_client.h" | 13 #include "ui/aura/client/focus_client.h" |
14 #include "ui/display/manager/display_manager.h" | 14 #include "ui/display/manager/display_manager.h" |
15 #include "ui/events/devices/input_device_manager.h" | 15 #include "ui/events/devices/input_device_manager.h" |
16 #include "ui/wm/public/activation_client.h" | 16 #include "ui/wm/public/activation_client.h" |
17 | 17 |
18 namespace exo { | 18 namespace exo { |
19 | 19 |
20 //////////////////////////////////////////////////////////////////////////////// | 20 //////////////////////////////////////////////////////////////////////////////// |
21 // WMHelperAsh, public: | 21 // WMHelperAsh, public: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 void WMHelperAsh::AddPostTargetHandler(ui::EventHandler* handler) { | 95 void WMHelperAsh::AddPostTargetHandler(ui::EventHandler* handler) { |
96 ash::Shell::Get()->AddPostTargetHandler(handler); | 96 ash::Shell::Get()->AddPostTargetHandler(handler); |
97 } | 97 } |
98 | 98 |
99 void WMHelperAsh::RemovePostTargetHandler(ui::EventHandler* handler) { | 99 void WMHelperAsh::RemovePostTargetHandler(ui::EventHandler* handler) { |
100 ash::Shell::Get()->RemovePostTargetHandler(handler); | 100 ash::Shell::Get()->RemovePostTargetHandler(handler); |
101 } | 101 } |
102 | 102 |
103 bool WMHelperAsh::IsMaximizeModeWindowManagerEnabled() const { | 103 bool WMHelperAsh::IsTabletModeWindowManagerEnabled() const { |
104 return ash::Shell::Get() | 104 return ash::Shell::Get() |
105 ->maximize_mode_controller() | 105 ->tablet_mode_controller() |
106 ->IsMaximizeModeWindowManagerEnabled(); | 106 ->IsTabletModeWindowManagerEnabled(); |
107 } | 107 } |
108 | 108 |
109 void WMHelperAsh::OnWindowActivated( | 109 void WMHelperAsh::OnWindowActivated( |
110 aura::client::ActivationChangeObserver::ActivationReason reason, | 110 aura::client::ActivationChangeObserver::ActivationReason reason, |
111 aura::Window* gained_active, | 111 aura::Window* gained_active, |
112 aura::Window* lost_active) { | 112 aura::Window* lost_active) { |
113 NotifyWindowActivated(gained_active, lost_active); | 113 NotifyWindowActivated(gained_active, lost_active); |
114 } | 114 } |
115 | 115 |
116 void WMHelperAsh::OnWindowFocused(aura::Window* gained_focus, | 116 void WMHelperAsh::OnWindowFocused(aura::Window* gained_focus, |
117 aura::Window* lost_focus) { | 117 aura::Window* lost_focus) { |
118 NotifyWindowFocused(gained_focus, lost_focus); | 118 NotifyWindowFocused(gained_focus, lost_focus); |
119 } | 119 } |
120 | 120 |
121 void WMHelperAsh::OnCursorVisibilityChanged(bool is_visible) { | 121 void WMHelperAsh::OnCursorVisibilityChanged(bool is_visible) { |
122 NotifyCursorVisibilityChanged(is_visible); | 122 NotifyCursorVisibilityChanged(is_visible); |
123 } | 123 } |
124 | 124 |
125 void WMHelperAsh::OnCursorSetChanged(ui::CursorSetType cursor_set) { | 125 void WMHelperAsh::OnCursorSetChanged(ui::CursorSetType cursor_set) { |
126 NotifyCursorSetChanged(cursor_set); | 126 NotifyCursorSetChanged(cursor_set); |
127 } | 127 } |
128 | 128 |
129 void WMHelperAsh::OnMaximizeModeStarted() { | 129 void WMHelperAsh::OnTabletModeStarted() { |
130 NotifyMaximizeModeStarted(); | 130 NotifyTabletModeStarted(); |
131 } | 131 } |
132 | 132 |
133 void WMHelperAsh::OnMaximizeModeEnding() { | 133 void WMHelperAsh::OnTabletModeEnding() { |
134 NotifyMaximizeModeEnding(); | 134 NotifyTabletModeEnding(); |
135 } | 135 } |
136 | 136 |
137 void WMHelperAsh::OnMaximizeModeEnded() { | 137 void WMHelperAsh::OnTabletModeEnded() { |
138 NotifyMaximizeModeEnded(); | 138 NotifyTabletModeEnded(); |
139 } | 139 } |
140 | 140 |
141 void WMHelperAsh::OnDisplayConfigurationChanged() { | 141 void WMHelperAsh::OnDisplayConfigurationChanged() { |
142 NotifyDisplayConfigurationChanged(); | 142 NotifyDisplayConfigurationChanged(); |
143 } | 143 } |
144 | 144 |
145 void WMHelperAsh::OnKeyboardDeviceConfigurationChanged() { | 145 void WMHelperAsh::OnKeyboardDeviceConfigurationChanged() { |
146 NotifyKeyboardDeviceConfigurationChanged(); | 146 NotifyKeyboardDeviceConfigurationChanged(); |
147 } | 147 } |
148 | 148 |
149 } // namespace exo | 149 } // namespace exo |
OLD | NEW |