Chromium Code Reviews| 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 { | |
| 135 return "ash/system/chromeos/network/NetworkTrayView"; | |
|
James Cook
2013/04/24 22:47:34
nit: I think it's OK to just call this NetworkTray
stevenjb
2013/04/24 22:53:24
Done.
| |
| 136 } | |
| 137 | |
| 134 void Update(const NetworkIconInfo& info) { | 138 void Update(const NetworkIconInfo& info) { |
| 135 if (UseNewNetworkHandlers()) | 139 if (UseNewNetworkHandlers()) |
| 136 return; | 140 return; |
| 137 UpdateIcon(info.tray_icon_visible, info.image); | 141 UpdateIcon(info.tray_icon_visible, info.image); |
| 138 UpdateConnectionStatus(info.name, info.connected); | 142 UpdateConnectionStatus(info.name, info.connected); |
| 139 } | 143 } |
| 140 | 144 |
| 141 void UpdateNetworkStateHandlerIcon() { | 145 void UpdateNetworkStateHandlerIcon() { |
| 142 DCHECK(UseNewNetworkHandlers()); | 146 DCHECK(UseNewNetworkHandlers()); |
| 143 NetworkStateHandler* handler = NetworkStateHandler::Get(); | 147 NetworkStateHandler* handler = NetworkStateHandler::Get(); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 | 624 |
| 621 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { | 625 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { |
| 622 tray::NetworkMessages::MessageMap::const_iterator iter = | 626 tray::NetworkMessages::MessageMap::const_iterator iter = |
| 623 messages()->messages().find(message_type); | 627 messages()->messages().find(message_type); |
| 624 if (iter != messages()->messages().end() && iter->second.delegate) | 628 if (iter != messages()->messages().end() && iter->second.delegate) |
| 625 iter->second.delegate->NotificationLinkClicked(message_type, link_id); | 629 iter->second.delegate->NotificationLinkClicked(message_type, link_id); |
| 626 } | 630 } |
| 627 | 631 |
| 628 } // namespace internal | 632 } // namespace internal |
| 629 } // namespace ash | 633 } // namespace ash |
| OLD | NEW |