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 "chrome/browser/chromeos/status/network_menu.h" | 5 #include "chrome/browser/chromeos/status/network_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 if (cellular_available && cellular_enabled) { | 581 if (cellular_available && cellular_enabled) { |
582 const CellularNetworkVector& cell_networks = cros->cellular_networks(); | 582 const CellularNetworkVector& cell_networks = cros->cellular_networks(); |
583 const CellularNetwork* active_cellular = cros->cellular_network(); | 583 const CellularNetwork* active_cellular = cros->cellular_network(); |
584 | 584 |
585 bool separator_added = false; | 585 bool separator_added = false; |
586 // List Cellular networks. | 586 // List Cellular networks. |
587 for (size_t i = 0; i < cell_networks.size(); ++i) { | 587 for (size_t i = 0; i < cell_networks.size(); ++i) { |
588 chromeos::ActivationState activation_state = | 588 chromeos::ActivationState activation_state = |
589 cell_networks[i]->activation_state(); | 589 cell_networks[i]->activation_state(); |
590 | 590 |
| 591 // This is currently only used in the OOBE screen, do not show |
| 592 // activating 3G option. |
| 593 if (activation_state != ACTIVATION_STATE_ACTIVATED) |
| 594 continue; |
| 595 |
591 // Ampersand is a valid character in a network name, but menu2 uses it | 596 // Ampersand is a valid character in a network name, but menu2 uses it |
592 // to mark "mnemonics" for keyboard shortcuts. http://crosbug.com/14697 | 597 // to mark "mnemonics" for keyboard shortcuts. http://crosbug.com/14697 |
593 std::string network_name = EscapeAmpersands(cell_networks[i]->name()); | 598 std::string network_name = EscapeAmpersands(cell_networks[i]->name()); |
594 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED || | 599 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED || |
595 activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED) { | 600 activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED) { |
596 label = l10n_util::GetStringFUTF16( | 601 label = l10n_util::GetStringFUTF16( |
597 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, | 602 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, |
598 UTF8ToUTF16(network_name)); | 603 UTF8ToUTF16(network_name)); |
599 } else if (activation_state == ACTIVATION_STATE_ACTIVATING) { | 604 } else if (activation_state == ACTIVATION_STATE_ACTIVATING) { |
600 label = l10n_util::GetStringFUTF16( | 605 label = l10n_util::GetStringFUTF16( |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 | 1102 |
1098 void NetworkMenu::ShowOtherWifi() { | 1103 void NetworkMenu::ShowOtherWifi() { |
1099 NetworkConfigView::ShowForType(TYPE_WIFI, delegate_->GetNativeWindow()); | 1104 NetworkConfigView::ShowForType(TYPE_WIFI, delegate_->GetNativeWindow()); |
1100 } | 1105 } |
1101 | 1106 |
1102 void NetworkMenu::ShowOtherCellular() { | 1107 void NetworkMenu::ShowOtherCellular() { |
1103 ChooseMobileNetworkDialog::ShowDialog(delegate_->GetNativeWindow()); | 1108 ChooseMobileNetworkDialog::ShowDialog(delegate_->GetNativeWindow()); |
1104 } | 1109 } |
1105 | 1110 |
1106 } // namespace chromeos | 1111 } // namespace chromeos |
OLD | NEW |