Views
此部分实现为跨平台的。
Chrome UI for Chrome on Windows and Chrome OS is built using the Views UI framework that lives in src/views. The contents of a window is constructed from a hierarchy of views. View subclasses allow for implementation of various controls and components, like buttons and toolbars.
A view hierarchy is hosted within a Widget. A Widget is a cross-platform type, and relies on a NativeWidget implementation that is specific to each host environment to perform some duties.
Written Aura-based implementations of the RenderWidgetHostView. Traditionally the RenderWidgetHostView has been a HWND or GtkWidget, and is used as a parent for windowed NPAPI plugins. Since we are only supporting Pepper plugins going forward, we did not need a native window to parent NPAPI plugins and a synthetic implementation could be done.
Views is a user interface framework built on a type called, confusingly, View. Responsible for providing the content of our Aura windows, most of this code is also used by Desktop Chrome on Windows. Only the NativeWidget implementation differs (for now). Views also provides a set of useful reusable controls like Buttons, Menus, etc.
Views is somewhat analogous to Aura, with a native host (NativeWidget implementations), a View hierarchy within a RootView that handles event dispatch.
The primary difference is that this system was designed and built before beng developed a healthy skepticism of is-a relationships, and so you accomplish rendering, event handling and layout here by subclassing View, rather than implementing a delegate interface as in Aura.
ui\views\widget
ClientView、NonClientFrameView、RootView、BrowserWindow