| 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/common/accessibility_delegate.h" |
| 7 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 8 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 8 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 9 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| 10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 11 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 12 #include "ui/aura/client/focus_client.h" | 13 #include "ui/aura/client/focus_client.h" |
| 13 #include "ui/wm/public/activation_client.h" | 14 #include "ui/wm/public/activation_client.h" |
| 14 | 15 |
| 15 namespace exo { | 16 namespace exo { |
| 16 | 17 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void WMHelperAsh::RemovePostTargetHandler(ui::EventHandler* handler) { | 83 void WMHelperAsh::RemovePostTargetHandler(ui::EventHandler* handler) { |
| 83 ash::Shell::GetInstance()->RemovePostTargetHandler(handler); | 84 ash::Shell::GetInstance()->RemovePostTargetHandler(handler); |
| 84 } | 85 } |
| 85 | 86 |
| 86 bool WMHelperAsh::IsMaximizeModeWindowManagerEnabled() const { | 87 bool WMHelperAsh::IsMaximizeModeWindowManagerEnabled() const { |
| 87 return ash::WmShell::Get() | 88 return ash::WmShell::Get() |
| 88 ->maximize_mode_controller() | 89 ->maximize_mode_controller() |
| 89 ->IsMaximizeModeWindowManagerEnabled(); | 90 ->IsMaximizeModeWindowManagerEnabled(); |
| 90 } | 91 } |
| 91 | 92 |
| 93 bool WMHelperAsh::IsSpokenFeedbackEnabled() const { |
| 94 return ash::WmShell::Get() |
| 95 ->accessibility_delegate() |
| 96 ->IsSpokenFeedbackEnabled(); |
| 97 } |
| 98 |
| 99 void WMHelperAsh::PlayEarcon(int sound_key) const { |
| 100 return ash::WmShell::Get()->accessibility_delegate()->PlayEarcon(sound_key); |
| 101 } |
| 102 |
| 92 void WMHelperAsh::OnWindowActivated( | 103 void WMHelperAsh::OnWindowActivated( |
| 93 aura::client::ActivationChangeObserver::ActivationReason reason, | 104 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 94 aura::Window* gained_active, | 105 aura::Window* gained_active, |
| 95 aura::Window* lost_active) { | 106 aura::Window* lost_active) { |
| 96 NotifyWindowActivated(gained_active, lost_active); | 107 NotifyWindowActivated(gained_active, lost_active); |
| 97 } | 108 } |
| 98 | 109 |
| 99 void WMHelperAsh::OnWindowFocused(aura::Window* gained_focus, | 110 void WMHelperAsh::OnWindowFocused(aura::Window* gained_focus, |
| 100 aura::Window* lost_focus) { | 111 aura::Window* lost_focus) { |
| 101 NotifyWindowFocused(gained_focus, lost_focus); | 112 NotifyWindowFocused(gained_focus, lost_focus); |
| 102 } | 113 } |
| 103 | 114 |
| 104 void WMHelperAsh::OnCursorVisibilityChanged(bool is_visible) { | 115 void WMHelperAsh::OnCursorVisibilityChanged(bool is_visible) { |
| 105 NotifyCursorVisibilityChanged(is_visible); | 116 NotifyCursorVisibilityChanged(is_visible); |
| 106 } | 117 } |
| 107 | 118 |
| 108 void WMHelperAsh::OnCursorSetChanged(ui::CursorSetType cursor_set) { | 119 void WMHelperAsh::OnCursorSetChanged(ui::CursorSetType cursor_set) { |
| 109 NotifyCursorSetChanged(cursor_set); | 120 NotifyCursorSetChanged(cursor_set); |
| 110 } | 121 } |
| 111 | 122 |
| 123 void WMHelperAsh::OnAccessibilityModeChanged( |
| 124 ash::AccessibilityNotificationVisibility notify) { |
| 125 NotifyAccessibilityModeChanged(); |
| 126 } |
| 127 |
| 112 void WMHelperAsh::OnMaximizeModeStarted() { | 128 void WMHelperAsh::OnMaximizeModeStarted() { |
| 113 NotifyMaximizeModeStarted(); | 129 NotifyMaximizeModeStarted(); |
| 114 } | 130 } |
| 115 | 131 |
| 116 void WMHelperAsh::OnMaximizeModeEnded() { | 132 void WMHelperAsh::OnMaximizeModeEnded() { |
| 117 NotifyMaximizeModeEnded(); | 133 NotifyMaximizeModeEnded(); |
| 118 } | 134 } |
| 119 | 135 |
| 120 } // namespace exo | 136 } // namespace exo |
| OLD | NEW |