| 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/shelf/wm_shelf_util.h" | 7 #include "ash/common/shelf/wm_shelf_util.h" |
| 8 #include "ash/common/system/chromeos/network/network_icon.h" | 8 #include "ash/common/system/chromeos/network/network_icon.h" |
| 9 #include "ash/common/system/chromeos/network/network_icon_animation.h" | 9 #include "ash/common/system/chromeos/network/network_icon_animation.h" |
| 10 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h" | 10 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 316 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
| 317 } | 317 } |
| 318 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); | 318 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); |
| 319 bool enabled = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi()); | 319 bool enabled = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi()); |
| 320 WmShell::Get()->RecordUserMetricsAction( | 320 WmShell::Get()->RecordUserMetricsAction( |
| 321 enabled ? UMA_STATUS_AREA_DISABLE_WIFI : UMA_STATUS_AREA_ENABLE_WIFI); | 321 enabled ? UMA_STATUS_AREA_DISABLE_WIFI : UMA_STATUS_AREA_ENABLE_WIFI); |
| 322 handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(), !enabled, | 322 handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(), !enabled, |
| 323 chromeos::network_handler::ErrorCallback()); | 323 chromeos::network_handler::ErrorCallback()); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void TrayNetwork::OnCaptivePortalDetected( | 326 void TrayNetwork::OnCaptivePortalDetected(const std::string& /* guid */) { |
| 327 const std::string& /* service_path */) { | |
| 328 NetworkStateChanged(); | 327 NetworkStateChanged(); |
| 329 } | 328 } |
| 330 | 329 |
| 331 void TrayNetwork::NetworkStateChanged() { | 330 void TrayNetwork::NetworkStateChanged() { |
| 332 if (tray_) | 331 if (tray_) |
| 333 tray_->UpdateNetworkStateHandlerIcon(); | 332 tray_->UpdateNetworkStateHandlerIcon(); |
| 334 if (default_) | 333 if (default_) |
| 335 default_->Update(); | 334 default_->Update(); |
| 336 if (detailed_) | 335 if (detailed_) |
| 337 detailed_->Update(); | 336 detailed_->Update(); |
| 338 } | 337 } |
| 339 | 338 |
| 340 } // namespace ash | 339 } // namespace ash |
| OLD | NEW |