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

Unified Diff: ash/common/system/status_area_widget.cc

Issue 2582923002: Removing logic on showing/hiding separator (Closed)
Patch Set: typo Created 4 years 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/status_area_widget.h ('k') | ash/common/system/tray/tray_background_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/status_area_widget.cc
diff --git a/ash/common/system/status_area_widget.cc b/ash/common/system/status_area_widget.cc
index aebebbafd7f0e95db3f0c5c8a7ff63ba0c5a60d2..f98a83b26b6b3daf0d848cd8e49b91906c15e5eb 100644
--- a/ash/common/system/status_area_widget.cc
+++ b/ash/common/system/status_area_widget.cc
@@ -146,29 +146,6 @@ void StatusAreaWidget::UpdateAfterLoginStatusChange(LoginStatus login_status) {
overview_button_tray_->UpdateAfterLoginStatusChange(login_status);
}
-void StatusAreaWidget::OnTrayVisibilityChanged(TrayBackgroundView* tray) {
- if (!ash::MaterialDesignController::IsShelfMaterial())
- return;
-
- // No separator is required between |system_tray_| and |overview_button_tray_|
- // and no separator is required for the right most tray item.
- if (tray == overview_button_tray_ || tray == system_tray_) {
- tray->SetSeparatorVisibility(false);
- return;
- }
-#if defined(OS_CHROMEOS)
- // If |logout_button_tray_| is visible, check if |tray| is visible and to
- // the left of |logout_button_tray_|. If it is the case, then no separator
- // is required between |tray| and |logout_button_tray_|. If
- // |logout_button_tray_| is not visible, then separator should always be
- // visible.
- tray->SetSeparatorVisibility(!IsNextVisibleTrayToLogout(tray) &&
- tray != logout_button_tray_);
-#else
- tray->SetSeparatorVisibility(true);
-#endif
-}
-
bool StatusAreaWidget::ShouldShowShelf() const {
if ((system_tray_ && system_tray_->ShouldShowShelf()) ||
(web_notification_tray_ &&
@@ -281,23 +258,6 @@ void StatusAreaWidget::AddImeMenuTray() {
ime_menu_tray_ = new ImeMenuTray(wm_shelf_);
status_area_widget_delegate_->AddTray(ime_menu_tray_);
}
-
-bool StatusAreaWidget::IsNextVisibleTrayToLogout(
- TrayBackgroundView* tray) const {
- int logout_button_index =
- status_area_widget_delegate_->GetIndexOf(logout_button_tray_);
- // Logout button should always exist.
- DCHECK_NE(-1, logout_button_index);
- if (!logout_button_tray_->visible())
- return false;
-
- for (int c = logout_button_index + 1;
- c < status_area_widget_delegate_->child_count(); c++) {
- if (status_area_widget_delegate_->child_at(c)->visible())
- return tray == status_area_widget_delegate_->child_at(c);
- }
- return false;
-}
#endif
void StatusAreaWidget::AddOverviewButtonTray() {
« no previous file with comments | « ash/common/system/status_area_widget.h ('k') | ash/common/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698