As I work on converting the shelf to mustash's ash_sysui it's becoming obvious that the code is pretty messy. (See photo attached.) Part of this is history from harrym's various refactors that never quite got completed. I want to try to improve things a bit.
Part of the motivation here is to make it possible to do things with the shelf without looking it up via an aura::Window / root_window, since mustash will be using wm::WmWindow (to support both aura::Window and mus::Window).
Here are some things that I'd like to do:
1. Make it clear that "Shelf" is the controller for the shelf. All access into the shelf to set state (autohide, visibility, etc.) should go via "Shelf".
2. The primary (only?) way to get a Shelf is via RootWindowController.
3. Eliminate "helper" methods on Shell like SetShelfAlignment() that take an aura::Window.
4. Likewise eliminate "helper" methods on RootWindowController for shelf, replacing them with GetShelfController().
5. Change the ownership of ShelfWidget so it is owned by Shelf, not RootWindowController.
6. Accept the fact that the system tray widget will never be a child of the shelf. It's in its own container and too much of the system assumes it is there. It is also shown on the login/OOBE screens where the shelf is either not present or implemented as WebUI. Kill all the TODOs about making it a child.
7. Get access to the system tray via RootWindowController, not via Shelf/ShelfWidget.
I probably won't get to all of these, but I wanted to write them down somewhere.
Thoughts? Objections?
Comment 1 by jamescook@chromium.org
, May 27 2016685 KB
685 KB View Download