Index: chrome/browser/chromeos/system_key_event_listener.h |
=================================================================== |
--- chrome/browser/chromeos/system_key_event_listener.h (revision 118753) |
+++ chrome/browser/chromeos/system_key_event_listener.h (working copy) |
@@ -28,7 +28,17 @@ |
class CapsLockObserver { |
public: |
virtual void OnCapsLockChange(bool enabled) = 0; |
+ protected: |
+ virtual ~CapsLockObserver() {} |
}; |
+ |
+ class StatusAreaVolumeObserver { |
+ public: |
+ virtual void ShowStatusAreaVolume(bool show) = 0; |
+ protected: |
+ virtual ~StatusAreaVolumeObserver() {} |
+ }; |
+ |
static void Initialize(); |
static void Shutdown(); |
// GetInstance returns NULL if not initialized or if already shutdown. |
@@ -39,6 +49,9 @@ |
void AddCapsLockObserver(CapsLockObserver* observer); |
void RemoveCapsLockObserver(CapsLockObserver* observer); |
+ void AddStatusAreaVolumeObserver(StatusAreaVolumeObserver* observer); |
+ void RemoveStatusAreaVolumeObserver(StatusAreaVolumeObserver* observer); |
+ |
private: |
// Defines the delete on exit Singleton traits we like. Best to have this |
// and const/dest private as recommended for Singletons. |
@@ -78,6 +91,7 @@ |
void OnVolumeDown(); |
void OnVolumeUp(); |
void OnCapsLock(bool enabled); |
+ void ShowStatusAreaVolume(bool show); |
// Displays the volume bubble for the current volume and muting status. |
// Also hides the brightness bubble if it's being shown. |
@@ -99,10 +113,14 @@ |
bool stopped_; |
+ bool show_status_area_volume_; |
xiyuan
2012/01/25 04:43:12
Add a comment that this controls whether or not to
achuithb
2012/01/25 10:46:06
Done.
|
+ |
const unsigned int num_lock_mask_; |
bool num_lock_is_on_; |
bool caps_lock_is_on_; |
+ |
ObserverList<CapsLockObserver> caps_lock_observers_; |
+ ObserverList<StatusAreaVolumeObserver> status_area_volume_observers_; |
// Base X ID for events from the XKB extension. |
int xkb_event_base_; |