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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10830027: Implement new slider control and disable the volume control when audio is muted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move enum from .h to .cc. Created 8 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/audio/audio_handler.cc ('k') | ui/resources/ui_resources.grd » ('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 (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/chromeos/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 } 937 }
938 accessibility::Speak(connection_string.c_str()); 938 accessibility::Speak(connection_string.c_str());
939 } 939 }
940 940
941 // Overridden from AudioHandler::VolumeObserver. 941 // Overridden from AudioHandler::VolumeObserver.
942 virtual void OnVolumeChanged() OVERRIDE { 942 virtual void OnVolumeChanged() OVERRIDE {
943 float level = AudioHandler::GetInstance()->GetVolumePercent() / 100.f; 943 float level = AudioHandler::GetInstance()->GetVolumePercent() / 100.f;
944 tray_->audio_observer()->OnVolumeChanged(level); 944 tray_->audio_observer()->OnVolumeChanged(level);
945 } 945 }
946 946
947 // Overridden from AudioHandler::VolumeObserver.
948 virtual void OnMuteToggled() OVERRIDE {
949 tray_->audio_observer()->OnMuteToggled();
950 }
951
947 // Overridden from PowerManagerClient::Observer. 952 // Overridden from PowerManagerClient::Observer.
948 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE { 953 virtual void BrightnessChanged(int level, bool user_initiated) OVERRIDE {
949 tray_->brightness_observer()-> 954 tray_->brightness_observer()->
950 OnBrightnessChanged(static_cast<double>(level), user_initiated); 955 OnBrightnessChanged(static_cast<double>(level), user_initiated);
951 } 956 }
952 957
953 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE { 958 virtual void PowerChanged(const PowerSupplyStatus& power_status) OVERRIDE {
954 power_supply_status_ = power_status; 959 power_supply_status_ = power_status;
955 FOR_EACH_OBSERVER(ash::PowerStatusObserver, tray_->power_status_observers(), 960 FOR_EACH_OBSERVER(ash::PowerStatusObserver, tray_->power_status_observers(),
956 OnPowerStatusChanged(power_status)); 961 OnPowerStatusChanged(power_status));
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1258 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1254 }; 1259 };
1255 1260
1256 } // namespace 1261 } // namespace
1257 1262
1258 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1263 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1259 return new chromeos::SystemTrayDelegate(tray); 1264 return new chromeos::SystemTrayDelegate(tray);
1260 } 1265 }
1261 1266
1262 } // namespace chromeos 1267 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/audio/audio_handler.cc ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698