Chromium Code Reviews| 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 = |
| 306 (ash::Shell::GetInstance() | |
| 307 ->session_state_delegate() | |
| 308 ->GetSessionState() == | |
| 309 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY); | |
|
oshima
2014/08/01 20:31:22
could you mind adding IsInSecondaryLoginScreen() u
Roman Sorokin (ftl)
2014/08/05 13:44:08
Done.
| |
| 310 | |
| 311 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED || | |
| 312 userAddingRunning) | |
| 305 return; | 313 return; |
| 306 | 314 |
| 307 ash::SystemTrayDelegate* delegate = | 315 ash::SystemTrayDelegate* delegate = |
| 308 ash::Shell::GetInstance()->system_tray_delegate(); | 316 ash::Shell::GetInstance()->system_tray_delegate(); |
| 309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 317 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 310 HoverHighlightView* container = new HoverHighlightView(this); | 318 HoverHighlightView* container = new HoverHighlightView(this); |
| 311 container->AddLabel( | 319 container->AddLabel( |
| 312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), | 320 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), |
| 313 gfx::ALIGN_LEFT, | 321 gfx::ALIGN_LEFT, |
| 314 gfx::Font::NORMAL); | 322 gfx::Font::NORMAL); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 detailed_->Update(); | 469 detailed_->Update(); |
| 462 } | 470 } |
| 463 | 471 |
| 464 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 472 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 465 if (!detailed_) | 473 if (!detailed_) |
| 466 return; | 474 return; |
| 467 detailed_->Update(); | 475 detailed_->Update(); |
| 468 } | 476 } |
| 469 | 477 |
| 470 } // namespace ash | 478 } // namespace ash |
| OLD | NEW |