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_vpn.h" | 5 #include "ash/system/chromeos/network/tray_vpn.h" |
6 | 6 |
7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/chromeos/network/network_state_list_detailed_view.h" | 10 #include "ash/system/chromeos/network/network_state_list_detailed_view.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this); | 60 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this); |
61 else | 61 else |
62 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver( | 62 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver( |
63 this); | 63 this); |
64 SetImage(&image); | 64 SetImage(&image); |
65 SetLabel(label); | 65 SetLabel(label); |
66 SetAccessibleName(label); | 66 SetAccessibleName(label); |
67 } | 67 } |
68 | 68 |
69 // ui::network_icon::AnimationObserver | 69 // ui::network_icon::AnimationObserver |
70 virtual void NetworkIconChanged() OVERRIDE { | 70 virtual void NetworkIconChanged() override { |
71 Update(); | 71 Update(); |
72 } | 72 } |
73 | 73 |
74 private: | 74 private: |
75 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image, | 75 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image, |
76 base::string16* label, | 76 base::string16* label, |
77 bool* animating) { | 77 bool* animating) { |
78 NetworkStateHandler* handler = | 78 NetworkStateHandler* handler = |
79 NetworkHandler::Get()->network_state_handler(); | 79 NetworkHandler::Get()->network_state_handler(); |
80 const NetworkState* vpn = | 80 const NetworkState* vpn = |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 detailed_->ManagerChanged(); | 176 detailed_->ManagerChanged(); |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 void TrayVPN::NetworkServiceChanged(const chromeos::NetworkState* network) { | 180 void TrayVPN::NetworkServiceChanged(const chromeos::NetworkState* network) { |
181 if (detailed_) | 181 if (detailed_) |
182 detailed_->NetworkServiceChanged(network); | 182 detailed_->NetworkServiceChanged(network); |
183 } | 183 } |
184 | 184 |
185 } // namespace ash | 185 } // namespace ash |
OLD | NEW |