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

Unified Diff: ash/common/system/tray/tray_details_view.cc

Issue 2429923002: Implement all system menu title row buttons for Ash MD (Closed)
Patch Set: OS_WIN define in tests Created 4 years, 2 months 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/tray/tray_details_view.h ('k') | ash/common/system/tray/tray_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_details_view.cc
diff --git a/ash/common/system/tray/tray_details_view.cc b/ash/common/system/tray/tray_details_view.cc
index 35d58cdf2c722d78da1fa4631f843384c0fdb30c..41b2cf43198138d47df26947b869ada52ba5737b 100644
--- a/ash/common/system/tray/tray_details_view.cc
+++ b/ash/common/system/tray/tray_details_view.cc
@@ -66,8 +66,7 @@ TrayDetailsView::TrayDetailsView(SystemTrayItem* owner)
scroller_(nullptr),
scroll_content_(nullptr),
scroll_border_(nullptr),
- back_button_(nullptr),
- settings_button_(nullptr) {
+ back_button_(nullptr) {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
set_background(views::Background::CreateSolidBackground(kBackgroundColor));
}
@@ -86,14 +85,10 @@ void TrayDetailsView::OnViewClicked(views::View* sender) {
void TrayDetailsView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
- if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
- if (sender == back_button_) {
- TransitionToDefaultView();
- return;
- } else if (sender == settings_button_) {
- ShowSettings();
- return;
- }
+ if (MaterialDesignController::IsSystemTrayMenuMaterial() &&
+ sender == back_button_) {
+ TransitionToDefaultView();
+ return;
}
HandleButtonPressed(sender, event);
@@ -110,10 +105,8 @@ void TrayDetailsView::CreateTitleRow(int string_id) {
CreateExtraTitleRowButtons();
- if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ if (MaterialDesignController::IsSystemTrayMenuMaterial())
back_button_ = title_row_->AddBackButton(this);
- settings_button_ = title_row_->AddSettingsButton(this);
- }
Layout();
}
@@ -147,7 +140,6 @@ void TrayDetailsView::Reset() {
scroller_ = nullptr;
scroll_content_ = nullptr;
back_button_ = nullptr;
- settings_button_ = nullptr;
}
void TrayDetailsView::HandleViewClicked(views::View* view) {}
@@ -157,13 +149,6 @@ void TrayDetailsView::HandleButtonPressed(views::Button* sender,
void TrayDetailsView::CreateExtraTitleRowButtons() {}
-void TrayDetailsView::ShowSettings() {
- // TODO(tdanderson): Store login status as a member in TrayDetailsView
- // instead of its derived classes. Use this to perform an early return
- // if launching WebUI settings is not permitted, and provide a default
- // implementation to ShowSettings().
-}
-
void TrayDetailsView::TransitionToDefaultView() {
// Cache pointer to owner in this function scope. TrayDetailsView will be
// deleted after called ShowDefaultView.
« no previous file with comments | « ash/common/system/tray/tray_details_view.h ('k') | ash/common/system/tray/tray_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698