| 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/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/fixed_sized_scroll_view.h" | 8 #include "ash/system/tray/fixed_sized_scroll_view.h" |
| 9 #include "ash/system/tray/hover_highlight_view.h" | 9 #include "ash/system/tray/hover_highlight_view.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // user. | 303 // user. |
| 304 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED) | 304 if (login_ == user::LOGGED_IN_NONE || login_ == user::LOGGED_IN_LOCKED) |
| 305 return; | 305 return; |
| 306 | 306 |
| 307 ash::SystemTrayDelegate* delegate = | 307 ash::SystemTrayDelegate* delegate = |
| 308 ash::Shell::GetInstance()->system_tray_delegate(); | 308 ash::Shell::GetInstance()->system_tray_delegate(); |
| 309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 309 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 310 HoverHighlightView* container = new HoverHighlightView(this); | 310 HoverHighlightView* container = new HoverHighlightView(this); |
| 311 container->AddLabel( | 311 container->AddLabel( |
| 312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), | 312 rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES), |
| 313 gfx::ALIGN_LEFT, |
| 313 gfx::Font::NORMAL); | 314 gfx::Font::NORMAL); |
| 314 container->SetEnabled(delegate->GetBluetoothAvailable()); | 315 container->SetEnabled(delegate->GetBluetoothAvailable()); |
| 315 AddChildView(container); | 316 AddChildView(container); |
| 316 manage_devices_ = container; | 317 manage_devices_ = container; |
| 317 } | 318 } |
| 318 | 319 |
| 319 // Returns true if the device with |device_id| is found in |device_list|, | 320 // Returns true if the device with |device_id| is found in |device_list|, |
| 320 // and the display_name of the device will be returned in |display_name| if | 321 // and the display_name of the device will be returned in |display_name| if |
| 321 // it's not NULL. | 322 // it's not NULL. |
| 322 bool FoundDevice(const std::string& device_id, | 323 bool FoundDevice(const std::string& device_id, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 detailed_->Update(); | 461 detailed_->Update(); |
| 461 } | 462 } |
| 462 | 463 |
| 463 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 464 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 464 if (!detailed_) | 465 if (!detailed_) |
| 465 return; | 466 return; |
| 466 detailed_->Update(); | 467 detailed_->Update(); |
| 467 } | 468 } |
| 468 | 469 |
| 469 } // namespace ash | 470 } // namespace ash |
| OLD | NEW |