| 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.h" | 5 #include "ash/common/system/chromeos/network/tray_network.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
| 8 #include "ash/common/shelf/wm_shelf_util.h" | 8 #include "ash/common/shelf/wm_shelf_util.h" |
| 9 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" | 9 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" |
| 10 #include "ash/common/system/chromeos/network/tray_network_state_observer.h" | 10 #include "ash/common/system/chromeos/network/tray_network_state_observer.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 gfx::ImageSkia image; | 151 gfx::ImageSkia image; |
| 152 base::string16 label; | 152 base::string16 label; |
| 153 bool animating = false; | 153 bool animating = false; |
| 154 ui::network_icon::GetDefaultNetworkImageAndLabel( | 154 ui::network_icon::GetDefaultNetworkImageAndLabel( |
| 155 ui::network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label, &animating); | 155 ui::network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label, &animating); |
| 156 if (animating) | 156 if (animating) |
| 157 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this); | 157 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this); |
| 158 else | 158 else |
| 159 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver( | 159 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver( |
| 160 this); | 160 this); |
| 161 SetImage(&image); | 161 SetImage(image); |
| 162 SetLabel(label); | 162 SetLabel(label); |
| 163 SetAccessibleName(label); | 163 SetAccessibleName(label); |
| 164 } | 164 } |
| 165 | 165 |
| 166 // ui::network_icon::AnimationObserver | 166 // ui::network_icon::AnimationObserver |
| 167 void NetworkIconChanged() override { Update(); } | 167 void NetworkIconChanged() override { Update(); } |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 DISALLOW_COPY_AND_ASSIGN(NetworkDefaultView); | 170 DISALLOW_COPY_AND_ASSIGN(NetworkDefaultView); |
| 171 }; | 171 }; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 void TrayNetwork::NetworkStateChanged() { | 330 void TrayNetwork::NetworkStateChanged() { |
| 331 if (tray_) | 331 if (tray_) |
| 332 tray_->UpdateNetworkStateHandlerIcon(); | 332 tray_->UpdateNetworkStateHandlerIcon(); |
| 333 if (default_) | 333 if (default_) |
| 334 default_->Update(); | 334 default_->Update(); |
| 335 if (detailed_) | 335 if (detailed_) |
| 336 detailed_->Update(); | 336 detailed_->Update(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace ash | 339 } // namespace ash |
| OLD | NEW |