| 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 "ash/system/bluetooth/tray_bluetooth.h" | 5 #include "ash/system/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/system/tray/hover_highlight_view.h" | 10 #include "ash/system/tray/hover_highlight_view.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 void AppendHeaderEntry() { | 194 void AppendHeaderEntry() { |
| 195 CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this); | 195 CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this); |
| 196 | 196 |
| 197 if (login_ == user::LOGGED_IN_LOCKED) | 197 if (login_ == user::LOGGED_IN_LOCKED) |
| 198 return; | 198 return; |
| 199 | 199 |
| 200 throbber_ = new ThrobberView; | 200 throbber_ = new ThrobberView; |
| 201 throbber_->SetTooltipText( | 201 throbber_->SetTooltipText( |
| 202 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING)); | 202 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING)); |
| 203 footer()->AddThrobber(throbber_); | 203 footer()->AddView(throbber_, false /* separator */); |
| 204 | 204 |
| 205 // Do not allow toggling bluetooth in the lock screen. | 205 // Do not allow toggling bluetooth in the lock screen. |
| 206 ash::SystemTrayDelegate* delegate = | 206 ash::SystemTrayDelegate* delegate = |
| 207 ash::Shell::GetInstance()->system_tray_delegate(); | 207 ash::Shell::GetInstance()->system_tray_delegate(); |
| 208 toggle_bluetooth_ = new TrayPopupHeaderButton(this, | 208 toggle_bluetooth_ = new TrayPopupHeaderButton(this, |
| 209 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED, | 209 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED, |
| 210 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED, | 210 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED, |
| 211 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER, | 211 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER, |
| 212 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER, | 212 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER, |
| 213 IDS_ASH_STATUS_TRAY_BLUETOOTH); | 213 IDS_ASH_STATUS_TRAY_BLUETOOTH); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 detailed_->Update(); | 463 detailed_->Update(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 466 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 467 if (!detailed_) | 467 if (!detailed_) |
| 468 return; | 468 return; |
| 469 detailed_->Update(); | 469 detailed_->Update(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace ash | 472 } // namespace ash |
| OLD | NEW |