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

Side by Side Diff: extensions/shell/browser/shell_audio_controller_chromeos.cc

Issue 945103002: Add a new audio extension event OnLevelChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 "extensions/shell/browser/shell_audio_controller_chromeos.h" 5 #include "extensions/shell/browser/shell_audio_controller_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chromeos/audio/audio_device.h" 9 #include "chromeos/audio/audio_device.h"
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 ShellAudioController::ShellAudioController() { 29 ShellAudioController::ShellAudioController() {
30 chromeos::CrasAudioHandler::Get()->AddAudioObserver(this); 30 chromeos::CrasAudioHandler::Get()->AddAudioObserver(this);
31 ActivateDevices(); 31 ActivateDevices();
32 } 32 }
33 33
34 ShellAudioController::~ShellAudioController() { 34 ShellAudioController::~ShellAudioController() {
35 chromeos::CrasAudioHandler::Get()->RemoveAudioObserver(this); 35 chromeos::CrasAudioHandler::Get()->RemoveAudioObserver(this);
36 } 36 }
37 37
38 void ShellAudioController::OnOutputVolumeChanged() {} 38 void ShellAudioController::OnOutputNodeVolumeChanged(uint64 node_id,
39 double volume) {
40 }
39 41
40 void ShellAudioController::OnOutputMuteChanged() {} 42 void ShellAudioController::OnOutputMuteChanged() {}
41 43
42 void ShellAudioController::OnInputGainChanged() {} 44 void ShellAudioController::OnInputGainChanged() {}
43 45
44 void ShellAudioController::OnInputMuteChanged() {} 46 void ShellAudioController::OnInputMuteChanged() {}
45 47
46 void ShellAudioController::OnAudioNodesChanged() { 48 void ShellAudioController::OnAudioNodesChanged() {
47 VLOG(1) << "Audio nodes changed"; 49 VLOG(1) << "Audio nodes changed";
48 ActivateDevices(); 50 ActivateDevices();
(...skipping 27 matching lines...) Expand all
76 } 78 }
77 if (best_output && best_output != handler->GetPrimaryActiveOutputNode()) { 79 if (best_output && best_output != handler->GetPrimaryActiveOutputNode()) {
78 const chromeos::AudioDevice* device = GetDevice(devices, best_output); 80 const chromeos::AudioDevice* device = GetDevice(devices, best_output);
79 DCHECK(device); 81 DCHECK(device);
80 VLOG(1) << "Activating output device: " << device->ToString(); 82 VLOG(1) << "Activating output device: " << device->ToString();
81 handler->SwitchToDevice(*device, true); 83 handler->SwitchToDevice(*device, true);
82 } 84 }
83 } 85 }
84 86
85 } // namespace extensions 87 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698