Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2007863004: Fix the double-tap to click gesture in touch accessibility mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO for second display Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.h ('k') | ash/root_window_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/audio/sounds.h" 8 #include "ash/audio/sounds.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 gesture); 90 gesture);
91 } 91 }
92 92
93 void AshTouchExplorationManager::OnWindowActivated( 93 void AshTouchExplorationManager::OnWindowActivated(
94 aura::client::ActivationChangeObserver::ActivationReason reason, 94 aura::client::ActivationChangeObserver::ActivationReason reason,
95 aura::Window* gained_active, 95 aura::Window* gained_active,
96 aura::Window* lost_active) { 96 aura::Window* lost_active) {
97 UpdateTouchExplorationState(); 97 UpdateTouchExplorationState();
98 } 98 }
99 99
100 void AshTouchExplorationManager::SetTouchAccessibilityAnchorPoint(
101 const gfx::Point& anchor_point) {
102 if (touch_exploration_controller_) {
103 touch_exploration_controller_->SetTouchAccessibilityAnchorPoint(
104 anchor_point);
105 }
106 }
107
100 void AshTouchExplorationManager::UpdateTouchExplorationState() { 108 void AshTouchExplorationManager::UpdateTouchExplorationState() {
101 // Comes from components/exo/shell_surface.cc. 109 // Comes from components/exo/shell_surface.cc.
102 const char kExoShellSurfaceWindowName[] = "ExoShellSurface"; 110 const char kExoShellSurfaceWindowName[] = "ExoShellSurface";
103 111
104 // See crbug.com/603745 for more details. 112 // See crbug.com/603745 for more details.
105 bool pass_through_surface = 113 bool pass_through_surface =
106 wm::GetActiveWindow() && 114 wm::GetActiveWindow() &&
107 wm::GetActiveWindow()->name() == kExoShellSurfaceWindowName; 115 wm::GetActiveWindow()->name() == kExoShellSurfaceWindowName;
108 116
109 AccessibilityDelegate* delegate = 117 AccessibilityDelegate* delegate =
110 Shell::GetInstance()->accessibility_delegate(); 118 Shell::GetInstance()->accessibility_delegate();
111 bool enabled = delegate->IsSpokenFeedbackEnabled(); 119 bool enabled = delegate->IsSpokenFeedbackEnabled();
112 120
113 if (!pass_through_surface && enabled && 121 if (!pass_through_surface && enabled &&
114 !touch_exploration_controller_.get()) { 122 !touch_exploration_controller_.get()) {
115 touch_exploration_controller_.reset(new ui::TouchExplorationController( 123 touch_exploration_controller_.reset(new ui::TouchExplorationController(
116 root_window_controller_->GetRootWindow(), this)); 124 root_window_controller_->GetRootWindow(), this));
117 } else if (!enabled || pass_through_surface) { 125 } else if (!enabled || pass_through_surface) {
118 touch_exploration_controller_.reset(); 126 touch_exploration_controller_.reset();
119 } 127 }
120 } 128 }
121 129
122 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { 130 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() {
123 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 131 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
124 chromeos::switches::kDisableVolumeAdjustSound); 132 chromeos::switches::kDisableVolumeAdjustSound);
125 } 133 }
126 134
127 } // namespace ash 135 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.h ('k') | ash/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698