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

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

Issue 673713003: Create a NetworkConnect class and Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More virtual fixes Created 6 years, 2 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 8bac210722ee059626652a9368e5b54fcc0a2da0..de3dd10fe1ebc403540bb85c205cf9cd2796696b 100644
--- a/ash/system/chromeos/network/network_state_notifier.h
+++ b/ash/system/chromeos/network/network_state_notifier.h
@@ -25,6 +25,8 @@ class NetworkState;
namespace ash {
+class NetworkConnect;
+
// This class has two purposes:
// 1. ShowNetworkConnectError() gets called after any user initiated connect
// failure. This will handle displaying an error notification.
@@ -35,7 +37,7 @@ namespace ash {
class ASH_EXPORT NetworkStateNotifier :
public chromeos::NetworkStateHandlerObserver {
public:
- NetworkStateNotifier();
+ explicit NetworkStateNotifier(NetworkConnect* network_connect);
virtual ~NetworkStateNotifier();
// NetworkStateHandlerObserver
@@ -51,6 +53,16 @@ class ASH_EXPORT NetworkStateNotifier :
void ShowNetworkConnectError(const std::string& error_name,
const std::string& service_path);
+ // Show a mobile activation error notification.
+ void ShowMobileActivationError(const std::string& service_path);
+
+ // Removes any existing connect notifications.
+ void RemoveConnectNotification();
+
+ static const char kNetworkConnectNotificationId[];
+ static const char kNetworkActivateNotificationId[];
+ static const char kNetworkOutOfCreditsNotificationId[];
+
private:
void ConnectErrorPropertiesSucceeded(
const std::string& error_name,
@@ -73,6 +85,10 @@ class ASH_EXPORT NetworkStateNotifier :
void UpdateCellularOutOfCredits(const chromeos::NetworkState* cellular);
void UpdateCellularActivating(const chromeos::NetworkState* cellular);
+ // Invokes network_connect_->ShowNetworkSettings from a callback.
+ void ShowNetworkSettings(const std::string& service_path);
+
+ NetworkConnect* network_connect_; // unowned
std::string last_default_network_;
bool did_show_out_of_credits_;
base::Time out_of_credits_notify_time_;
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.cc ('k') | ash/system/chromeos/network/network_state_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698