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

Unified Diff: ash/common/system/chromeos/network/network_state_list_detailed_view.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 | « ash/common/system/chromeos/network/network_list_md.cc ('k') | ash/common/system/ime/tray_ime_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/network_state_list_detailed_view.cc
diff --git a/ash/common/system/chromeos/network/network_state_list_detailed_view.cc b/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
index b5607948afe8e761baf3f8b3beec5135d19e36b1..5028a241f17cdb641758415dac47e02e85563fe4 100644
--- a/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/common/system/chromeos/network/network_state_list_detailed_view.cc
@@ -30,6 +30,7 @@
#include "ash/common/system/tray/tray_details_view.h"
#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/system/tray/tray_popup_label_button.h"
+#include "ash/common/system/tray/tri_view.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
@@ -478,12 +479,16 @@ void NetworkStateListDetailedView::CreateExtraTitleRowButtons() {
if (login_ == LoginStatus::LOCKED)
return;
+ DCHECK(!info_button_md_);
+ tri_view()->SetContainerVisible(TriView::Container::END, true);
+
info_button_md_ = new SystemMenuButton(
this, SystemMenuButton::InkDropStyle::SQUARE, kSystemMenuInfoIcon,
IDS_ASH_STATUS_TRAY_NETWORK_INFO);
- title_row()->AddViewToTitleRow(info_button_md_);
+ tri_view()->AddView(TriView::Container::END, info_button_md_);
if (login_ != LoginStatus::NOT_LOGGED_IN) {
+ DCHECK(!settings_button_md_);
settings_button_md_ = new SystemMenuButton(
this, SystemMenuButton::InkDropStyle::SQUARE, kSystemMenuSettingsIcon,
IDS_ASH_STATUS_TRAY_NETWORK_SETTINGS);
@@ -495,7 +500,7 @@ void NetworkStateListDetailedView::CreateExtraTitleRowButtons() {
if (!WmShell::Get()->system_tray_delegate()->ShouldShowSettings())
settings_button_md_->SetState(views::Button::STATE_DISABLED);
- title_row()->AddViewToTitleRow(settings_button_md_);
+ tri_view()->AddView(TriView::Container::END, settings_button_md_);
} else {
proxy_settings_button_md_ = new SystemMenuButton(
this, SystemMenuButton::InkDropStyle::SQUARE, kSystemMenuSettingsIcon,
@@ -661,7 +666,8 @@ void NetworkStateListDetailedView::UpdateHeaderButtons() {
}
}
- static_cast<views::View*>(title_row())->Layout();
+ if (!UseMd())
+ static_cast<views::View*>(title_row())->Layout();
}
void NetworkStateListDetailedView::SetScanningStateForThrobberView(
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | ash/common/system/ime/tray_ime_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698