return null when theme color is not found

This commit is contained in:
Siyuan Liu 2017-08-20 22:48:13 +08:00
parent 4bc4a0c45b
commit eeb2e58ad8
4 changed files with 29 additions and 2 deletions

View file

@ -757,7 +757,11 @@ void WebContents::MediaStoppedPlaying(const MediaPlayerInfo& video_type,
}
void WebContents::DidChangeThemeColor(SkColor theme_color) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color));
if (theme_color != SK_ColorTRANSPARENT) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color));
} else {
Emit("did-change-theme-color", nullptr_t());
}
}
void WebContents::DocumentLoadedInFrame(