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

Unified Diff: ash/system/chromeos/network/network_state_notifier.h

Issue 12779022: Add Ash notification UI for OutOfCredits network property (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add support for R26 Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/network/network_state_notifier.h
diff --git a/ash/system/chromeos/network/network_state_notifier.h b/ash/system/chromeos/network/network_state_notifier.h
index 129e50782420ec41850d878be73a883b3dde177f..0832184dc741b244509ce6c2ef74e26a13479382 100644
--- a/ash/system/chromeos/network/network_state_notifier.h
+++ b/ash/system/chromeos/network/network_state_notifier.h
@@ -8,8 +8,10 @@
#include <map>
#include "ash/ash_export.h"
+#include "ash/system/chromeos/network/network_tray_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/time.h"
#include "chromeos/network/network_state_handler_observer.h"
namespace ash {
@@ -18,14 +20,24 @@ namespace internal {
// This class observes NetworkStateHandler and generates notifications
// on connection failures.
class ASH_EXPORT NetworkStateNotifier :
- public chromeos::NetworkStateHandlerObserver {
+ public chromeos::NetworkStateHandlerObserver,
+ public NetworkTrayDelegate {
public:
NetworkStateNotifier();
virtual ~NetworkStateNotifier();
// NetworkStateHandlerObserver
+ virtual void DefaultNetworkChanged(
+ const chromeos::NetworkState* network) OVERRIDE;
virtual void NetworkConnectionStateChanged(
const chromeos::NetworkState* network) OVERRIDE;
+ virtual void NetworkPropertiesUpdated(
+ const chromeos::NetworkState* network) OVERRIDE;
+
+ // NetworkTrayDelegate
+ virtual void NotificationLinkClicked(
+ NetworkObserver::MessageType message_type,
+ size_t link_index) OVERRIDE;
private:
typedef std::map<std::string, std::string> CachedStateMap;
@@ -33,6 +45,10 @@ class ASH_EXPORT NetworkStateNotifier :
void InitializeNetworks();
CachedStateMap cached_state_;
+ std::string last_default_network_;
+ std::string cellular_network_;
+ bool cellular_out_of_credits_;
+ base::Time out_of_credits_notify_time_;
DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier);
};
« no previous file with comments | « ash/system/chromeos/network/network_observer.h ('k') | ash/system/chromeos/network/network_state_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698