Skip to content
Commit 540d0053 authored by Jocelyn Tran's avatar Jocelyn Tran Committed by Chromium LUCI CQ
Browse files

Reland "[Read Anything] Define default theme from system theme"

This is a reland of commit c581bca3

The original change was reverted because it triggered uninitialized
memory usage on MSAN bots. This reland initializes the members of
ReadAnythingTheme in read_anything_model.h to fix that issue.

Original change's description:
> [Read Anything] Define default theme from system theme
>
> In this CL, we define the default theme for Read Anything from the
> system theme. If the user is on dark mode, the default theme option for
> Read Anything will be the Read Anything dark theme. For light mode, the
> default theme will be the Read Anything light theme.
>
> This CL also moves the creation of the Read Anything theme object from
> the model to the page handler. The model initializes the ColorIds for
> the themes and those are passed around as needed. When we reach the page
> handler, we will have access to the color provider (since its a View
> implementation) to convert the theme ColorIds to SKColors to make the
> theme object.
>
> Bug: 1266555
> Change-Id: Ia4a51b056a5ac3ead1a8a8395eced8ea047f5f01
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3987769


> Reviewed-by: default avatarAbigail Klein <abigailbklein@google.com>
> Commit-Queue: Jocelyn Tran <jocelyntran@google.com>
> Reviewed-by: default avatarThomas Lukaszewicz <tluk@chromium.org>
> Reviewed-by: default avatarCaroline Rising <corising@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1072314}

Bug: 1266555
Change-Id: I157fdb39a72db52b033c19dfe0b287c851c0fd19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4034922


Reviewed-by: default avatarThomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: default avatarCaroline Rising <corising@chromium.org>
Commit-Queue: Jocelyn Tran <jocelyntran@google.com>
Reviewed-by: default avatarAbigail Klein <abigailbklein@google.com>
Cr-Commit-Position: refs/heads/main@{#1076502}
parent ea36f1c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment