Chromium Code Reviews| Index: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc |
| diff --git a/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc b/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc |
| index 853864efab986374693babfb56e97b6181f58cda..3d96dde1f2039c057d1d0e26cde11d599c692eaf 100644 |
| --- a/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc |
| +++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc |
| @@ -18,6 +18,7 @@ |
| #include "ash/common/system/tray/tray_popup_header_button.h" |
| #include "ash/common/system/tray/tray_popup_item_style.h" |
| #include "ash/common/system/tray/tray_popup_utils.h" |
| +#include "ash/common/system/tray/tri_view.h" |
| #include "ash/common/wm_shell.h" |
| #include "ash/resources/vector_icons/vector_icons.h" |
| #include "device/bluetooth/bluetooth_common.h" |
| @@ -482,8 +483,20 @@ class BluetoothDetailedView : public TrayDetailsView { |
| return; |
| if (UseMd()) { |
| - toggle_ = title_row()->AddToggleButton(this); |
| - settings_ = title_row()->AddSettingsButton(this, login_); |
| + DCHECK(tri_view()); |
|
bruthig
2016/11/14 04:39:11
nit: I think convention says not to add the DCHECK
tdanderson
2016/11/14 19:24:58
Done, here and changed similarly for the other ove
|
| + tri_view()->SetContainerVisible(TriView::Container::END, true); |
| + |
| + // TODO(tdanderson): Move common toggle-creation logic to TrayPopupUtils. |
| + // See crbug.com/614453. |
| + toggle_ = new views::ToggleButton(this); |
| + toggle_->SetFocusForPlatform(); |
| + toggle_->SetAccessibleName( |
| + ui::ResourceBundle::GetSharedInstance().GetLocalizedString( |
| + IDS_ASH_STATUS_TRAY_BLUETOOTH)); |
| + tri_view()->AddView(TriView::Container::END, toggle_); |
| + |
| + settings_ = CreateSettingsButton(login_); |
| + tri_view()->AddView(TriView::Container::END, settings_); |
| return; |
| } |