cros: Use SessionController to enable system tray settings / notifications tray

Desktop / Chromium - jamescook [chromium.org] - 18 April 2017 14:04 EDT

This eliminates 2 methods from SystemTrayDelegate and makes the system tray work better in mustash.

- Rename ShouldShowSettings to ShouldEnableSettings, because the settings gear icon is always visible.
- Cache the booleans from the user flow in ash::mojom::UserSession, because these are set once per session
- Consolidate the session active/locked/etc. logic in SessionController
- Clean up WebNotificationTray, which uses logged in state and should-show state inconsistently.

BUG=648964,665997 TEST=ash_unittests TrayItemTest.*, manual testing of supervised user flow and adding secondary user flow

Review-Url: https://codereview.chromium.org/2822033002 Cr-Commit-Position: refs/heads/master@{#465287}

341c045 cros: Use SessionController to enable system tray settings / notifications tray
ash/public/interfaces/session_controller.mojom | 8 ++++++
ash/session/session_controller.cc | 17 +++++++++++
ash/session/session_controller.h | 6 ++++
.../network/network_state_list_detailed_view.cc | 5 ++--
ash/system/screen_layout_observer.cc | 33 +++-------------------
ash/system/tiles/tiles_default_view.cc | 3 +-
ash/system/tray/default_system_tray_delegate.cc | 8 ------
ash/system/tray/default_system_tray_delegate.h | 2 --
ash/system/tray/system_tray_delegate.cc | 8 ------
ash/system/tray/system_tray_delegate.h | 6 ----
.../web_notification/web_notification_tray.cc | 17 ++++-------
.../web_notification/web_notification_tray.h | 6 +---
ash/test/test_session_controller_client.cc | 2 ++
.../supervised/supervised_user_creation_flow.cc | 2 +-
.../supervised/supervised_user_creation_flow.h | 3 +-
chrome/browser/chromeos/login/user_flow.cc | 4 +--
chrome/browser/chromeos/login/user_flow.h | 13 +++++++--
chrome/browser/ui/ash/session_controller_client.cc | 8 ++++++
.../ui/ash/system_tray_delegate_chromeos.cc | 18 ------------
.../browser/ui/ash/system_tray_delegate_chromeos.h | 2 --
20 files changed, 71 insertions(+), 100 deletions(-)

Upstream: git.chromium.org


  • Share