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

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2890733005: Refactor backdrop that is currently used in the maximized mode. (Closed)
Patch Set: fix memory issue in AshTouchExplorationManager Created 3 years, 7 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/BUILD.gn ('k') | ash/test/workspace_controller_test_api.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/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
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
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/test/workspace_controller_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698