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

Side by Side Diff: chrome/browser/chromeos/status/network_menu.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
« no previous file with comments | « ash/resources/vector_icons/network_badge_off.icon ('k') | ui/gfx/paint_vector_icon.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/chromeos/status/network_menu.h" 5 #include "chrome/browser/chromeos/status/network_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Add 'Searching for Wi-Fi networks...' after connected networks. 504 // Add 'Searching for Wi-Fi networks...' after connected networks.
505 if (scanning_msg && !network->IsConnectedState()) { 505 if (scanning_msg && !network->IsConnectedState()) {
506 AddMessageItem(l10n_util::GetStringUTF16(scanning_msg)); 506 AddMessageItem(l10n_util::GetStringUTF16(scanning_msg));
507 scanning_msg = 0; 507 scanning_msg = 0;
508 } 508 }
509 AddWirelessNetworkMenuItem(network, FLAG_WIFI); 509 AddWirelessNetworkMenuItem(network, FLAG_WIFI);
510 } 510 }
511 if (scanning_msg) 511 if (scanning_msg)
512 AddMessageItem(l10n_util::GetStringUTF16(scanning_msg)); 512 AddMessageItem(l10n_util::GetStringUTF16(scanning_msg));
513 const gfx::ImageSkia icon = 513 const gfx::ImageSkia icon =
514 ash::network_icon::GetImageForConnectedMobileNetwork(); 514 ash::network_icon::GetBasicImageForWiFiNetwork(true);
515 menu_items_.push_back(MenuItem( 515 menu_items_.push_back(MenuItem(
516 ui::MenuModel::TYPE_COMMAND, 516 ui::MenuModel::TYPE_COMMAND,
517 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_OTHER_WIFI_NETWORKS), 517 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_OTHER_WIFI_NETWORKS),
518 icon, std::string(), FLAG_ADD_WIFI)); 518 icon, std::string(), FLAG_ADD_WIFI));
519 } 519 }
520 520
521 if (menu_items_.empty()) { 521 if (menu_items_.empty()) {
522 // No networks available (and not initializing cellular or wifi scanning) 522 // No networks available (and not initializing cellular or wifi scanning)
523 AddMessageItem(l10n_util::GetStringFUTF16( 523 AddMessageItem(l10n_util::GetStringFUTF16(
524 IDS_STATUSBAR_NETWORK_MENU_ITEM_INDENT, 524 IDS_STATUSBAR_NETWORK_MENU_ITEM_INDENT,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 return main_menu_model_.get(); 676 return main_menu_model_.get();
677 } 677 }
678 678
679 void NetworkMenu::UpdateMenu() { 679 void NetworkMenu::UpdateMenu() {
680 refreshing_menu_ = true; 680 refreshing_menu_ = true;
681 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); 681 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions());
682 refreshing_menu_ = false; 682 refreshing_menu_ = false;
683 } 683 }
684 684
685 } // namespace chromeos 685 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/resources/vector_icons/network_badge_off.icon ('k') | ui/gfx/paint_vector_icon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698