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/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 // Cellular. | 562 // Cellular. |
563 if (crosnet->cellular_available() && crosnet->cellular_enabled()) { | 563 if (crosnet->cellular_available() && crosnet->cellular_enabled()) { |
564 const CellularNetworkVector& cell = crosnet->cellular_networks(); | 564 const CellularNetworkVector& cell = crosnet->cellular_networks(); |
565 for (size_t i = 0; i < cell.size(); ++i) { | 565 for (size_t i = 0; i < cell.size(); ++i) { |
566 ash::NetworkIconInfo info = CreateNetworkIconInfo(cell[i], | 566 ash::NetworkIconInfo info = CreateNetworkIconInfo(cell[i], |
567 network_icon_.get(), network_menu_.get()); | 567 network_icon_.get(), network_menu_.get()); |
568 ActivationState state = cell[i]->activation_state(); | 568 ActivationState state = cell[i]->activation_state(); |
569 if (state == ACTIVATION_STATE_NOT_ACTIVATED || | 569 if (state == ACTIVATION_STATE_NOT_ACTIVATED || |
570 state == ACTIVATION_STATE_PARTIALLY_ACTIVATED) { | 570 state == ACTIVATION_STATE_PARTIALLY_ACTIVATED) { |
571 // If a cellular network needs to be activated, then do not show it in | 571 // If a cellular network needs to be activated, |
572 // the login/lock screen. | 572 // then do not show it in the lock screen. |
573 if (login_status == ash::user::LOGGED_IN_NONE || | 573 if (login_status == ash::user::LOGGED_IN_LOCKED) |
574 login_status == ash::user::LOGGED_IN_LOCKED) | |
575 continue; | 574 continue; |
| 575 |
576 info.description = l10n_util::GetStringFUTF16( | 576 info.description = l10n_util::GetStringFUTF16( |
577 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, | 577 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, |
578 info.name); | 578 info.name); |
579 } else if (state == ACTIVATION_STATE_ACTIVATING) { | 579 } else if (state == ACTIVATION_STATE_ACTIVATING) { |
580 info.description = l10n_util::GetStringFUTF16( | 580 info.description = l10n_util::GetStringFUTF16( |
581 IDS_STATUSBAR_NETWORK_DEVICE_STATUS, | 581 IDS_STATUSBAR_NETWORK_DEVICE_STATUS, |
582 info.name, l10n_util::GetStringUTF16( | 582 info.name, l10n_util::GetStringUTF16( |
583 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING)); | 583 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING)); |
584 } else if (cell[i]->connecting()) { | 584 } else if (cell[i]->connecting()) { |
585 info.description = l10n_util::GetStringFUTF16( | 585 info.description = l10n_util::GetStringFUTF16( |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1248 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1249 }; | 1249 }; |
1250 | 1250 |
1251 } // namespace | 1251 } // namespace |
1252 | 1252 |
1253 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1253 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1254 return new chromeos::SystemTrayDelegate(tray); | 1254 return new chromeos::SystemTrayDelegate(tray); |
1255 } | 1255 } |
1256 | 1256 |
1257 } // namespace chromeos | 1257 } // namespace chromeos |
OLD | NEW |