fix: propagate preferred color scheme to the renderer (#22896)
* fix: do not crash if the window is closed syncronously with a nativeTheme change * fix: propogate preferred color scheme to the renderer and keep it up to date
This commit is contained in:
parent
212b47a77b
commit
fea3366bc7
7 changed files with 56 additions and 17 deletions
|
@ -700,9 +700,9 @@ void NativeWindowMac::SetExitingFullScreen(bool flag) {
|
|||
}
|
||||
|
||||
void NativeWindowMac::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
|
||||
base::PostTask(FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(&NativeWindowMac::RedrawTrafficLights,
|
||||
base::Unretained(this)));
|
||||
base::PostTask(
|
||||
FROM_HERE, {content::BrowserThread::UI},
|
||||
base::BindOnce(&NativeWindow::RedrawTrafficLights, GetWeakPtr()));
|
||||
}
|
||||
|
||||
bool NativeWindowMac::IsEnabled() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue