| 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/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" |    9 #include "ash/common/system/tray/wm_system_tray_notifier.h" | 
|   10 #include "ash/common/wm_shell.h" |   10 #include "ash/common/wm_shell.h" | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|   31  |   31  | 
|   32 AshTouchExplorationManager::~AshTouchExplorationManager() { |   32 AshTouchExplorationManager::~AshTouchExplorationManager() { | 
|   33   WmSystemTrayNotifier* system_tray_notifier = |   33   WmSystemTrayNotifier* system_tray_notifier = | 
|   34       WmShell::Get()->system_tray_notifier(); |   34       WmShell::Get()->system_tray_notifier(); | 
|   35   if (system_tray_notifier) |   35   if (system_tray_notifier) | 
|   36     system_tray_notifier->RemoveAccessibilityObserver(this); |   36     system_tray_notifier->RemoveAccessibilityObserver(this); | 
|   37   Shell::GetInstance()->activation_client()->RemoveObserver(this); |   37   Shell::GetInstance()->activation_client()->RemoveObserver(this); | 
|   38 } |   38 } | 
|   39  |   39  | 
|   40 void AshTouchExplorationManager::OnAccessibilityModeChanged( |   40 void AshTouchExplorationManager::OnAccessibilityModeChanged( | 
|   41     ui::AccessibilityNotificationVisibility notify) { |   41     AccessibilityNotificationVisibility notify) { | 
|   42   UpdateTouchExplorationState(); |   42   UpdateTouchExplorationState(); | 
|   43 } |   43 } | 
|   44  |   44  | 
|   45 void AshTouchExplorationManager::SetOutputLevel(int volume) { |   45 void AshTouchExplorationManager::SetOutputLevel(int volume) { | 
|   46   if (volume > 0) { |   46   if (volume > 0) { | 
|   47     if (audio_handler_->IsOutputMuted()) { |   47     if (audio_handler_->IsOutputMuted()) { | 
|   48       audio_handler_->SetOutputMute(false); |   48       audio_handler_->SetOutputMute(false); | 
|   49     } |   49     } | 
|   50   } |   50   } | 
|   51   audio_handler_->SetOutputVolumePercent(volume); |   51   audio_handler_->SetOutputVolumePercent(volume); | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  127     touch_exploration_controller_.reset(); |  127     touch_exploration_controller_.reset(); | 
|  128   } |  128   } | 
|  129 } |  129 } | 
|  130  |  130  | 
|  131 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { |  131 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { | 
|  132   return !base::CommandLine::ForCurrentProcess()->HasSwitch( |  132   return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 
|  133       chromeos::switches::kDisableVolumeAdjustSound); |  133       chromeos::switches::kDisableVolumeAdjustSound); | 
|  134 } |  134 } | 
|  135  |  135  | 
|  136 }  // namespace ash |  136 }  // namespace ash | 
| OLD | NEW |