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

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

Issue 2784133002: Cros system menu - Use WiFi strike-through image for "No networks" row (Closed)
Patch Set: docs Created 3 years, 8 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 NetworkDetailedView::DetailedViewType GetViewType() const override { 202 NetworkDetailedView::DetailedViewType GetViewType() const override {
203 return NetworkDetailedView::WIFI_VIEW; 203 return NetworkDetailedView::WIFI_VIEW;
204 } 204 }
205 205
206 void Update() override { 206 void Update() override {
207 bool wifi_enabled = 207 bool wifi_enabled =
208 NetworkHandler::Get()->network_state_handler()->IsTechnologyEnabled( 208 NetworkHandler::Get()->network_state_handler()->IsTechnologyEnabled(
209 NetworkTypePattern::WiFi()); 209 NetworkTypePattern::WiFi());
210 image_view_->SetImage(network_icon::GetImageForWifiChipState(wifi_enabled)); 210 image_view_->SetImage(
211 network_icon::GetBasicImageForWiFiNetwork(wifi_enabled));
211 212
212 const int string_id = wifi_enabled 213 const int string_id = wifi_enabled
213 ? IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED 214 ? IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED
214 : IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED; 215 : IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED;
215 label_view_->SetText(l10n_util::GetStringUTF16(string_id)); 216 label_view_->SetText(l10n_util::GetStringUTF16(string_id));
216 } 217 }
217 218
218 private: 219 private:
219 views::ImageView* image_view_ = nullptr; 220 views::ImageView* image_view_ = nullptr;
220 views::Label* label_view_ = nullptr; 221 views::Label* label_view_ = nullptr;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 void TrayNetwork::NetworkStateChanged() { 312 void TrayNetwork::NetworkStateChanged() {
312 if (tray_) 313 if (tray_)
313 tray_->UpdateNetworkStateHandlerIcon(); 314 tray_->UpdateNetworkStateHandlerIcon();
314 if (default_) 315 if (default_)
315 default_->Update(); 316 default_->Update();
316 if (detailed_) 317 if (detailed_)
317 detailed_->Update(); 318 detailed_->Update();
318 } 319 }
319 320
320 } // namespace ash 321 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_icon.cc ('k') | ash/resources/vector_icons/network_badge_off.icon » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698