| 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/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shared/app_types.h" | 9 #include "ash/shared/app_types.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 if (spoken_feedback_enabled) { | 162 if (spoken_feedback_enabled) { |
| 163 if (!touch_exploration_controller_.get()) { | 163 if (!touch_exploration_controller_.get()) { |
| 164 touch_exploration_controller_ = | 164 touch_exploration_controller_ = |
| 165 base::MakeUnique<ui::TouchExplorationController>( | 165 base::MakeUnique<ui::TouchExplorationController>( |
| 166 root_window_controller_->GetRootWindow(), this, | 166 root_window_controller_->GetRootWindow(), this, |
| 167 touch_accessibility_enabler_.get()); | 167 touch_accessibility_enabler_.get()); |
| 168 } | 168 } |
| 169 if (pass_through_surface) { | 169 if (pass_through_surface) { |
| 170 const gfx::Rect& work_area = root_window_controller_->GetWindow() | 170 const gfx::Rect work_area = root_window_controller_->GetWindow() |
| 171 ->GetDisplayNearestWindow() | 171 ->GetDisplayNearestWindow() |
| 172 .work_area(); | 172 .work_area(); |
| 173 touch_exploration_controller_->SetExcludeBounds(work_area); | 173 touch_exploration_controller_->SetExcludeBounds(work_area); |
| 174 SilenceSpokenFeedback(); | 174 SilenceSpokenFeedback(); |
| 175 Shell::Get()->accessibility_delegate()->ClearFocusHighlight(); | 175 Shell::Get()->accessibility_delegate()->ClearFocusHighlight(); |
| 176 } else { | 176 } else { |
| 177 touch_exploration_controller_->SetExcludeBounds(gfx::Rect()); | 177 touch_exploration_controller_->SetExcludeBounds(gfx::Rect()); |
| 178 } | 178 } |
| 179 } else { | 179 } else { |
| 180 touch_exploration_controller_.reset(); | 180 touch_exploration_controller_.reset(); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { | 184 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { |
| 185 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 185 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 186 chromeos::switches::kDisableVolumeAdjustSound); | 186 chromeos::switches::kDisableVolumeAdjustSound); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace ash | 189 } // namespace ash |
| OLD | NEW |