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

Unified Diff: ash/system/chromeos/network/network_icon_animation.cc

Issue 12221112: Update Ash network icon code and integrate with tray (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 7 years, 10 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_icon_animation.cc
diff --git a/ash/system/chromeos/network/network_icon_animation.cc b/ash/system/chromeos/network/network_icon_animation.cc
index 55cc7f03c53346da50abedc5f7bac354dbb781cc..55da41e64df01d43dc4a3121f21aa00a559dabf9 100644
--- a/ash/system/chromeos/network/network_icon_animation.cc
+++ b/ash/system/chromeos/network/network_icon_animation.cc
@@ -48,6 +48,17 @@ void NetworkIconAnimation::RemoveObserver(AnimationObserver* observer) {
animation_.Stop();
}
+void NetworkIconAnimation::AddNetwork(const std::string& network_id) {
+ networks_.insert(network_id);
+ // Animation will start (if stopped) when GetAnimation is called.
+}
+
+void NetworkIconAnimation::RemoveNetwork(const std::string& network_id) {
+ networks_.erase(network_id);
+ if (networks_.empty())
+ animation_.Reset();
+}
+
// static
NetworkIconAnimation* NetworkIconAnimation::GetInstance() {
static NetworkIconAnimation* s_icon_animation =
« no previous file with comments | « ash/system/chromeos/network/network_icon_animation.h ('k') | ash/system/chromeos/network/network_state_list_detailed_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698