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