Chromium Code Reviews| 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/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/system/tray/system_tray_notifier.h" | 8 #include "ash/common/system/tray/system_tray_notifier.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/common/wm_window.h" | 10 #include "ash/common/wm_window.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()->GetName() == kExoShellSurfaceWindowName; | 138 wm::GetActiveWindow()->GetName() == kExoShellSurfaceWindowName && |
| 139 !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
|
reveman
2017/03/13 16:59:58
I think you also need to check that the shell surf
David Tseng
2017/03/16 20:00:37
I modified the check above (which indicates a pass
| |
| 140 chromeos::switches::kEnableChromeVoxArcSupport); | |
| 141 ; | |
| 139 | 142 |
| 140 const bool spoken_feedback_enabled = | 143 const bool spoken_feedback_enabled = |
| 141 WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled(); | 144 WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled(); |
| 142 | 145 |
| 143 if (!touch_accessibility_enabler_) { | 146 if (!touch_accessibility_enabler_) { |
| 144 // Always enable gesture to toggle spoken feedback. | 147 // Always enable gesture to toggle spoken feedback. |
| 145 touch_accessibility_enabler_.reset(new ui::TouchAccessibilityEnabler( | 148 touch_accessibility_enabler_.reset(new ui::TouchAccessibilityEnabler( |
| 146 root_window_controller_->GetRootWindow(), this)); | 149 root_window_controller_->GetRootWindow(), this)); |
| 147 } | 150 } |
| 148 | 151 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 167 touch_exploration_controller_.reset(); | 170 touch_exploration_controller_.reset(); |
| 168 } | 171 } |
| 169 } | 172 } |
| 170 | 173 |
| 171 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { | 174 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { |
| 172 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 175 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 173 chromeos::switches::kDisableVolumeAdjustSound); | 176 chromeos::switches::kDisableVolumeAdjustSound); |
| 174 } | 177 } |
| 175 | 178 |
| 176 } // namespace ash | 179 } // namespace ash |
| OLD | NEW |