mash dbus: Support system clock |
|||||||||||
Issue descriptiongo/dbus-in-mustash See SystemClockClient Communicates with system clock. Used in chrome (time setting webui) and ash (system tray). Plan: Fix to support D-Bus communication with multiple clients.
,
Sep 17 2016
I think this will mostly work as-is. Both browser and ash processes can bring up the SystemClockClient D-Bus client. That client doesn't have any significant internal state. Browser uses the client directly from //chrome/browser/ui/webui/options/chromeos/ for date/time setting. Ash uses it from //ash/common/system/chromeos/system_clock_observer.h, which is only used in //ash. The one thing that needs to be fixed for mustash is the 12-hour vs 24-hour setting. It comes via SystemTrayDelegate, which doesn't have a mus impl yet. The value is based on login state, system clock state, "crossettings" for machine state, user prefs, and other dependencies that only exist in the browser. See OnSystemClockChanged() in SystemTrayDelegateChromeOS: https://cs.chromium.org/chromium/src/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc?l=964
,
Sep 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6763ee8aaac990f173b64a17cf0e29b914fc94ce commit 6763ee8aaac990f173b64a17cf0e29b914fc94ce Author: jamescook <jamescook@chromium.org> Date: Tue Sep 20 16:48:13 2016 mash: Fix system tray clock 12/24 hour time setting The 12 vs. 24 hour time preference comes from chrome browser because it depends on prefs, machine settings, login state, etc. * Add ash.mojom.SystemTray interface * Add SystemTrayControllerMus in //chrome which listens for 12/24 pref updates and sends them to ash over mojo * Add SystemTrayDelegateMus in //ash/mus which listens for time pref updates over mojo and routes them to the system tray * SystemTrayDelegateMus caches the 12/24 preference as it is queried synchronously elsewhere in ash BUG=644361 TEST=open settings > advanced settings, toggle 24 hour clock preference, system tray display updates itself Review-Url: https://codereview.chromium.org/2351893002 Cr-Commit-Position: refs/heads/master@{#419789} [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/BUILD.gn [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/bridge/wm_shell_mus.cc [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/shell_delegate_mus.cc [add] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/system_tray_delegate_mus.cc [add] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/system_tray_delegate_mus.h [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/window_manager_application.cc [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/mus/window_manager_application.h [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/public/interfaces/BUILD.gn [add] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/ash/public/interfaces/system_tray.mojom [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/app/mojo/chrome_manifest.json [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/browser/ui/BUILD.gn [add] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/browser/ui/ash/system_tray_controller_mus.cc [add] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/browser/ui/ash/system_tray_controller_mus.h [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc [modify] https://crrev.com/6763ee8aaac990f173b64a17cf0e29b914fc94ce/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h
,
Sep 20 2016
Done, modulo any bugs we find.
,
Sep 20 2016
Not done. ash still accesses //chromeos/settings/timezone_settings.h and settings probably will live in the browser process under mustash. This needs more investigation.
,
Oct 4 2016
,
Oct 4 2016
,
Jan 13 2017
We don't need the last bits of timezone support for Q1. Back in the pile.
,
Feb 26 2018
,
Feb 26 2018
,
Apr 19 2018
,
Aug 15
One more.
,
Jan 3
Ash has two clock related dependencies, both in clock_model.h: #include "chromeos/dbus/system_clock_client.h" #include "chromeos/settings/timezone_settings.h" The TimezoneSettings dependency include CrosSettingsProvider dependencies, so it makes sense for both of these to be part of the Chrome process (which already has multiple TimezoneSettings dependencies). We should be able to replace both of those with with a single time related mojo API.
,
Jan 3
IIRC the TimezoneSettings thing is a one-off CrosSettingsProvider. Eliminating it would simplify CrosSettings. OTOH I think that's a pretty big refactor.
,
Jan 3
Yeah, I've looked into that before. It's.... complicated. Probably worth re-examining however, thanks for the reminder. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by jamescook@chromium.org
, Sep 7 2016Status: Started (was: Untriaged)