OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
6 #define UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 6 #define UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 const std::string& service_path, | 84 const std::string& service_path, |
85 const base::DictionaryValue& shill_properties); | 85 const base::DictionaryValue& shill_properties); |
86 | 86 |
87 // Returns true if the default network changed. | 87 // Returns true if the default network changed. |
88 bool UpdateDefaultNetwork(const chromeos::NetworkState* network); | 88 bool UpdateDefaultNetwork(const chromeos::NetworkState* network); |
89 | 89 |
90 // Helper methods to update state and check for notifications. | 90 // Helper methods to update state and check for notifications. |
91 void UpdateCellularOutOfCredits(const chromeos::NetworkState* cellular); | 91 void UpdateCellularOutOfCredits(const chromeos::NetworkState* cellular); |
92 void UpdateCellularActivating(const chromeos::NetworkState* cellular); | 92 void UpdateCellularActivating(const chromeos::NetworkState* cellular); |
93 | 93 |
94 // Invokes network_connect_->ShowNetworkSettings from a callback. | 94 // Invokes network_connect_->ShowNetworkSettingsForPath from a callback. |
95 void ShowNetworkSettings(const std::string& service_path); | 95 void ShowNetworkSettingsForPath(const std::string& service_path); |
96 | 96 |
97 NetworkConnect* network_connect_; // unowned | 97 NetworkConnect* network_connect_; // unowned |
98 std::string last_default_network_; | 98 std::string last_default_network_; |
99 bool did_show_out_of_credits_; | 99 bool did_show_out_of_credits_; |
100 base::Time out_of_credits_notify_time_; | 100 base::Time out_of_credits_notify_time_; |
101 std::set<std::string> cellular_activating_; | 101 std::set<std::string> cellular_activating_; |
102 base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_; | 102 base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier); | 104 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace ui | 107 } // namespace ui |
108 | 108 |
109 #endif // UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 109 #endif // UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
OLD | NEW |