| 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/common/system/chromeos/bluetooth/tray_bluetooth.h" | 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/common/system/tray/hover_highlight_view.h" | 10 #include "ash/common/system/tray/hover_highlight_view.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 void CreateExtraTitleRowButtons() override { | 535 void CreateExtraTitleRowButtons() override { |
| 536 if (login_ == LoginStatus::LOCKED) | 536 if (login_ == LoginStatus::LOCKED) |
| 537 return; | 537 return; |
| 538 | 538 |
| 539 if (UseMd()) { | 539 if (UseMd()) { |
| 540 DCHECK(!toggle_); | 540 DCHECK(!toggle_); |
| 541 DCHECK(!settings_); | 541 DCHECK(!settings_); |
| 542 | 542 |
| 543 tri_view()->SetContainerVisible(TriView::Container::END, true); | 543 tri_view()->SetContainerVisible(TriView::Container::END, true); |
| 544 | 544 |
| 545 // TODO(tdanderson): Move common toggle-creation logic to TrayPopupUtils. | 545 toggle_ = TrayPopupUtils::CreateToggleButton( |
| 546 // See crbug.com/614453. | 546 this, IDS_ASH_STATUS_TRAY_BLUETOOTH); |
| 547 toggle_ = new views::ToggleButton(this); | |
| 548 toggle_->SetFocusForPlatform(); | |
| 549 toggle_->SetAccessibleName( | |
| 550 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( | |
| 551 IDS_ASH_STATUS_TRAY_BLUETOOTH)); | |
| 552 tri_view()->AddView(TriView::Container::END, toggle_); | 547 tri_view()->AddView(TriView::Container::END, toggle_); |
| 553 | 548 |
| 554 settings_ = CreateSettingsButton(login_); | 549 settings_ = CreateSettingsButton(login_); |
| 555 tri_view()->AddView(TriView::Container::END, settings_); | 550 tri_view()->AddView(TriView::Container::END, settings_); |
| 556 return; | 551 return; |
| 557 } | 552 } |
| 558 | 553 |
| 559 throbber_ = new ThrobberView; | 554 throbber_ = new ThrobberView; |
| 560 throbber_->SetTooltipText( | 555 throbber_->SetTooltipText( |
| 561 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING)); | 556 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING)); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 detailed_->Update(); | 741 detailed_->Update(); |
| 747 } | 742 } |
| 748 | 743 |
| 749 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 744 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 750 if (!detailed_) | 745 if (!detailed_) |
| 751 return; | 746 return; |
| 752 detailed_->Update(); | 747 detailed_->Update(); |
| 753 } | 748 } |
| 754 | 749 |
| 755 } // namespace ash | 750 } // namespace ash |
| OLD | NEW |