diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 01:11:00 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 01:11:00 +0000 |
commit | 83b2b84c1e4bc8434630f58e88bcf1a93b33ded6 (patch) | |
tree | e6612ff5286a73ed99df758ee600f331396e51d6 /chrome/browser/chromeos/network_message_observer.cc | |
parent | d8f1004bcf08a2c0d629198a3695808b3a400487 (diff) | |
download | chromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.zip chromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.tar.gz chromium_src-83b2b84c1e4bc8434630f58e88bcf1a93b33ded6.tar.bz2 |
Add SystemTrayObservers
Once there is more than one SystemTray instance, we will need to support observer lists so that multiple tray items can be notified.
Hosting the observer lists in a separate class owned by ass::SystemTrayDelegate seemed like the most forward approach.
BUG=159543
For ash.gyp:
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11312139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/network_message_observer.cc')
-rw-r--r-- | chrome/browser/chromeos/network_message_observer.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc index 5e24899..5501d76 100644 --- a/chrome/browser/chromeos/network_message_observer.cc +++ b/chrome/browser/chromeos/network_message_observer.cc @@ -8,6 +8,7 @@ #include "ash/shell_delegate.h" #include "ash/system/chromeos/network/network_observer.h" #include "ash/system/tray/system_tray.h" +#include "ash/system/tray/system_tray_notifier.h" #include "base/bind.h" #include "base/callback.h" #include "base/stl_util.h" @@ -71,8 +72,8 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate { } void Hide() { - ash::Shell::GetInstance()->system_tray()->network_observer()-> - ClearNetworkMessage(error_type_); + ash::Shell::GetInstance()->system_tray_notifier()-> + NotifyClearNetworkMessage(error_type_); } void SetTitle(const string16& title) { @@ -86,8 +87,8 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate { callback_ = callback; std::vector<string16> links; links.push_back(link_text); - ash::Shell::GetInstance()->system_tray()->network_observer()-> - SetNetworkMessage(this, error_type_, title_, message, links); + ash::Shell::GetInstance()->system_tray_notifier()->NotifySetNetworkMessage( + this, error_type_, title_, message, links); } void ShowAlways(const string16& message, |