This folder contains the internal parts of the Password Check component. Files, classes and methods defined in here are not meant to be used outside of this package.
This document provides a brief overview of the architecture.
This component follows the typical MVC structure that is widely used in Chrome on Android. The MVC structures separates logic from representation:
//src/ui/android/java/src/org/chromium/ui/modelutil/
A typical request to the Password Check component API that intends to change the visible appearance involves all component parts. For example if the API caller requests to show compromosed credentials:
credentials
.credentials
for display.ITEMS
.ITEMS
property was changed.COMPROMISED_CREDENTIAL
item id would create or reuse a TextView with a button of options).The model holds state and event listeners connected to the view. An MCP automatically notifies the listener about any change made to a property. To automate this Observer structure, the model is a PropertyModel
as defined in //src/ui/android/java/src/org/chromium/ui/modelutil/
. It is build by defining properties and constructing a model with them. The properties are located in the static PasswordCheckProperties
class.
The model contains writable and readable properties. The readable properties are guaranteed to never change for the lifetime of the Password Check component:
The writable properties change over the course of the components lifetime:
The controller of this model implements the PasswordCheckComponent interface as defined in public/
and contains all logic that affects the component's visual appearance. The controller consists of two parts:
The view contains all parts that are necessary to display the check UI. It consists of two parts:
ITEMS
property to the RecyclerView inside the bottom sheet.