From 39216bee9402bb343519cdb4cd517dc5120531b4 Mon Sep 17 00:00:00 2001 From: "chocobo@chromium.org" Date: Tue, 1 Jun 2010 17:54:36 +0000 Subject: Added notification for network message. BUG=chromium-os:2556 TEST=manually connect to network with wrong password and see notification. Review URL: http://codereview.chromium.org/2074017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48641 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_init.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'chrome/browser/browser_init.cc') diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 7e5b2fd..9213502 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -69,9 +69,11 @@ #include "chrome/browser/chromeos/browser_notification_observers.h" #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/mount_library.h" -#include "chrome/browser/chromeos/cros/power_library.h" +#include "chrome/browser/chromeos/cros/network_library.h" +#include "chrome/browser/chromeos/cros/mount_library.h" #include "chrome/browser/chromeos/gview_request_interceptor.h" #include "chrome/browser/chromeos/low_battery_observer.h" +#include "chrome/browser/chromeos/network_message_observer.h" #include "chrome/browser/chromeos/system_key_event_listener.h" #include "chrome/browser/chromeos/usb_mount_observer.h" #include "chrome/browser/chromeos/wm_message_listener.h" @@ -420,9 +422,15 @@ bool BrowserInit::LaunchBrowser( // This observer is a singleton. It is never deleted but the pointer is kept // in a global so that it isn't reported as a leak. - static chromeos::LowBatteryObserver* observer = + static chromeos::LowBatteryObserver* low_battery_observer = new chromeos::LowBatteryObserver(profile); - chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver(observer); + chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver( + low_battery_observer); + + static chromeos::NetworkMessageObserver* network_message_observer = + new chromeos::NetworkMessageObserver(profile); + chromeos::CrosLibrary::Get()->GetNetworkLibrary()->AddObserver( + network_message_observer); // Creates the SystemKeyEventListener to listen for keypress messages // regardless of what window has focus. -- cgit v1.1