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 #include "ash/common/system/chromeos/network/tray_network_state_observer.h" | 5 #include "ash/common/system/chromeos/network/tray_network_state_observer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "ash/common/system/chromeos/network/network_icon.h" |
10 #include "ash/common/system/tray/system_tray.h" | 11 #include "ash/common/system/tray/system_tray.h" |
11 #include "base/location.h" | 12 #include "base/location.h" |
12 #include "chromeos/network/network_state.h" | 13 #include "chromeos/network/network_state.h" |
13 #include "chromeos/network/network_state_handler.h" | 14 #include "chromeos/network/network_state_handler.h" |
14 #include "third_party/cros_system_api/dbus/service_constants.h" | 15 #include "third_party/cros_system_api/dbus/service_constants.h" |
15 #include "ui/chromeos/network/network_icon.h" | |
16 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 16 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
17 | 17 |
18 using chromeos::NetworkHandler; | 18 using chromeos::NetworkHandler; |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const int kUpdateFrequencyMs = 1000; | 22 const int kUpdateFrequencyMs = 1000; |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void TrayNetworkStateObserver::SignalUpdate() { | 81 void TrayNetworkStateObserver::SignalUpdate() { |
82 if (timer_.IsRunning()) | 82 if (timer_.IsRunning()) |
83 return; | 83 return; |
84 timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(update_frequency_), | 84 timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(update_frequency_), |
85 this, &TrayNetworkStateObserver::SendNetworkStateChanged); | 85 this, &TrayNetworkStateObserver::SendNetworkStateChanged); |
86 } | 86 } |
87 | 87 |
88 void TrayNetworkStateObserver::SendNetworkStateChanged() { | 88 void TrayNetworkStateObserver::SendNetworkStateChanged() { |
89 delegate_->NetworkStateChanged(); | 89 delegate_->NetworkStateChanged(); |
90 if (purge_icons_) { | 90 if (purge_icons_) { |
91 ui::network_icon::PurgeNetworkIconCache(); | 91 network_icon::PurgeNetworkIconCache(); |
92 purge_icons_ = false; | 92 purge_icons_ = false; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 } // namespace ash | 96 } // namespace ash |
OLD | NEW |