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

Unified Diff: ash/common/system/tray/tray_utils.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_utils.h ('k') | ash/common/system/tray_accessibility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_utils.cc
diff --git a/ash/common/system/tray/tray_utils.cc b/ash/common/system/tray/tray_utils.cc
index d7c9dd21669267c0b4ceb8774f2994b59b070847..c427e654b3bdf2d90e360ccc1a0aca10461bb139 100644
--- a/ash/common/system/tray/tray_utils.cc
+++ b/ash/common/system/tray/tray_utils.cc
@@ -5,9 +5,11 @@
#include "ash/common/system/tray/tray_utils.h"
#include "ash/common/material_design/material_design_controller.h"
+#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_item_view.h"
+#include "ash/common/wm_shell.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/vector2d.h"
@@ -86,4 +88,13 @@ void GetAccessibleLabelFromDescendantViews(
GetAccessibleLabelFromDescendantViews(view->child_at(i), out_labels);
}
+bool CanOpenWebUISettings(LoginStatus status) {
+ // TODO(tdanderson): Consider moving this into WmShell, or introduce a
+ // CanShowSettings() method in each delegate type that has a
+ // ShowSettings() method.
+ return status != LoginStatus::NOT_LOGGED_IN &&
+ status != LoginStatus::LOCKED &&
+ !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
+}
+
} // namespace ash
« no previous file with comments | « ash/common/system/tray/tray_utils.h ('k') | ash/common/system/tray_accessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698