| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/volume_controller_chromeos.h" | 5 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/audio/audio_handler.h" | 10 #include "chrome/browser/chromeos/audio/audio_handler.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 void VolumeController::OnOutputMuteChanged() { | 139 void VolumeController::OnOutputMuteChanged() { |
| 140 DCHECK(UseNewAudioHandler()); | 140 DCHECK(UseNewAudioHandler()); |
| 141 chromeos::CrasAudioHandler* audio_handler = chromeos::CrasAudioHandler::Get(); | 141 chromeos::CrasAudioHandler* audio_handler = chromeos::CrasAudioHandler::Get(); |
| 142 extensions::DispatchVolumeChangedEvent( | 142 extensions::DispatchVolumeChangedEvent( |
| 143 audio_handler->GetOutputVolumePercent(), | 143 audio_handler->GetOutputVolumePercent(), |
| 144 audio_handler->IsOutputMuted()); | 144 audio_handler->IsOutputMuted()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool VolumeController::UseNewAudioHandler() const { | 147 bool VolumeController::UseNewAudioHandler() const { |
| 148 return CommandLine::ForCurrentProcess()-> | 148 return !CommandLine::ForCurrentProcess()-> |
| 149 HasSwitch(ash::switches::kAshEnableNewAudioHandler); | 149 HasSwitch(ash::switches::kAshDisableNewAudioHandler); |
| 150 } | 150 } |
| OLD | NEW |