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/shell.h" | 8 #include "ash/shell.h" |
8 #include "ash/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/system/tray/fixed_sized_scroll_view.h" |
9 #include "ash/system/tray/hover_highlight_view.h" | 10 #include "ash/system/tray/hover_highlight_view.h" |
10 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
11 #include "ash/system/tray/system_tray_delegate.h" | 12 #include "ash/system/tray/system_tray_delegate.h" |
12 #include "ash/system/tray/system_tray_notifier.h" | 13 #include "ash/system/tray/system_tray_notifier.h" |
13 #include "ash/system/tray/throbber_view.h" | 14 #include "ash/system/tray/throbber_view.h" |
14 #include "ash/system/tray/tray_constants.h" | 15 #include "ash/system/tray/tray_constants.h" |
15 #include "ash/system/tray/tray_details_view.h" | 16 #include "ash/system/tray/tray_details_view.h" |
16 #include "ash/system/tray/tray_item_more.h" | 17 #include "ash/system/tray/tray_item_more.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 295 |
295 // Add settings entries. | 296 // Add settings entries. |
296 void AppendSettingsEntries() { | 297 void AppendSettingsEntries() { |
297 if (!ash::Shell::GetInstance()-> | 298 if (!ash::Shell::GetInstance()-> |
298 system_tray_delegate()->ShouldShowSettings()) { | 299 system_tray_delegate()->ShouldShowSettings()) { |
299 return; | 300 return; |
300 } | 301 } |
301 | 302 |
302 // Add bluetooth device requires a browser window, hide it for non logged in | 303 // Add bluetooth device requires a browser window, hide it for non logged in |
303 // user. | 304 // user. |
304 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED) | 305 bool userAddingRunning = ash::Shell::GetInstance() |
| 306 ->session_state_delegate() |
| 307 ->IsInSecondaryLoginScreen(); |
| 308 |
| 309 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED || |
| 310 userAddingRunning) |
305 return; | 311 return; |
306 | 312 |
307 ash::SystemTrayDelegate* delegate = | 313 ash::SystemTrayDelegate* delegate = |
308 ash::Shell::GetInstance()->system_tray_delegate(); | 314 ash::Shell::GetInstance()->system_tray_delegate(); |
309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 315 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
310 HoverHighlightView* container = new HoverHighlightView(this); | 316 HoverHighlightView* container = new HoverHighlightView(this); |
311 container->AddLabel( | 317 container->AddLabel( |
312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), | 318 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), |
313 gfx::ALIGN_LEFT, | 319 gfx::ALIGN_LEFT, |
314 gfx::Font::NORMAL); | 320 gfx::Font::NORMAL); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 detailed_->Update(); | 467 detailed_->Update(); |
462 } | 468 } |
463 | 469 |
464 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 470 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
465 if (!detailed_) | 471 if (!detailed_) |
466 return; | 472 return; |
467 detailed_->Update(); | 473 detailed_->Update(); |
468 } | 474 } |
469 | 475 |
470 } // namespace ash | 476 } // namespace ash |
OLD | NEW |