| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/ash_touch_exploration_manager_chromeos.h" | 5 #include "ash/ash_touch_exploration_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_root_window_controller_aura.h" | 7 #include "ash/aura/wm_root_window_controller_aura.h" |
| 8 #include "ash/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/system/tray/system_tray_notifier.h" | 9 #include "ash/common/system/tray/system_tray_notifier.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 void AshTouchExplorationManager::UpdateTouchExplorationState() { | 131 void AshTouchExplorationManager::UpdateTouchExplorationState() { |
| 132 // Comes from components/exo/shell_surface.cc. | 132 // Comes from components/exo/shell_surface.cc. |
| 133 const char kExoShellSurfaceWindowName[] = "ExoShellSurface"; | 133 const char kExoShellSurfaceWindowName[] = "ExoShellSurface"; |
| 134 | 134 |
| 135 // See crbug.com/603745 for more details. | 135 // See crbug.com/603745 for more details. |
| 136 const bool pass_through_surface = | 136 const bool pass_through_surface = |
| 137 wm::GetActiveWindow() && | 137 wm::GetActiveWindow() && |
| 138 wm::GetActiveWindow()->name() == kExoShellSurfaceWindowName; | 138 wm::GetActiveWindow()->GetName() == kExoShellSurfaceWindowName; |
| 139 | 139 |
| 140 const bool spoken_feedback_enabled = | 140 const bool spoken_feedback_enabled = |
| 141 WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled(); | 141 WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled(); |
| 142 | 142 |
| 143 if (!touch_accessibility_enabler_) { | 143 if (!touch_accessibility_enabler_) { |
| 144 // Always enable gesture to toggle spoken feedback. | 144 // Always enable gesture to toggle spoken feedback. |
| 145 touch_accessibility_enabler_.reset(new ui::TouchAccessibilityEnabler( | 145 touch_accessibility_enabler_.reset(new ui::TouchAccessibilityEnabler( |
| 146 root_window_controller_->GetRootWindow(), this)); | 146 root_window_controller_->GetRootWindow(), this)); |
| 147 } | 147 } |
| 148 | 148 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 169 touch_exploration_controller_.reset(); | 169 touch_exploration_controller_.reset(); |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { | 173 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { |
| 174 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 174 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 175 chromeos::switches::kDisableVolumeAdjustSound); | 175 chromeos::switches::kDisableVolumeAdjustSound); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace ash | 178 } // namespace ash |
| OLD | NEW |