| 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
|
|
|