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

Side by Side Diff: chrome/browser/ui/ash/volume_controller_chromeos.cc

Issue 14678004: cros: Enable new cras audio handler by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix. Created 7 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/volume_controller_browsertest_chromeos.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698