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

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2074913005: Convert TrayAccessibility to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webnotification
Patch Set: rebase 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/common/accessibility_delegate.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/audio/sounds.h" 7 #include "ash/audio/sounds.h"
8 #include "ash/common/accessibility_delegate.h" 8 #include "ash/common/accessibility_delegate.h"
9 #include "ash/common/system/tray/wm_system_tray_notifier.h"
10 #include "ash/common/wm_shell.h"
9 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 12 #include "ash/shell.h"
11 #include "ash/system/tray/system_tray_notifier.h"
12 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
13 #include "base/command_line.h" 14 #include "base/command_line.h"
14 #include "chromeos/audio/chromeos_sounds.h" 15 #include "chromeos/audio/chromeos_sounds.h"
15 #include "chromeos/audio/cras_audio_handler.h" 16 #include "chromeos/audio/cras_audio_handler.h"
16 #include "chromeos/chromeos_switches.h" 17 #include "chromeos/chromeos_switches.h"
17 #include "ui/chromeos/touch_exploration_controller.h" 18 #include "ui/chromeos/touch_exploration_controller.h"
18 #include "ui/wm/public/activation_client.h" 19 #include "ui/wm/public/activation_client.h"
19 20
20 namespace ash { 21 namespace ash {
21 22
22 AshTouchExplorationManager::AshTouchExplorationManager( 23 AshTouchExplorationManager::AshTouchExplorationManager(
23 RootWindowController* root_window_controller) 24 RootWindowController* root_window_controller)
24 : root_window_controller_(root_window_controller), 25 : root_window_controller_(root_window_controller),
25 audio_handler_(chromeos::CrasAudioHandler::Get()) { 26 audio_handler_(chromeos::CrasAudioHandler::Get()) {
26 Shell::GetInstance()->system_tray_notifier()->AddAccessibilityObserver(this); 27 WmShell::Get()->system_tray_notifier()->AddAccessibilityObserver(this);
27 ash::Shell::GetInstance()->activation_client()->AddObserver(this); 28 Shell::GetInstance()->activation_client()->AddObserver(this);
28 UpdateTouchExplorationState(); 29 UpdateTouchExplorationState();
29 } 30 }
30 31
31 AshTouchExplorationManager::~AshTouchExplorationManager() { 32 AshTouchExplorationManager::~AshTouchExplorationManager() {
32 SystemTrayNotifier* system_tray_notifier = 33 WmSystemTrayNotifier* system_tray_notifier =
33 Shell::GetInstance()->system_tray_notifier(); 34 WmShell::Get()->system_tray_notifier();
34 if (system_tray_notifier) 35 if (system_tray_notifier)
35 system_tray_notifier->RemoveAccessibilityObserver(this); 36 system_tray_notifier->RemoveAccessibilityObserver(this);
36 ash::Shell::GetInstance()->activation_client()->RemoveObserver(this); 37 Shell::GetInstance()->activation_client()->RemoveObserver(this);
37 } 38 }
38 39
39 void AshTouchExplorationManager::OnAccessibilityModeChanged( 40 void AshTouchExplorationManager::OnAccessibilityModeChanged(
40 ui::AccessibilityNotificationVisibility notify) { 41 ui::AccessibilityNotificationVisibility notify) {
41 UpdateTouchExplorationState(); 42 UpdateTouchExplorationState();
42 } 43 }
43 44
44 void AshTouchExplorationManager::SetOutputLevel(int volume) { 45 void AshTouchExplorationManager::SetOutputLevel(int volume) {
45 if (volume > 0) { 46 if (volume > 0) {
46 if (audio_handler_->IsOutputMuted()) { 47 if (audio_handler_->IsOutputMuted()) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 touch_exploration_controller_.reset(); 127 touch_exploration_controller_.reset();
127 } 128 }
128 } 129 }
129 130
130 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { 131 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() {
131 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 132 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
132 chromeos::switches::kDisableVolumeAdjustSound); 133 chromeos::switches::kDisableVolumeAdjustSound);
133 } 134 }
134 135
135 } // namespace ash 136 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.h ('k') | ash/common/accessibility_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698