| 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/system/chromeos/network/tray_network.h" | 5 #include "ash/system/chromeos/network/tray_network.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/chromeos/network/network_icon_animation.h" | 9 #include "ash/system/chromeos/network/network_icon_animation.h" |
| 10 #include "ash/system/chromeos/network/network_list_detailed_view.h" | 10 #include "ash/system/chromeos/network/network_list_detailed_view.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 GetMostRelevantNetworkIcon(&info, false); | 124 GetMostRelevantNetworkIcon(&info, false); |
| 125 UpdateIcon(info.tray_icon_visible, info.image); | 125 UpdateIcon(info.tray_icon_visible, info.image); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 virtual ~NetworkTrayView() { | 129 virtual ~NetworkTrayView() { |
| 130 if (UseNewNetworkHandlers()) | 130 if (UseNewNetworkHandlers()) |
| 131 network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this); | 131 network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this); |
| 132 } | 132 } |
| 133 | 133 |
| 134 std::string GetClassName() const { return "NetworkTrayView"; } |
| 135 |
| 134 void Update(const NetworkIconInfo& info) { | 136 void Update(const NetworkIconInfo& info) { |
| 135 if (UseNewNetworkHandlers()) | 137 if (UseNewNetworkHandlers()) |
| 136 return; | 138 return; |
| 137 UpdateIcon(info.tray_icon_visible, info.image); | 139 UpdateIcon(info.tray_icon_visible, info.image); |
| 138 UpdateConnectionStatus(info.name, info.connected); | 140 UpdateConnectionStatus(info.name, info.connected); |
| 139 } | 141 } |
| 140 | 142 |
| 141 void UpdateNetworkStateHandlerIcon() { | 143 void UpdateNetworkStateHandlerIcon() { |
| 142 DCHECK(UseNewNetworkHandlers()); | 144 DCHECK(UseNewNetworkHandlers()); |
| 143 NetworkStateHandler* handler = NetworkStateHandler::Get(); | 145 NetworkStateHandler* handler = NetworkStateHandler::Get(); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 622 |
| 621 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { | 623 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { |
| 622 tray::NetworkMessages::MessageMap::const_iterator iter = | 624 tray::NetworkMessages::MessageMap::const_iterator iter = |
| 623 messages()->messages().find(message_type); | 625 messages()->messages().find(message_type); |
| 624 if (iter != messages()->messages().end() && iter->second.delegate) | 626 if (iter != messages()->messages().end() && iter->second.delegate) |
| 625 iter->second.delegate->NotificationLinkClicked(message_type, link_id); | 627 iter->second.delegate->NotificationLinkClicked(message_type, link_id); |
| 626 } | 628 } |
| 627 | 629 |
| 628 } // namespace internal | 630 } // namespace internal |
| 629 } // namespace ash | 631 } // namespace ash |
| OLD | NEW |