Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2328)

Unified Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc

Issue 2497813002: Modify Ash MD system menu layout for title rows (Closed)
Patch Set: trybots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cad0164890027e79e824974b062d4d0751548b7d..31e11922cc238dee17a3480a24f2c810818c8e82 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"
@@ -533,8 +534,22 @@ class BluetoothDetailedView : public TrayDetailsView {
return;
if (UseMd()) {
- toggle_ = title_row()->AddToggleButton(this);
- settings_ = title_row()->AddSettingsButton(this, login_);
+ DCHECK(!toggle_);
+ DCHECK(!settings_);
+
+ 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;
}
« no previous file with comments | « no previous file | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698