Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: ash/common/system/chromeos/network/tray_network.cc

Issue 2750263002: Remove ash tray utility functions that are no-ops in MD. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 297
298 void TrayNetwork::DestroyDefaultView() { 298 void TrayNetwork::DestroyDefaultView() {
299 default_ = NULL; 299 default_ = NULL;
300 } 300 }
301 301
302 void TrayNetwork::DestroyDetailedView() { 302 void TrayNetwork::DestroyDetailedView() {
303 detailed_ = NULL; 303 detailed_ = NULL;
304 } 304 }
305 305
306 void TrayNetwork::UpdateAfterLoginStatusChange(LoginStatus status) {}
307
308 void TrayNetwork::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
309 if (tray_)
310 SetTrayImageItemBorder(tray_, alignment);
311 }
312
313 void TrayNetwork::RequestToggleWifi() { 306 void TrayNetwork::RequestToggleWifi() {
314 // This will always be triggered by a user action (e.g. keyboard shortcut) 307 // This will always be triggered by a user action (e.g. keyboard shortcut)
315 if (!detailed_ || 308 if (!detailed_ ||
316 detailed_->GetViewType() == tray::NetworkDetailedView::WIFI_VIEW) { 309 detailed_->GetViewType() == tray::NetworkDetailedView::WIFI_VIEW) {
317 request_wifi_view_ = true; 310 request_wifi_view_ = true;
318 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); 311 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
319 } 312 }
320 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); 313 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
321 bool enabled = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi()); 314 bool enabled = handler->IsTechnologyEnabled(NetworkTypePattern::WiFi());
322 WmShell::Get()->RecordUserMetricsAction( 315 WmShell::Get()->RecordUserMetricsAction(
323 enabled ? UMA_STATUS_AREA_DISABLE_WIFI : UMA_STATUS_AREA_ENABLE_WIFI); 316 enabled ? UMA_STATUS_AREA_DISABLE_WIFI : UMA_STATUS_AREA_ENABLE_WIFI);
324 handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(), !enabled, 317 handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(), !enabled,
325 chromeos::network_handler::ErrorCallback()); 318 chromeos::network_handler::ErrorCallback());
326 } 319 }
327 320
328 void TrayNetwork::OnCaptivePortalDetected(const std::string& /* guid */) { 321 void TrayNetwork::OnCaptivePortalDetected(const std::string& /* guid */) {
329 NetworkStateChanged(); 322 NetworkStateChanged();
330 } 323 }
331 324
332 void TrayNetwork::NetworkStateChanged() { 325 void TrayNetwork::NetworkStateChanged() {
333 if (tray_) 326 if (tray_)
334 tray_->UpdateNetworkStateHandlerIcon(); 327 tray_->UpdateNetworkStateHandlerIcon();
335 if (default_) 328 if (default_)
336 default_->Update(); 329 default_->Update();
337 if (detailed_) 330 if (detailed_)
338 detailed_->Update(); 331 detailed_->Update();
339 } 332 }
340 333
341 } // namespace ash 334 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_network.h ('k') | ash/common/system/chromeos/power/tray_power.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698