How the Ash Aura Shell Renders UI Using Chromium Code
This article explores Ash, known as the Aura Shell, which serves as the default window manager and system user interface for ChromeOS. It breaks down the relationship between Ash and the underlying Aura windowing system, and explains the exact technical process of how Ash leverages the Chromium web browser codebase—specifically the Views framework, the Chromium Compositor, and the Skia graphics engine—to render the desktop taskbar and application window frames.
What is Ash (The Aura Shell)?
Ash is the desktop environment and window manager built directly into the Chromium source tree to power ChromeOS. To understand Ash, you must first understand Aura.
Aura is Chromium’s cross-platform, hardware-accelerated windowing system. Historically, web browsers relied on the host operating system (like Windows Win32 or Linux GTK) to create and manage application windows. For ChromeOS, Google needed a lightweight windowing system that did not rely on bulky, traditional OS frameworks. They built Aura to represent windows as a hierarchy of simple, hardware-accelerated rectangular layers.
Aura windows are invisible primitives; they only understand bounds, stacking order, and event targeting (like mouse clicks or touch inputs). Ash (Aura Shell) sits directly on top of Aura. It takes those invisible Aura window primitives and builds a functional desktop environment out of them. Ash manages window snapping, virtual desks, screen rotation, and the visual system UI.
The Secret: Chromium’s "Views" Framework
A common misconception is that ChromeOS renders its desktop interface using HTML, CSS, and JavaScript. While some system apps (like the Settings app) use web technologies, Ash renders the core desktop using C++ code originally designed to draw the Google Chrome web browser.
Chromium uses an internal C++ UI toolkit called
Views (ui/views). In a standard desktop
environment like Windows or macOS, Chromium uses the Views framework to
draw the "browser chrome"—the tab strip, the address bar (Omnibox), the
bookmark bar, and the navigation buttons.
Because Ash lives inside the Chromium codebase, it simply reuses the
ui/views framework to build the entire operating system
interface. Instead of just drawing a browser toolbar, Ash uses Views to
draw the entire desktop.
Rendering the Taskbar (The Shelf)
In Ash, the desktop taskbar is referred to as the Shelf. The Shelf is not an external program; it is instantiated directly by the Chromium process running in "Ash mode."
Here is how Ash builds and renders the Shelf using browser code:
- The Container: Ash creates a dedicated, root-level Aura window anchored to the bottom (or side) of the display.
- The Widget: Inside this Aura window, Ash
initializes a
views::Widget, which is the bridge between the Aura windowing system and the Views UI toolkit. - The View Hierarchy: Ash populates this widget with
ShelfView. Just as the Chrome browser populates its top bar with "Back" and "Forward" button views,ShelfViewis populated with C++ view objects representing pinned app icons, the app launcher button, and the system tray (clock, battery, and Wi-Fi icons). - Event Routing: When you click an icon on the
taskbar, Chromium’s internal event router intercepts the hardware input,
matches the coordinates to the specific
views::Viewon the Shelf, and triggers the C++ callback to launch or focus the application.
Rendering Window Frames
Every application window on a desktop needs a frame—the title bar, the window borders, and the minimize, maximize, and close buttons. In UI development, this is called the Non-Client Area (the "Client Area" is the actual content inside the window, such as a webpage).
Because Aura windows have no visual appearance of their own, Ash is responsible for drawing the window frames for every application on the screen.
- NonClientFrameView: Chromium has a base class
called
views::NonClientFrameViewused to draw custom browser windows. Ash extends this class intoNonClientFrameViewAsh. - Header Painting:
NonClientFrameViewAshcontains aHeaderViewobject. This object uses Chromium’s UI code to calculate the layout for the window title text and the caption buttons (minimize, maximize, close). - Unified Styling: Because Ash controls the
NonClientFrameViewat the shell level, it forces every type of window—whether it is a Chrome browser window, a sandboxed Android app, or a Linux container app—to wrap itself in this exact same C++ View. This guarantees that all windows have identical rounded corners, drop shadows, and title bar behaviors.
Putting Pixels on the Screen: The Compositor and Skia
Defining the taskbar and window frames in C++ is only half the battle; Ash still needs to draw these elements onto the physical monitor. It does this using the exact same rendering pipeline that Chromium uses to draw complex websites.
- Recording Paint Commands: None of the Views in the
Shelf or Window Frames draw pixels directly. Instead, each View has an
OnPaint()method. When called, the View issues high-level drawing commands (e.g., "draw a gray rounded rectangle here," "draw this app icon PNG here") to agfx::Canvas. - Skia Graphics Engine: The
gfx::Canvasis backed by Skia, Google’s open-source 2D graphics library used by Chrome to render web pages. Skia translates these drawing commands into a display list. - The Chromium Compositor (
cc): Ash uses theui::Compositor, which is a wrapper around the main Chromium Compositor. The compositor takes the display lists from the Shelf, the display lists from the Window Frames, and the actual content of the open windows, and organizes them into a tree of visual layers. - GPU Acceleration: Finally, the Chromium Compositor hands these layers off to the device's GPU. The GPU rasterizes the Skia commands into actual pixels and composites the layers together on the screen at 60 to 120 frames per second.
By treating the operating system's taskbar and window frames as nothing more than browser UI elements, Ash achieves a fully hardware-accelerated desktop environment without needing a separate, heavy operating system graphics stack.